From ebbecdbf78692637ca0763ddd87293df822f30ca Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 18:47:11 +0000 Subject: [PATCH 001/144] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From e20c20e56a586be54755beaf43064737a6e95437 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:04:22 +0000 Subject: [PATCH 002/144] Create CONTRIBUTING.md --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..73fa4de --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +footnotes welcomes contributions! + +Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: + +# Branching + +- footnotes uses [GitHub Flow](https://githubflow.github.io/) +- branch off of `main` to start developing +- give your new branch a descriptive name +- when ready, submit a pull request to merge your branch with `main` + +# Commits + +- footnotes uses [Conventional Commits](https://www.conventionalcommits.org) +- keep individual commits as small as possible + +# Versioning + +- footnotes uses [Semantic Versioning](https://semver.org/) From 8207c90e5e547bf8d9cc8254535fbef1fbfb03ac Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:18:41 +0000 Subject: [PATCH 003/144] Create README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6a3e29e --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# footnotes + +## Description + +Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. + +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. + +## Main Features + +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + +## Example Usage + +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + +## Where to get footnotes? + +The current version is available on the [WordPress.org Plugin Directory](https://wordpress.org/plugins/footnotes/). + +## Acknowledgements + +Huge thanks to every footnotes user, contributor, bug reporter, feature requester and fan! From 953427f0f7d4129431b6ffb5d2919b09784450a1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:55:52 +0000 Subject: [PATCH 004/144] Generate HTML documentation using phpDocumentor --- docs/classes/MCI-Footnotes-Config.html | 504 ++ docs/classes/MCI-Footnotes-Convert.html | 759 ++ docs/classes/MCI-Footnotes-Hooks.html | 526 ++ docs/classes/MCI-Footnotes-Language.html | 493 ++ .../MCI-Footnotes-Layout-Diagnostics.html | 2290 ++++++ docs/classes/MCI-Footnotes-Layout-Init.html | 759 ++ .../MCI-Footnotes-Layout-Settings.html | 3757 ++++++++++ docs/classes/MCI-Footnotes-LayoutEngine.html | 2222 ++++++ docs/classes/MCI-Footnotes-Settings.html | 6221 +++++++++++++++++ docs/classes/MCI-Footnotes-Task.html | 2902 ++++++++ docs/classes/MCI-Footnotes-Template.html | 1044 +++ docs/classes/MCI-Footnotes-WYSIWYG.html | 492 ++ ...I-Footnotes-Widget-ReferenceContainer.html | 688 ++ docs/classes/MCI-Footnotes-WidgetBase.html | 529 ++ docs/classes/MCI-Footnotes.html | 873 +++ docs/css/base.css | 1002 +++ docs/css/normalize.css | 427 ++ docs/css/template.css | 169 + docs/files/class-config.html | 121 + docs/files/class-convert.html | 121 + docs/files/class-dashboard-init.html | 121 + docs/files/class-dashboard-layout.html | 121 + .../class-dashboard-subpage-diagnostics.html | 121 + docs/files/class-dashboard-subpage-main.html | 121 + docs/files/class-hooks.html | 121 + docs/files/class-init.html | 121 + docs/files/class-language.html | 121 + docs/files/class-settings.html | 121 + docs/files/class-task.html | 121 + docs/files/class-template.html | 121 + docs/files/class-widgets-base.html | 121 + .../class-widgets-reference-container.html | 121 + docs/files/class-wysiwyg.html | 121 + docs/files/footnotes.html | 110 + docs/files/includes.html | 190 + docs/graphs/classes.html | 97 + docs/index.html | 223 + docs/indices/files.html | 142 + docs/js/search.js | 173 + docs/js/searchIndex.js | 1419 ++++ docs/namespaces/default.html | 227 + docs/packages/Default.html | 227 + docs/packages/default.html | 116 + docs/reports/deprecated.html | 106 + docs/reports/errors.html | 174 + docs/reports/markers.html | 128 + 46 files changed, 30804 insertions(+) create mode 100644 docs/classes/MCI-Footnotes-Config.html create mode 100644 docs/classes/MCI-Footnotes-Convert.html create mode 100644 docs/classes/MCI-Footnotes-Hooks.html create mode 100644 docs/classes/MCI-Footnotes-Language.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Diagnostics.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Init.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Settings.html create mode 100644 docs/classes/MCI-Footnotes-LayoutEngine.html create mode 100644 docs/classes/MCI-Footnotes-Settings.html create mode 100644 docs/classes/MCI-Footnotes-Task.html create mode 100644 docs/classes/MCI-Footnotes-Template.html create mode 100644 docs/classes/MCI-Footnotes-WYSIWYG.html create mode 100644 docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html create mode 100644 docs/classes/MCI-Footnotes-WidgetBase.html create mode 100644 docs/classes/MCI-Footnotes.html create mode 100644 docs/css/base.css create mode 100644 docs/css/normalize.css create mode 100644 docs/css/template.css create mode 100644 docs/files/class-config.html create mode 100644 docs/files/class-convert.html create mode 100644 docs/files/class-dashboard-init.html create mode 100644 docs/files/class-dashboard-layout.html create mode 100644 docs/files/class-dashboard-subpage-diagnostics.html create mode 100644 docs/files/class-dashboard-subpage-main.html create mode 100644 docs/files/class-hooks.html create mode 100644 docs/files/class-init.html create mode 100644 docs/files/class-language.html create mode 100644 docs/files/class-settings.html create mode 100644 docs/files/class-task.html create mode 100644 docs/files/class-template.html create mode 100644 docs/files/class-widgets-base.html create mode 100644 docs/files/class-widgets-reference-container.html create mode 100644 docs/files/class-wysiwyg.html create mode 100644 docs/files/footnotes.html create mode 100644 docs/files/includes.html create mode 100644 docs/graphs/classes.html create mode 100644 docs/index.html create mode 100644 docs/indices/files.html create mode 100644 docs/js/search.js create mode 100644 docs/js/searchIndex.js create mode 100644 docs/namespaces/default.html create mode 100644 docs/packages/Default.html create mode 100644 docs/packages/default.html create mode 100644 docs/reports/deprecated.html create mode 100644 docs/reports/errors.html create mode 100644 docs/reports/markers.html diff --git a/docs/classes/MCI-Footnotes-Config.html b/docs/classes/MCI-Footnotes-Config.html new file mode 100644 index 0000000..57b1506 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Config.html @@ -0,0 +1,504 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
+

Documentation

+ + + + + +
+ +
+
+ + + + +
+ + +
+

+ MCI_Footnotes_Config + + + + +

+ + + +

Contains all Plugin Constants. Contains no Method or Property.

+ +
+ + +
+ Tags + +
+
+
+ author +
+
+ +

Stefan Herndler

+
+ +
+
+ since +
+
+ 1.5.0 + +
+ +
+
+ + + + + + +

+ Table of Contents + +

+ +
+
+ C_STR_LOVE_SYMBOL + +  = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' +
+
Html tag for the LOVE symbol.
+ +
+ C_STR_LOVE_SYMBOL_HEADING + +  = '<span class="footnotes_heart_heading">&hearts;</span>' +
+
HTML code for the 'love' symbol used in dashboard heading
+ +
+ C_STR_NO_LOVE_SLUG + +  = '[[no footnotes: love]]' +
+
Short code to DON'T display the 'LOVE ME' slug on certain pages.
+ +
+ C_STR_PLUGIN_HEADING_NAME + +  = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' +
+
Public Plugin name for dashboard heading
+ +
+ C_STR_PLUGIN_NAME + +  = "footnotes" +
+
Internal Plugin name.
+ +
+ C_STR_PLUGIN_PUBLIC_NAME + +  = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' +
+
Public Plugin name.
+ +
+ + + + +
+

+ Constants + +

+
+

+ C_STR_LOVE_SYMBOL + +

+ + + +

Html tag for the LOVE symbol.

+ + + public + string + C_STR_LOVE_SYMBOL + = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' + + + +
+ + +
+ Tags + +
+
+
+ author +
+
+ +

Stefan Herndler

+
+ +
+
+ since +
+
+ 1.5.0 + +
+ +
+
+ +
+
+

+ C_STR_LOVE_SYMBOL_HEADING + +

+ + + +

HTML code for the 'love' symbol used in dashboard heading

+ + + public + string + C_STR_LOVE_SYMBOL_HEADING + = '<span class="footnotes_heart_heading">&hearts;</span>' + + + +
+ + +
+ Tags + +
+
+
+ since +
+
+ 2.0.4 + +
+ +
+
+ +
+
+

+ C_STR_NO_LOVE_SLUG + +

+ + + +

Short code to DON'T display the 'LOVE ME' slug on certain pages.

+ + + public + string + C_STR_NO_LOVE_SLUG + = '[[no footnotes: love]]' + + + +
+ + +
+ Tags + +
+
+
+ author +
+
+ +

Stefan Herndler

+
+ +
+
+ since +
+
+ 1.5.0 + +
+ +
+
+ +
+
+

+ C_STR_PLUGIN_HEADING_NAME + +

+ + + +

Public Plugin name for dashboard heading

+ + + public + string + C_STR_PLUGIN_HEADING_NAME + = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' + + + +

After properly displaying in dashboard headings until WPv5.4, the above started +in WPv5.5 being torn apart as if the headline was text-align:justify and not +the last line. That ugly display bug badly affected the plugin’s communication. +The only working solution found so far is using position:fixed in one heading +that isn’t translated, and dropping the logo in another, translatable heading.

+
+ + +
+ Tags + +
+
+
+ since +
+
+ 2.0.4 + +
+ +
+
+ +
+
+

+ C_STR_PLUGIN_NAME + +

+ + + +

Internal Plugin name.

+ + + public + string + C_STR_PLUGIN_NAME + = "footnotes" + + + +
+ + +
+ Tags + +
+
+
+ author +
+
+ +

Stefan Herndler

+
+ +
+
+ since +
+
+ 1.5.0 + +
+ +
+
+ +
+
+

+ C_STR_PLUGIN_PUBLIC_NAME + +

+ + + +

Public Plugin name.

+ + + public + string + C_STR_PLUGIN_PUBLIC_NAME + = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' + + + +
+ + +
+ Tags + +
+
+
+ author +
+
+ +

Stefan Herndler

+
+ +
+
+ since +
+
+ 1.5.0 + +
+ +
+
+ +
+
+ + + + +
+
+
+
+

Search results

+ +
+
+
    +
    +
    +
    +
    +
    + + +
    + + + + diff --git a/docs/classes/MCI-Footnotes-Convert.html b/docs/classes/MCI-Footnotes-Convert.html new file mode 100644 index 0000000..ebb56d9 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Convert.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
    +

    Documentation

    + + + + + +
    + +
    +
    + + + + +
    + + +
    +

    + MCI_Footnotes_Convert + + + + +

    + + + +

    Converts data types and Footnotes specific values.

    + +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.5.0 + +
    + +
    +
    + + + + + + +

    + Table of Contents + +

    + +
    +
    + debug() + +  : mixed +
    +
    Displays a Variable.
    + +
    + getArrow() + +  : array<string|int, mixed>|string +
    +
    Get a html Array short code depending on Arrow-Array key index.
    + +
    + Index() + +  : string +
    +
    Converts a integer into the user-defined counter style for the footnotes.
    + +
    + toBool() + +  : bool +
    +
    Converts a string depending on its value to a boolean.
    + +
    + toArabicLeading() + +  : string +
    +
    Converts an integer to a leading-0 integer.
    + +
    + toLatin() + +  : string +
    +
    Converts an integer into latin ascii characters, either lower or upper-case.
    + +
    + toRomanic() + +  : string +
    +
    Converts an integer to a romanic letter.
    + +
    + + + + + + + +
    +

    + Methods + +

    +
    +

    + debug() + +

    + + +

    Displays a Variable.

    + + + public + static debug(mixed $p_mixed_Value) : mixed + +
    + +
    Parameters
    +
    +
    + $p_mixed_Value + : mixed +
    +
    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.5.0 + +
    + +
    +
    + +
    Return values
    + mixed + — +
    + + +
    +
    +

    + getArrow() + +

    + + +

    Get a html Array short code depending on Arrow-Array key index.

    + + + public + static getArrow([int $p_int_Index = -1 ]) : array<string|int, mixed>|string + +
    + +
    Parameters
    +
    +
    + $p_int_Index + : int + = -1
    +
    +

    Index representing the Arrow. If empty all Arrows are specified.

    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.3.2 + +
    + +
    +
    + +
    Return values
    + array<string|int, mixed>|string + — +

    Array of all Arrows if Index is empty otherwise html tag of a specific arrow.

    +
    + + +
    +
    +

    + Index() + +

    + + +

    Converts a integer into the user-defined counter style for the footnotes.

    + + + public + static Index(int $p_int_Index[, string $p_str_ConvertStyle = "arabic_plain" ]) : string + +
    + +
    Parameters
    +
    +
    + $p_int_Index + : int +
    +
    +

    Index to be converted.

    +
    + +
    +
    + $p_str_ConvertStyle + : string + = "arabic_plain"
    +
    +

    Style of the new/converted Index.

    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.5.0 + +
    + +
    +
    + since +
    +
    + 2.2.0 + +

    lowercase Roman numerals supported

    +
    + +
    +
    + +
    Return values
    + string + — +

    Converted Index as string in the defined counter style.

    +

    Edited:

    +
    + + +
    +
    +

    + toBool() + +

    + + +

    Converts a string depending on its value to a boolean.

    + + + public + static toBool(string $p_str_Value) : bool + +
    + +
    Parameters
    +
    +
    + $p_str_Value + : string +
    +
    +

    String to be converted to boolean.

    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.0-beta + +
    + +
    +
    + +
    Return values
    + bool + — +

    Boolean representing the string.

    +
    + + +
    +
    +

    + toArabicLeading() + +

    + + +

    Converts an integer to a leading-0 integer.

    + + + private + static toArabicLeading(int $p_int_Value) : string + +
    + +
    Parameters
    +
    +
    + $p_int_Value + : int +
    +
    +

    Value/Index to be converted.

    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.0-gamma + +
    + +
    +
    + +
    Return values
    + string + — +

    Value with a leading zero.

    +
    + + +
    +
    +

    + toLatin() + +

    + + +

    Converts an integer into latin ascii characters, either lower or upper-case.

    + + + private + static toLatin(int $p_int_Value, bool $p_bool_UpperCase) : string + +

    Function available from A to ZZ ( means 676 footnotes at 1 page possible).

    +
    + +
    Parameters
    +
    +
    + $p_int_Value + : int +
    +
    +

    Value/Index to be converted.

    +
    + +
    +
    + $p_bool_UpperCase + : bool +
    +
    +

    True to convert the value to upper case letter, otherwise to lower case.

    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.0-gamma + +
    + +
    +
    + +
    Return values
    + string + — +
    + + +
    +
    +

    + toRomanic() + +

    + + +

    Converts an integer to a romanic letter.

    + + + private + static toRomanic(int $p_int_Value, mixed $p_bool_UpperCase) : string + +
    + +
    Parameters
    +
    +
    + $p_int_Value + : int +
    +
    +

    Value/Index to be converted.

    +
    + +
    +
    + $p_bool_UpperCase + : mixed +
    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + author +
    +
    + +

    Stefan Herndler

    +
    + +
    +
    + since +
    +
    + 1.0-gamma + +
    + +
    +
    + since +
    +
    + 2.2.0 + +

    optionally lowercase (code from Latin) 2020-12-12T1538+0100

    +
    + +
    +
    + +
    Return values
    + string + — +

    Edited:

    +
    + + +
    +
    + +
    +
    +
    +
    +

    Search results

    + +
    +
    +
      +
      +
      +
      +
      +
      + + +
      + + + + diff --git a/docs/classes/MCI-Footnotes-Hooks.html b/docs/classes/MCI-Footnotes-Hooks.html new file mode 100644 index 0000000..eb710f1 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Hooks.html @@ -0,0 +1,526 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
      +

      Documentation

      + + + + + +
      + +
      +
      + + + + +
      + + +
      +

      + MCI_Footnotes_Hooks + + + + +

      + + + +

      Registers all WordPress Hooks and executes them on demand.

      + +
      + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +
      + +
      +
      + + + + + + +

      + Table of Contents + +

      + +
      +
      + activatePlugin() + +  : mixed +
      +
      Executed when the Plugin gets activated.
      + +
      + deactivatePlugin() + +  : mixed +
      +
      Executed when the Plugin gets deactivated.
      + +
      + PluginLinks() + +  : array<string|int, mixed> +
      +
      Add Links to the Plugin in the "installed Plugins" page.
      + +
      + registerHooks() + +  : mixed +
      +
      Registers all WordPress hooks.
      + +
      + uninstallPlugin() + +  : mixed +
      +
      Executed when the Plugin gets uninstalled.
      + +
      + + + + + + + +
      +

      + Methods + +

      +
      +

      + activatePlugin() + +

      + + +

      Executed when the Plugin gets activated.

      + + + public + static activatePlugin() : mixed + +
      + + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +
      + +
      +
      + +
      Return values
      + mixed + — +
      + + +
      +
      +

      + deactivatePlugin() + +

      + + +

      Executed when the Plugin gets deactivated.

      + + + public + static deactivatePlugin() : mixed + +
      + + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +
      + +
      +
      + +
      Return values
      + mixed + — +
      + + +
      +
      + + + +

      Add Links to the Plugin in the "installed Plugins" page.

      + + + public + static PluginLinks(array<string|int, mixed> $p_arr_Links, string $p_str_PluginFileName) : array<string|int, mixed> + +
      + +
      Parameters
      +
      +
      + $p_arr_Links + : array<string|int, mixed> +
      +
      +

      Current Links.

      +
      + +
      +
      + $p_str_PluginFileName + : string +
      +
      +

      Plugins init file name.

      +
      + +
      +
      + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +
      + +
      +
      + +
      Return values
      + array<string|int, mixed> + — +
      + + +
      +
      +

      + registerHooks() + +

      + + +

      Registers all WordPress hooks.

      + + + public + static registerHooks() : mixed + +
      + + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +
      + +
      +
      + +
      Return values
      + mixed + — +
      + + +
      +
      +

      + uninstallPlugin() + +

      + + +

      Executed when the Plugin gets uninstalled.

      + + + public + static uninstallPlugin() : mixed + +
      + + + +
      + Tags + +
      +
      +
      + author +
      +
      + +

      Stefan Herndler

      +
      + +
      +
      + since +
      +
      + 1.5.0 + +

      Edit: ClearAll didn’t actually work.

      +
      + +
      +
      + since +
      +
      + 2.2.0 + +

      this function is not called any longer when deleting the plugin

      +
      + +
      +
      + +
      Return values
      + mixed + — +
      + + +
      +
      + +
      +
      +
      +
      +

      Search results

      + +
      +
      +
        +
        +
        +
        +
        +
        + + +
        + + + + diff --git a/docs/classes/MCI-Footnotes-Language.html b/docs/classes/MCI-Footnotes-Language.html new file mode 100644 index 0000000..ebf670f --- /dev/null +++ b/docs/classes/MCI-Footnotes-Language.html @@ -0,0 +1,493 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
        +

        Documentation

        + + + + + +
        + +
        +
        + + + + +
        + + +
        +

        + MCI_Footnotes_Language + + + + +

        + + + +

        Loads text domain of current or default language for localization.

        + +
        + + +
        + Tags + +
        +
        +
        + author +
        +
        + +

        Stefan Herndler

        +
        + +
        +
        + since +
        +
        + 1.5.0 + +
        + +
        +
        + + + + + + +

        + Table of Contents + +

        + +
        +
        + loadTextDomain() + +  : mixed +
        +
        Loads the text domain for current WordPress language if exists.
        + +
        + registerHooks() + +  : mixed +
        +
        Register WordPress Hook.
        + +
        + load() + +  : bool +
        +
        Loads a specific text domain.
        + +
        + + + + + + + +
        +

        + Methods + +

        +
        +

        + loadTextDomain() + +

        + + +

        Loads the text domain for current WordPress language if exists.

        + + + public + static loadTextDomain() : mixed + +

        Otherwise fallback "en_GB" will be loaded.

        +
        + + + +
        + Tags + +
        +
        +
        + author +
        +
        + +

        Stefan Herndler

        +
        + +
        +
        + since +
        +
        + 1.5.0 + +
          +
        • Bugfix: Correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution.
        • +
        +
        + +
        +
        + since +
        +
        + 2.0.0 + +
        + +
        +
        + date +
        +
        + +

        2020-10-26T1609+0100

        +
        + +
        +
        + contributor +
        +
        + +

        @matkus2

        +
        + +
        +
        + link +
        +
        +

        Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error: +“Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters()”

        +

        Yet get_locale() is defined w/o parameters in wp-includes/l10n.php:30, and +apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugin.php:181.

        +
        + +
        +
        + link +
        +
        +

        But apply_filters() is defined with a 3rd parameter (and w/o the first one) in +wp-includes/class-wp-hook.php:264, as public function apply_filters( $value, $args ).

        +

        Taking it all together, probably the full function definition would be: +public function apply_filters( $tag, $value, $args ). +In the case of get_locale(), $args is empty.

        +

        The bug was lurking in WP. PHP 7.1 promoted the warning to an error.

        +
        + +
        +
        + link +
        +
        + https://www.php.net/manual/en/migration71.incompatible.php + +
        +
        + link +
        +
        + https://www.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.too-few-arguments-exception + +
        +
        + +
        Return values
        + mixed + — +
        + + +
        +
        +

        + registerHooks() + +

        + + +

        Register WordPress Hook.

        + + + public + static registerHooks() : mixed + +
        + + + +
        + Tags + +
        +
        +
        + author +
        +
        + +

        Stefan Herndler

        +
        + +
        +
        + since +
        +
        + 1.5.0 + +
        + +
        +
        + +
        Return values
        + mixed + — +
        + + +
        +
        +

        + load() + +

        + + +

        Loads a specific text domain.

        + + + private + static load(string $p_str_LanguageCode) : bool + +
        + +
        Parameters
        +
        +
        + $p_str_LanguageCode + : string +
        +
        +

        Language Code to load a specific text domain.

        +
        + +
        +
        + + +
        + Tags + +
        +
        +
        + author +
        +
        + +

        Stefan Herndler

        +
        + +
        +
        + since +
        +
        + 1.5.1 + +
        + +
        +
        + since +
        +
        + 2.1.6 + +
        + +
        +
        + date +
        +
        + +

        2020-12-08T1931+0100

        +
        + +
        +
        + reporter +
        +
        + +

        @nikelaos

        +
        + +
        +
        + link +
        +
        +

        That is done by using load_plugin_textdomain(): +“The .mo file should be named based on the text domain with a dash, and then the locale exactly.”

        +
        + +
        +
        + see +
        +
        + +

        wp-includes/l10n.php:857

        +
        + +
        +
        + +
        Return values
        + bool + — +
          +
        • Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report.
        • +
        +
        + + +
        +
        + +
        +
        +
        +
        +

        Search results

        + +
        +
        +
          +
          +
          +
          +
          +
          + + +
          + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Diagnostics.html b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html new file mode 100644 index 0000000..d00152d --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html @@ -0,0 +1,2290 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
          +

          Documentation

          + + + + + +
          + +
          +
          + + + + +
          + + +
          +

          + MCI_Footnotes_Layout_Diagnostics + + + extends MCI_Footnotes_LayoutEngine + + + + +

          + + + +

          Displays Diagnostics of the web server, PHP and WordPress.

          + +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + + + + + + +

          + Table of Contents + +

          + +
          +
          + $a_arr_Sections + +  : array<string|int, mixed> +
          +
          Stores all Sections for the child sub page.
          + +
          + $a_str_SubPageHook + +  : null|string +
          +
          Stores the Hook connection string for the child sub page.
          + +
          + Description() + +  : mixed +
          +
          Output the Description of a section. May be overwritten in any section.
          + +
          + Diagnostics() + +  : mixed +
          +
          Displays a diagnostics about the web server, php and WordPress.
          + +
          + displayContent() + +  : mixed +
          +
          Displays the content of specific sub page.
          + +
          + getPriority() + +  : int +
          +
          Returns a Priority index. Lower numbers have a higher Priority.
          + +
          + registerSections() + +  : mixed +
          +
          Registers all sections for a sub page.
          + +
          + registerSubPage() + +  : mixed +
          +
          Registers a sub page.
          + +
          + addCheckbox() + +  : string +
          +
          Returns the html tag for an input [type = checkbox].
          + +
          + addColorSelection() + +  : string +
          +
          Returns the html tag for an input [type = text] with color selection class.
          + +
          + addLabel() + +  : string +
          +
          Returns the html tag for an input/select label.
          + +
          + addLineSpace() + +  : string +
          +
          Returns a line break to have a space between two lines.
          + +
          + addMetaBox() + +  : array<string|int, mixed> +
          +
          Returns an array describing a meta box.
          + +
          + addNewline() + +  : string +
          +
          Returns a line break to start a new line.
          + +
          + addNumBox() + +  : string +
          +
          Returns the html tag for an input [type = num].
          + +
          + addSection() + +  : array<string|int, mixed> +
          +
          Returns an array describing a sub page section.
          + +
          + addSelectBox() + +  : string +
          +
          Returns the html tag for a select box.
          + +
          + addText() + +  : string +
          +
          Returns a simple text inside html <span> text.
          + +
          + addTextArea() + +  : string +
          +
          Returns the html tag for a text area.
          + +
          + addTextBox() + +  : string +
          +
          Returns the html tag for an input [type = text].
          + +
          + getMetaBoxes() + +  : array<string|int, mixed> +
          +
          Returns an array of all registered meta boxes for each section of the sub page.
          + +
          + getSections() + +  : array<string|int, mixed> +
          +
          Returns an array of all registered sections for the sub page.
          + +
          + getSubPageSlug() + +  : string +
          +
          Returns the unique slug of the sub page.
          + +
          + getSubPageTitle() + +  : string +
          +
          Returns the title of the sub page.
          + +
          + LoadSetting() + +  : array<string|int, mixed> +
          +
          Loads specific setting and returns an array with the keys [id, name, value].
          + +
          + appendScripts() + +  : mixed +
          +
          Append javascript and css files for specific sub page.
          + +
          + registerMetaBoxes() + +  : mixed +
          +
          Registers all Meta boxes for a sub page.
          + +
          + saveSettings() + +  : bool +
          +
          Save all Plugin settings.
          + +
          + + + + + + +
          +

          + Properties + +

          +
          +

          + $a_arr_Sections + + + +

          + + +

          Stores all Sections for the child sub page.

          + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          +
          +

          + $a_str_SubPageHook + + + +

          + + +

          Stores the Hook connection string for the child sub page.

          + + + protected + null|string + $a_str_SubPageHook + = +ull + +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          +
          + +
          +

          + Methods + +

          +
          +

          + Description() + +

          + + +

          Output the Description of a section. May be overwritten in any section.

          + + + public + Description() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + Diagnostics() + +

          + + +

          Displays a diagnostics about the web server, php and WordPress.

          + + + public + Diagnostics() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + displayContent() + +

          + + +

          Displays the content of specific sub page.

          + + + public + displayContent() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + getPriority() + +

          + + +

          Returns a Priority index. Lower numbers have a higher Priority.

          + + + public + getPriority() : int + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + int + — +
          + + +
          +
          +

          + registerSections() + +

          + + +

          Registers all sections for a sub page.

          + + + public + registerSections() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + registerSubPage() + +

          + + +

          Registers a sub page.

          + + + public + registerSubPage() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + addCheckbox() + +

          + + +

          Returns the html tag for an input [type = checkbox].

          + + + protected + addCheckbox(string $p_str_SettingName) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre load the input field.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addColorSelection() + +

          + + +

          Returns the html tag for an input [type = text] with color selection class.

          + + + protected + addColorSelection(string $p_str_SettingName) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre load the input field.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.6 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addLabel() + +

          + + +

          Returns the html tag for an input/select label.

          + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to connect the Label with the input/select field.

          +
          + +
          +
          + $p_str_Caption + : string +
          +
          +

          Label caption.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + since +
          +
          + 2.1.6 + +

          no colon

          +
          + +
          +
          + +
          Return values
          + string + — +

          Edited 2020-12-01T0159+0100..

          +
          + + +
          +
          +

          + addLineSpace() + +

          + + +

          Returns a line break to have a space between two lines.

          + + + protected + addLineSpace() : string + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addMetaBox() + +

          + + +

          Returns an array describing a meta box.

          + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
          + +
          Parameters
          +
          +
          + $p_str_SectionID + : string +
          +
          +

          Parent Section ID.

          +
          + +
          +
          + $p_str_ID + : string +
          +
          +

          Unique ID suffix.

          +
          + +
          +
          + $p_str_Title + : string +
          +
          +

          Title for the meta box.

          +
          + +
          +
          + $p_str_CallbackFunctionName + : string +
          +
          +

          Class method name for callback.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +

          meta box description to be able to append a meta box to the output.

          +
          + + +
          +
          +

          + addNewline() + +

          + + +

          Returns a line break to start a new line.

          + + + protected + addNewline() : string + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addNumBox() + +

          + + +

          Returns the html tag for an input [type = num].

          + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre load the input field.

          +
          + +
          +
          + $p_in_Min + : int +
          +
          +

          Minimum value.

          +
          + +
          +
          + $p_int_Max + : int +
          +
          +

          Maximum value.

          +
          + +
          +
          + $p_bool_Deci + : bool + = false
          +
          +

          true if 0.1 steps and floating to string, false if integer (default)

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + since +
          +
          + 2.1.4 + +

          step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

          +
          + +
          +
          + +
          Return values
          + string + — +

          Edited:

          +
          + + +
          +
          +

          + addSection() + +

          + + +

          Returns an array describing a sub page section.

          + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
          + +
          Parameters
          +
          +
          + $p_str_ID + : string +
          +
          +

          Unique ID suffix.

          +
          + +
          +
          + $p_str_Title + : string +
          +
          +

          Title of the section.

          +
          + +
          +
          + $p_int_SettingsContainerIndex + : int +
          +
          +

          Settings Container Index.

          +
          + +
          +
          + $p_bool_hasSubmitButton + : bool + = true
          +
          +

          Should a Submit Button be displayed for this section, default: true.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +

          Array describing the section.

          +
          + + +
          +
          +

          + addSelectBox() + +

          + + +

          Returns the html tag for a select box.

          + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre select the current value.

          +
          + +
          +
          + $p_arr_Options + : array<string|int, mixed> +
          +
          +

          Possible options to be selected.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addText() + +

          + + +

          Returns a simple text inside html <span> text.

          + + + protected + addText(string $p_str_Text) : string + +
          + +
          Parameters
          +
          +
          + $p_str_Text + : string +
          +
          +

          Message to be surrounded with simple html tag (span).

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addTextArea() + +

          + + +

          Returns the html tag for a text area.

          + + + protected + addTextArea(string $p_str_SettingName) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre fill the text area.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + addTextBox() + +

          + + +

          Returns the html tag for an input [type = text].

          + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
          + +
          Parameters
          +
          +
          + $p_str_SettingName + : string +
          +
          +

          Name of the Settings key to pre load the input field.

          +
          + +
          +
          + $p_str_MaxLength + : int + = 999
          +
          +

          Maximum length of the input, default 999 characters.

          +
          + +
          +
          + $p_bool_Readonly + : bool + = false
          +
          +

          Set the input to be read only, default false.

          +
          + +
          +
          + $p_bool_Hidden + : bool + = false
          +
          +

          Set the input to be hidden, default false.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + getMetaBoxes() + +

          + + +

          Returns an array of all registered meta boxes for each section of the sub page.

          + + + protected + getMetaBoxes() : array<string|int, mixed> + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +
          + + +
          +
          +

          + getSections() + +

          + + +

          Returns an array of all registered sections for the sub page.

          + + + protected + getSections() : array<string|int, mixed> + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +
          + + +
          +
          +

          + getSubPageSlug() + +

          + + +

          Returns the unique slug of the sub page.

          + + + protected + getSubPageSlug() : string + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + getSubPageTitle() + +

          + + +

          Returns the title of the sub page.

          + + + protected + getSubPageTitle() : string + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + string + — +
          + + +
          +
          +

          + LoadSetting() + +

          + + +

          Loads specific setting and returns an array with the keys [id, name, value].

          + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
          + +
          Parameters
          +
          +
          + $p_str_SettingKeyName + : string +
          +
          +

          Settings Array key name.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +

          Contains Settings ID, Settings Name and Settings Value.

          +
          + + +
          +
          +

          + appendScripts() + +

          + + +

          Append javascript and css files for specific sub page.

          + + + private + appendScripts() : mixed + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + registerMetaBoxes() + +

          + + +

          Registers all Meta boxes for a sub page.

          + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
          + +
          Parameters
          +
          +
          + $p_str_ParentID + : string +
          +
          +

          Parent section unique id.

          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + mixed + — +
          + + +
          +
          +

          + saveSettings() + +

          + + +

          Save all Plugin settings.

          + + + private + saveSettings() : bool + +
          + + + +
          + Tags + +
          +
          +
          + author +
          +
          + +

          Stefan Herndler

          +
          + +
          +
          + since +
          +
          + 1.5.0 + +
          + +
          +
          + +
          Return values
          + bool + — +
          + + +
          +
          + +
          +
          +
          +
          +

          Search results

          + +
          +
          +
            +
            +
            +
            +
            +
            + + +
            + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Init.html b/docs/classes/MCI-Footnotes-Layout-Init.html new file mode 100644 index 0000000..0ec0d29 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Init.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
            +

            Documentation

            + + + + + +
            + +
            +
            + + + + +
            + + +
            +

            + MCI_Footnotes_Layout_Init + + + + +

            + + + +

            Handles the Settings interface of the Plugin.

            + +
            + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + + + + + + +

            + Table of Contents + +

            + +
            +
            + C_STR_MAIN_MENU_SLUG + +  = "mfmmf" +
            +
            Slug for the Plugin main menu.
            + +
            + C_STR_MAIN_MENU_TITLE + +  = "ManFisher" +
            +
            Plugin main menu name.
            + +
            + $a_arr_SubPageClasses + +  : array<string|int, mixed> +
            +
            + +
            + __construct() + +  : mixed +
            +
            Class Constructor. Initializes all WordPress hooks for the Plugin Settings.
            + +
            + displayOtherPlugins() + +  : mixed +
            +
            Displays other Plugins from the developers.
            + +
            + getPluginMetaInformation() + +  : mixed +
            +
            AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.
            + +
            + initializeSettings() + +  : mixed +
            +
            Initializes all sub pages and registers the settings.
            + +
            + registerMainMenu() + +  : mixed +
            +
            Registers the new main menu for the WordPress dashboard.
            + +
            + registerSubPages() + +  : mixed +
            +
            Registers all SubPages for this Plugin.
            + +
            + + + + +
            +

            + Constants + +

            +
            +

            + C_STR_MAIN_MENU_SLUG + +

            + + + +

            Slug for the Plugin main menu.

            + + + public + string + C_STR_MAIN_MENU_SLUG + = "mfmmf" + + + +
            + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            +
            +

            + C_STR_MAIN_MENU_TITLE + +

            + + + +

            Plugin main menu name.

            + + + public + string + C_STR_MAIN_MENU_TITLE + = "ManFisher" + + + +
            + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            +
            + + +
            +

            + Properties + +

            +
            +

            + $a_arr_SubPageClasses + + + +

            + + + + + private + array<string|int, mixed> + $a_arr_SubPageClasses + = array() + +
            + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            +
            + +
            +

            + Methods + +

            +
            +

            + __construct() + +

            + + +

            Class Constructor. Initializes all WordPress hooks for the Plugin Settings.

            + + + public + __construct() : mixed + +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            +

            + displayOtherPlugins() + +

            + + +

            Displays other Plugins from the developers.

            + + + public + displayOtherPlugins() : mixed + +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            +

            + getPluginMetaInformation() + +

            + + +

            AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.

            + + + public + getPluginMetaInformation() : mixed + +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            +

            + initializeSettings() + +

            + + +

            Initializes all sub pages and registers the settings.

            + + + public + initializeSettings() : mixed + +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            +

            + registerMainMenu() + +

            + + +

            Registers the new main menu for the WordPress dashboard.

            + + + public + registerMainMenu() : mixed + +

            Registers all sub menu pages for the new main menu.

            +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + see +
            +
            + http://codex.wordpress.org/Function_Reference/add_menu_page + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            +

            + registerSubPages() + +

            + + +

            Registers all SubPages for this Plugin.

            + + + private + registerSubPages() : mixed + +
            + + + +
            + Tags + +
            +
            +
            + author +
            +
            + +

            Stefan Herndler

            +
            + +
            +
            + since +
            +
            + 1.5.0 + +
            + +
            +
            + +
            Return values
            + mixed + — +
            + + +
            +
            + +
            +
            +
            +
            +

            Search results

            + +
            +
            +
              +
              +
              +
              +
              +
              + + +
              + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Settings.html b/docs/classes/MCI-Footnotes-Layout-Settings.html new file mode 100644 index 0000000..5b4da79 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Settings.html @@ -0,0 +1,3757 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
              +

              Documentation

              + + + + + +
              + +
              +
              + + + + +
              + + +
              +

              + MCI_Footnotes_Layout_Settings + + + extends MCI_Footnotes_LayoutEngine + + + + +

              + + + +

              Displays and handles all Settings of the Plugin.

              + +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + + + + + + +

              + Table of Contents + +

              + +
              +
              + $a_arr_Sections + +  : array<string|int, mixed> +
              +
              Stores all Sections for the child sub page.
              + +
              + $a_str_SubPageHook + +  : null|string +
              +
              Stores the Hook connection string for the child sub page.
              + +
              + CustomCSS() + +  : mixed +
              +
              Displays the custom css box.
              + +
              + CustomCSSMigration() + +  : mixed +
              +
              + +
              + CustomCSSNew() + +  : mixed +
              +
              + +
              + Description() + +  : mixed +
              +
              Output the Description of a section. May be overwritten in any section.
              + +
              + displayContent() + +  : mixed +
              +
              Displays the content of specific sub page.
              + +
              + Donate() + +  : mixed +
              +
              Displays all Donate button to support the developers.
              + +
              + Excerpts() + +  : mixed +
              +
              Displays the excerpt setting
              + +
              + getPriority() + +  : int +
              +
              Returns a Priority index. Lower numbers have a higher Priority.
              + +
              + Help() + +  : mixed +
              +
              Displays a short introduction of the Plugin.
              + +
              + HyperlinkArrow() + +  : mixed +
              +
              Displays all settings for the prepended symbol
              + +
              + LookupHooks() + +  : mixed +
              +
              Displays available Hooks to look for Footnote short codes.
              + +
              + Love() + +  : mixed +
              +
              Displays all settings for 'I love Footnotes'.
              + +
              + MouseOverBox() + +  : mixed +
              +
              Displays all settings for the footnotes mouse-over box.
              + +
              + MouseOverBoxAppearance() + +  : mixed +
              +
              + +
              + MouseOverBoxDimensions() + +  : mixed +
              +
              + +
              + MouseOverBoxPosition() + +  : mixed +
              +
              + +
              + MouseOverBoxText() + +  : mixed +
              +
              + +
              + MouseOverBoxTiming() + +  : mixed +
              +
              + +
              + MouseOverBoxTruncation() + +  : mixed +
              +
              + +
              + Numbering() + +  : mixed +
              +
              + +
              + ReferenceContainer() + +  : mixed +
              +
              Displays all settings for the reference container.
              + +
              + registerSections() + +  : mixed +
              +
              Registers all sections for a sub page.
              + +
              + registerSubPage() + +  : mixed +
              +
              Registers a sub page.
              + +
              + Scrolling() + +  : mixed +
              +
              + +
              + StartEnd() + +  : mixed +
              +
              Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior
              + +
              + Superscript() + +  : mixed +
              +
              Displays all settings for the footnote referrers
              + +
              + addCheckbox() + +  : string +
              +
              Returns the html tag for an input [type = checkbox].
              + +
              + addColorSelection() + +  : string +
              +
              Returns the html tag for an input [type = text] with color selection class.
              + +
              + addLabel() + +  : string +
              +
              Returns the html tag for an input/select label.
              + +
              + addLineSpace() + +  : string +
              +
              Returns a line break to have a space between two lines.
              + +
              + addMetaBox() + +  : array<string|int, mixed> +
              +
              Returns an array describing a meta box.
              + +
              + addNewline() + +  : string +
              +
              Returns a line break to start a new line.
              + +
              + addNumBox() + +  : string +
              +
              Returns the html tag for an input [type = num].
              + +
              + addSection() + +  : array<string|int, mixed> +
              +
              Returns an array describing a sub page section.
              + +
              + addSelectBox() + +  : string +
              +
              Returns the html tag for a select box.
              + +
              + addText() + +  : string +
              +
              Returns a simple text inside html <span> text.
              + +
              + addTextArea() + +  : string +
              +
              Returns the html tag for a text area.
              + +
              + addTextBox() + +  : string +
              +
              Returns the html tag for an input [type = text].
              + +
              + getMetaBoxes() + +  : array<string|int, mixed> +
              +
              Returns an array of all registered meta boxes for each section of the sub page.
              + +
              + getSections() + +  : array<string|int, mixed> +
              +
              Returns an array of all registered sections for the sub page.
              + +
              + getSubPageSlug() + +  : string +
              +
              Returns the unique slug of the sub page.
              + +
              + getSubPageTitle() + +  : string +
              +
              Returns the title of the sub page.
              + +
              + LoadSetting() + +  : array<string|int, mixed> +
              +
              Loads specific setting and returns an array with the keys [id, name, value].
              + +
              + appendScripts() + +  : mixed +
              +
              Append javascript and css files for specific sub page.
              + +
              + registerMetaBoxes() + +  : mixed +
              +
              Registers all Meta boxes for a sub page.
              + +
              + saveSettings() + +  : bool +
              +
              Save all Plugin settings.
              + +
              + + + + + + +
              +

              + Properties + +

              +
              +

              + $a_arr_Sections + + + +

              + + +

              Stores all Sections for the child sub page.

              + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              +
              +

              + $a_str_SubPageHook + + + +

              + + +

              Stores the Hook connection string for the child sub page.

              + + + protected + null|string + $a_str_SubPageHook + = +ull + +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              +
              + +
              +

              + Methods + +

              +
              +

              + CustomCSS() + +

              + + +

              Displays the custom css box.

              + + + public + CustomCSS() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited:

              +
              + +
              +
              + since +
              +
              + 2.1.6 + +

              drop localized notices for CSS classes as the number increased to 16 +list directly in the template, as CSS is in English anyway

              +
              + +
              +
              + since +
              +
              + 2.2.2 + +

              migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100

              +
              + +
              +
              + since +
              +
              + 2.3.0 + +

              say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100

              +
              + +
              +
              + since +
              +
              + 2.5.1 + +

              mention validity while visible, thanks to @rkupadhya bug report

              +
              + +
              +
              + see +
              +
              + +

              templates/dashboard/customize-css.html +2020-12-09T1113+0100

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + CustomCSSMigration() + +

              + + + + + public + CustomCSSMigration() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + CustomCSSNew() + +

              + + + + + public + CustomCSSNew() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Description() + +

              + + +

              Output the Description of a section. May be overwritten in any section.

              + + + public + Description() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + displayContent() + +

              + + +

              Displays the content of specific sub page.

              + + + public + displayContent() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Donate() + +

              + + +

              Displays all Donate button to support the developers.

              + + + public + Donate() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Excerpts() + +

              + + +

              Displays the excerpt setting

              + + + public + Excerpts() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited heading 2020-12-12T1453+0100

              +
              + +
              +
              + since +
              +
              + 2.1.1 + +

              more settings and notices, thanks to @nikelaos

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              dedicated to the excerpt setting and its notices 2020-12-12T1454+0100

              +
              + +
              +
              + 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 + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + getPriority() + +

              + + +

              Returns a Priority index. Lower numbers have a higher Priority.

              + + + public + getPriority() : int + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + int + — +
              + + +
              +
              +

              + Help() + +

              + + +

              Displays a short introduction of the Plugin.

              + + + public + Help() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + HyperlinkArrow() + +

              + + +

              Displays all settings for the prepended symbol

              + + + public + HyperlinkArrow() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited heading for v2.0.4

              +

              The former 'hyperlink arrow', incompatible with combined identical footnotes, +became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics +of the footnote number.

              +
              + +
              +
              + since +
              +
              + 2.1.4 + +

              moved to Settings > Reference container > Display a backlink symbol

              +
              + +
              +
              + since +
              +
              + 2.2.1 + +

              and 2.2.4 back here

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + LookupHooks() + +

              + + +

              Displays available Hooks to look for Footnote short codes.

              + + + public + LookupHooks() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.5 + +

              Edited:

              +
              + +
              +
              + since +
              +
              + 2.1.1 + +

              priority level setting for the_content 2020-11-16T2152+0100

              +
              + +
              +
              + since +
              +
              + 2.1.4 + +

              priority level settings for the other hooks 2020-11-19T1421+0100

              +

              priority level was initially hard-coded default +shows "9223372036854775807" in the numbox +empty should be interpreted as PHP_INT_MAX, +but a numbox cannot be set to empty: https://github.com/Modernizr/Modernizr/issues/171 +define -1 as PHP_INT_MAX instead

              +
              + +
              +
              + since +
              +
              + 2.2.9 + +

              removed the warning about the widget text hook 2020-12-25T0348+0100

              +
              + +
              +
              + since +
              +
              + 2.2.9 + +

              added guidance for the widget text hook 2020-12-25T0353+0100

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Love() + +

              + + +

              Displays all settings for 'I love Footnotes'.

              + + + public + Love() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited:

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              position-sensitive placeholders to support more locales 2020-12-11T0432+0100

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              more options 2020-12-11T0432+0100

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBox() + +

              + + +

              Displays all settings for the footnotes mouse-over box.

              + + + public + MouseOverBox() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.2 + +

              Edited:

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              5 parts to address increased settings number

              +
              + +
              +
              + since +
              +
              + 2.2.5 + +

              position settings for alternative tooltips

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxAppearance() + +

              + + + + + public + MouseOverBoxAppearance() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxDimensions() + +

              + + + + + public + MouseOverBoxDimensions() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxPosition() + +

              + + + + + public + MouseOverBoxPosition() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxText() + +

              + + + + + public + MouseOverBoxText() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxTiming() + +

              + + + + + public + MouseOverBoxTiming() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + MouseOverBoxTruncation() + +

              + + + + + public + MouseOverBoxTruncation() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Numbering() + +

              + + + + + public + Numbering() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + ReferenceContainer() + +

              + + +

              Displays all settings for the reference container.

              + + + public + ReferenceContainer() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Completed:

              +
              + +
              +
              + since +
              +
              + 2.1.4: + +

              layout and typography options 2020-11-30T0548+0100

              +
              + +
              +
              + since +
              +
              + 2.2.5 + +

              options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100

              +
              + +
              +
              + link +
              +
              + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + registerSections() + +

              + + +

              Registers all sections for a sub page.

              + + + public + registerSections() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + registerSubPage() + +

              + + +

              Registers a sub page.

              + + + public + registerSubPage() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Scrolling() + +

              + + + + + public + Scrolling() : mixed + + + + + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + StartEnd() + +

              + + +

              Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior

              + + + public + StartEnd() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited heading 2020-12-12T1412+0100

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              start/end short codes: more predefined options 2020-12-12T1412+0100

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              3 boxes for clarity 2020-12-12T1422+0100

              +
              + +
              +
              + since +
              +
              + 2.2.5 + +

              support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100

              +
              + +
              +
              + since +
              +
              + 2.4.0 + +

              added warning about Block Editor escapement disruption 2021-01-02T2324+0100

              +
              + +
              +
              + since +
              +
              + 2.4.0 + +

              removed the HTML comment tag option 2021-01-02T2325+0100

              +
              + +
              +
              + since +
              +
              + 2.5.0 + +

              Shortcode syntax validation: add more information around the setting, thanks to @andreasra

              +
              + +
              +
              + link +
              +
              + https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + +
              +
              + link +
              +
              + https://wordpress.org/support/topic/add-support-for-ibid-notation/ + +
              +
              + link +
              +
              + https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + Superscript() + +

              + + +

              Displays all settings for the footnote referrers

              + + + public + Superscript() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +

              Edited heading 2020-12-12T1513+0100

              +
              + +
              +
              + since +
              +
              + 2.1.1 + +

              option for superscript (optionally baseline referrers)

              +
              + +
              +
              + since +
              +
              + 2.2.0 + +

              option for link element moved here 2020-12-12T1514+0100

              +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + addCheckbox() + +

              + + +

              Returns the html tag for an input [type = checkbox].

              + + + protected + addCheckbox(string $p_str_SettingName) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre load the input field.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addColorSelection() + +

              + + +

              Returns the html tag for an input [type = text] with color selection class.

              + + + protected + addColorSelection(string $p_str_SettingName) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre load the input field.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.6 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addLabel() + +

              + + +

              Returns the html tag for an input/select label.

              + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to connect the Label with the input/select field.

              +
              + +
              +
              + $p_str_Caption + : string +
              +
              +

              Label caption.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + since +
              +
              + 2.1.6 + +

              no colon

              +
              + +
              +
              + +
              Return values
              + string + — +

              Edited 2020-12-01T0159+0100..

              +
              + + +
              +
              +

              + addLineSpace() + +

              + + +

              Returns a line break to have a space between two lines.

              + + + protected + addLineSpace() : string + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addMetaBox() + +

              + + +

              Returns an array describing a meta box.

              + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
              + +
              Parameters
              +
              +
              + $p_str_SectionID + : string +
              +
              +

              Parent Section ID.

              +
              + +
              +
              + $p_str_ID + : string +
              +
              +

              Unique ID suffix.

              +
              + +
              +
              + $p_str_Title + : string +
              +
              +

              Title for the meta box.

              +
              + +
              +
              + $p_str_CallbackFunctionName + : string +
              +
              +

              Class method name for callback.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + array<string|int, mixed> + — +

              meta box description to be able to append a meta box to the output.

              +
              + + +
              +
              +

              + addNewline() + +

              + + +

              Returns a line break to start a new line.

              + + + protected + addNewline() : string + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addNumBox() + +

              + + +

              Returns the html tag for an input [type = num].

              + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre load the input field.

              +
              + +
              +
              + $p_in_Min + : int +
              +
              +

              Minimum value.

              +
              + +
              +
              + $p_int_Max + : int +
              +
              +

              Maximum value.

              +
              + +
              +
              + $p_bool_Deci + : bool + = false
              +
              +

              true if 0.1 steps and floating to string, false if integer (default)

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + since +
              +
              + 2.1.4 + +

              step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

              +
              + +
              +
              + +
              Return values
              + string + — +

              Edited:

              +
              + + +
              +
              +

              + addSection() + +

              + + +

              Returns an array describing a sub page section.

              + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
              + +
              Parameters
              +
              +
              + $p_str_ID + : string +
              +
              +

              Unique ID suffix.

              +
              + +
              +
              + $p_str_Title + : string +
              +
              +

              Title of the section.

              +
              + +
              +
              + $p_int_SettingsContainerIndex + : int +
              +
              +

              Settings Container Index.

              +
              + +
              +
              + $p_bool_hasSubmitButton + : bool + = true
              +
              +

              Should a Submit Button be displayed for this section, default: true.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + array<string|int, mixed> + — +

              Array describing the section.

              +
              + + +
              +
              +

              + addSelectBox() + +

              + + +

              Returns the html tag for a select box.

              + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre select the current value.

              +
              + +
              +
              + $p_arr_Options + : array<string|int, mixed> +
              +
              +

              Possible options to be selected.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addText() + +

              + + +

              Returns a simple text inside html <span> text.

              + + + protected + addText(string $p_str_Text) : string + +
              + +
              Parameters
              +
              +
              + $p_str_Text + : string +
              +
              +

              Message to be surrounded with simple html tag (span).

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addTextArea() + +

              + + +

              Returns the html tag for a text area.

              + + + protected + addTextArea(string $p_str_SettingName) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre fill the text area.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + addTextBox() + +

              + + +

              Returns the html tag for an input [type = text].

              + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
              + +
              Parameters
              +
              +
              + $p_str_SettingName + : string +
              +
              +

              Name of the Settings key to pre load the input field.

              +
              + +
              +
              + $p_str_MaxLength + : int + = 999
              +
              +

              Maximum length of the input, default 999 characters.

              +
              + +
              +
              + $p_bool_Readonly + : bool + = false
              +
              +

              Set the input to be read only, default false.

              +
              + +
              +
              + $p_bool_Hidden + : bool + = false
              +
              +

              Set the input to be hidden, default false.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + getMetaBoxes() + +

              + + +

              Returns an array of all registered meta boxes for each section of the sub page.

              + + + protected + getMetaBoxes() : array<string|int, mixed> + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + since +
              +
              + 2.0.0 + +

              discontinued

              +
              + +
              +
              + since +
              +
              + 2.0.4 + +

              restored to meet user demand for arrow symbol semantics

              +
              + +
              +
              + since +
              +
              + 2.1.4 + +

              discontinued, content moved to Settings > Reference container > Display a backlink symbol

              +
              + +
              +
              + since +
              +
              + 2.0.4 + +

              to reflect changes in meta box label display since WPv5.5 +spans need position:fixed and become unlocalizable +fix: logo is kept only in the label that doesn’t need to be translated: +Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5

              +
              + +
              +
              + since +
              +
              + 2.1.6 + +

              / 2.2.0 tabs reordered and renamed

              +
              + +
              +
              + see +
              +
              + details + +

              in class/config.php

              +
              + +
              +
              + +
              Return values
              + array<string|int, mixed> + — +

              Edited for 2.0.0 and later.

              +

              HyperlinkArrow meta box:

              +
              + + +
              +
              +

              + getSections() + +

              + + +

              Returns an array of all registered sections for the sub page.

              + + + protected + getSections() : array<string|int, mixed> + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + since +
              +
              + 2.1.6 + +

              tabs reordered and renamed

              +
              + +
              +
              + since +
              +
              + 2.1.6 + +

              removed if statement around expert tab

              +
              + +
              +
              + link +
              +
              + https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each + +
              +
              + +
              Return values
              + array<string|int, mixed> + — +

              Edited:

              +
              + + +
              +
              +

              + getSubPageSlug() + +

              + + +

              Returns the unique slug of the sub page.

              + + + protected + getSubPageSlug() : string + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + getSubPageTitle() + +

              + + +

              Returns the title of the sub page.

              + + + protected + getSubPageTitle() : string + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + string + — +
              + + +
              +
              +

              + LoadSetting() + +

              + + +

              Loads specific setting and returns an array with the keys [id, name, value].

              + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
              + +
              Parameters
              +
              +
              + $p_str_SettingKeyName + : string +
              +
              +

              Settings Array key name.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + array<string|int, mixed> + — +

              Contains Settings ID, Settings Name and Settings Value.

              +
              + + +
              +
              +

              + appendScripts() + +

              + + +

              Append javascript and css files for specific sub page.

              + + + private + appendScripts() : mixed + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + registerMetaBoxes() + +

              + + +

              Registers all Meta boxes for a sub page.

              + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
              + +
              Parameters
              +
              +
              + $p_str_ParentID + : string +
              +
              +

              Parent section unique id.

              +
              + +
              +
              + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + mixed + — +
              + + +
              +
              +

              + saveSettings() + +

              + + +

              Save all Plugin settings.

              + + + private + saveSettings() : bool + +
              + + + +
              + Tags + +
              +
              +
              + author +
              +
              + +

              Stefan Herndler

              +
              + +
              +
              + since +
              +
              + 1.5.0 + +
              + +
              +
              + +
              Return values
              + bool + — +
              + + +
              +
              + +
              +
              +
              +
              +

              Search results

              + +
              +
              +
                +
                +
                +
                +
                +
                + + +
                + + + + diff --git a/docs/classes/MCI-Footnotes-LayoutEngine.html b/docs/classes/MCI-Footnotes-LayoutEngine.html new file mode 100644 index 0000000..ff9e0f2 --- /dev/null +++ b/docs/classes/MCI-Footnotes-LayoutEngine.html @@ -0,0 +1,2222 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                +

                Documentation

                + + + + + +
                + +
                +
                + + + + +
                + + +
                +

                + MCI_Footnotes_LayoutEngine + + + + +

                + + + +

                Layout Engine for the administration dashboard.

                + +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + + + + + + +

                + Table of Contents + +

                + +
                +
                + $a_arr_Sections + +  : array<string|int, mixed> +
                +
                Stores all Sections for the child sub page.
                + +
                + $a_str_SubPageHook + +  : null|string +
                +
                Stores the Hook connection string for the child sub page.
                + +
                + Description() + +  : mixed +
                +
                Output the Description of a section. May be overwritten in any section.
                + +
                + displayContent() + +  : mixed +
                +
                Displays the content of specific sub page.
                + +
                + getPriority() + +  : int +
                +
                Returns a Priority index. Lower numbers have a higher Priority.
                + +
                + registerSections() + +  : mixed +
                +
                Registers all sections for a sub page.
                + +
                + registerSubPage() + +  : mixed +
                +
                Registers a sub page.
                + +
                + addCheckbox() + +  : string +
                +
                Returns the html tag for an input [type = checkbox].
                + +
                + addColorSelection() + +  : string +
                +
                Returns the html tag for an input [type = text] with color selection class.
                + +
                + addLabel() + +  : string +
                +
                Returns the html tag for an input/select label.
                + +
                + addLineSpace() + +  : string +
                +
                Returns a line break to have a space between two lines.
                + +
                + addMetaBox() + +  : array<string|int, mixed> +
                +
                Returns an array describing a meta box.
                + +
                + addNewline() + +  : string +
                +
                Returns a line break to start a new line.
                + +
                + addNumBox() + +  : string +
                +
                Returns the html tag for an input [type = num].
                + +
                + addSection() + +  : array<string|int, mixed> +
                +
                Returns an array describing a sub page section.
                + +
                + addSelectBox() + +  : string +
                +
                Returns the html tag for a select box.
                + +
                + addText() + +  : string +
                +
                Returns a simple text inside html <span> text.
                + +
                + addTextArea() + +  : string +
                +
                Returns the html tag for a text area.
                + +
                + addTextBox() + +  : string +
                +
                Returns the html tag for an input [type = text].
                + +
                + getMetaBoxes() + +  : array<string|int, mixed> +
                +
                Returns an array of all registered meta boxes.
                + +
                + getSections() + +  : array<string|int, mixed> +
                +
                Returns an array of all registered sections for a sub page.
                + +
                + getSubPageSlug() + +  : string +
                +
                Returns the unique slug of the child sub page.
                + +
                + getSubPageTitle() + +  : string +
                +
                Returns the title of the child sub page.
                + +
                + LoadSetting() + +  : array<string|int, mixed> +
                +
                Loads specific setting and returns an array with the keys [id, name, value].
                + +
                + appendScripts() + +  : mixed +
                +
                Append javascript and css files for specific sub page.
                + +
                + registerMetaBoxes() + +  : mixed +
                +
                Registers all Meta boxes for a sub page.
                + +
                + saveSettings() + +  : bool +
                +
                Save all Plugin settings.
                + +
                + + + + + + +
                +

                + Properties + +

                +
                +

                + $a_arr_Sections + + + +

                + + +

                Stores all Sections for the child sub page.

                + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                +
                +

                + $a_str_SubPageHook + + + +

                + + +

                Stores the Hook connection string for the child sub page.

                + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                +
                + +
                +

                + Methods + +

                +
                +

                + Description() + +

                + + +

                Output the Description of a section. May be overwritten in any section.

                + + + public + Description() : mixed + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + displayContent() + +

                + + +

                Displays the content of specific sub page.

                + + + public + displayContent() : mixed + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + getPriority() + +

                + + +

                Returns a Priority index. Lower numbers have a higher Priority.

                + + + public + abstract getPriority() : int + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + int + — +
                + + +
                +
                +

                + registerSections() + +

                + + +

                Registers all sections for a sub page.

                + + + public + registerSections() : mixed + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + registerSubPage() + +

                + + +

                Registers a sub page.

                + + + public + registerSubPage() : mixed + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + addCheckbox() + +

                + + +

                Returns the html tag for an input [type = checkbox].

                + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre load the input field.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addColorSelection() + +

                + + +

                Returns the html tag for an input [type = text] with color selection class.

                + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre load the input field.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.6 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addLabel() + +

                + + +

                Returns the html tag for an input/select label.

                + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to connect the Label with the input/select field.

                +
                + +
                +
                + $p_str_Caption + : string +
                +
                +

                Label caption.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + since +
                +
                + 2.1.6 + +

                no colon

                +
                + +
                +
                + +
                Return values
                + string + — +

                Edited 2020-12-01T0159+0100..

                +
                + + +
                +
                +

                + addLineSpace() + +

                + + +

                Returns a line break to have a space between two lines.

                + + + protected + addLineSpace() : string + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addMetaBox() + +

                + + +

                Returns an array describing a meta box.

                + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                + +
                Parameters
                +
                +
                + $p_str_SectionID + : string +
                +
                +

                Parent Section ID.

                +
                + +
                +
                + $p_str_ID + : string +
                +
                +

                Unique ID suffix.

                +
                + +
                +
                + $p_str_Title + : string +
                +
                +

                Title for the meta box.

                +
                + +
                +
                + $p_str_CallbackFunctionName + : string +
                +
                +

                Class method name for callback.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + array<string|int, mixed> + — +

                meta box description to be able to append a meta box to the output.

                +
                + + +
                +
                +

                + addNewline() + +

                + + +

                Returns a line break to start a new line.

                + + + protected + addNewline() : string + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addNumBox() + +

                + + +

                Returns the html tag for an input [type = num].

                + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre load the input field.

                +
                + +
                +
                + $p_in_Min + : int +
                +
                +

                Minimum value.

                +
                + +
                +
                + $p_int_Max + : int +
                +
                +

                Maximum value.

                +
                + +
                +
                + $p_bool_Deci + : bool + = false
                +
                +

                true if 0.1 steps and floating to string, false if integer (default)

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + since +
                +
                + 2.1.4 + +

                step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                +
                + +
                +
                + +
                Return values
                + string + — +

                Edited:

                +
                + + +
                +
                +

                + addSection() + +

                + + +

                Returns an array describing a sub page section.

                + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                + +
                Parameters
                +
                +
                + $p_str_ID + : string +
                +
                +

                Unique ID suffix.

                +
                + +
                +
                + $p_str_Title + : string +
                +
                +

                Title of the section.

                +
                + +
                +
                + $p_int_SettingsContainerIndex + : int +
                +
                +

                Settings Container Index.

                +
                + +
                +
                + $p_bool_hasSubmitButton + : bool + = true
                +
                +

                Should a Submit Button be displayed for this section, default: true.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + array<string|int, mixed> + — +

                Array describing the section.

                +
                + + +
                +
                +

                + addSelectBox() + +

                + + +

                Returns the html tag for a select box.

                + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre select the current value.

                +
                + +
                +
                + $p_arr_Options + : array<string|int, mixed> +
                +
                +

                Possible options to be selected.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addText() + +

                + + +

                Returns a simple text inside html <span> text.

                + + + protected + addText(string $p_str_Text) : string + +
                + +
                Parameters
                +
                +
                + $p_str_Text + : string +
                +
                +

                Message to be surrounded with simple html tag (span).

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addTextArea() + +

                + + +

                Returns the html tag for a text area.

                + + + protected + addTextArea(string $p_str_SettingName) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre fill the text area.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + addTextBox() + +

                + + +

                Returns the html tag for an input [type = text].

                + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                + +
                Parameters
                +
                +
                + $p_str_SettingName + : string +
                +
                +

                Name of the Settings key to pre load the input field.

                +
                + +
                +
                + $p_str_MaxLength + : int + = 999
                +
                +

                Maximum length of the input, default 999 characters.

                +
                + +
                +
                + $p_bool_Readonly + : bool + = false
                +
                +

                Set the input to be read only, default false.

                +
                + +
                +
                + $p_bool_Hidden + : bool + = false
                +
                +

                Set the input to be hidden, default false.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + getMetaBoxes() + +

                + + +

                Returns an array of all registered meta boxes.

                + + + protected + abstract getMetaBoxes() : array<string|int, mixed> + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + array<string|int, mixed> + — +
                + + +
                +
                +

                + getSections() + +

                + + +

                Returns an array of all registered sections for a sub page.

                + + + protected + abstract getSections() : array<string|int, mixed> + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + array<string|int, mixed> + — +
                + + +
                +
                +

                + getSubPageSlug() + +

                + + +

                Returns the unique slug of the child sub page.

                + + + protected + abstract getSubPageSlug() : string + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + getSubPageTitle() + +

                + + +

                Returns the title of the child sub page.

                + + + protected + abstract getSubPageTitle() : string + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + string + — +
                + + +
                +
                +

                + LoadSetting() + +

                + + +

                Loads specific setting and returns an array with the keys [id, name, value].

                + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                + +
                Parameters
                +
                +
                + $p_str_SettingKeyName + : string +
                +
                +

                Settings Array key name.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + array<string|int, mixed> + — +

                Contains Settings ID, Settings Name and Settings Value.

                +
                + + +
                +
                +

                + appendScripts() + +

                + + +

                Append javascript and css files for specific sub page.

                + + + private + appendScripts() : mixed + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + registerMetaBoxes() + +

                + + +

                Registers all Meta boxes for a sub page.

                + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                + +
                Parameters
                +
                +
                + $p_str_ParentID + : string +
                +
                +

                Parent section unique id.

                +
                + +
                +
                + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + mixed + — +
                + + +
                +
                +

                + saveSettings() + +

                + + +

                Save all Plugin settings.

                + + + private + saveSettings() : bool + +
                + + + +
                + Tags + +
                +
                +
                + author +
                +
                + +

                Stefan Herndler

                +
                + +
                +
                + since +
                +
                + 1.5.0 + +
                + +
                +
                + +
                Return values
                + bool + — +
                + + +
                +
                + +
                +
                +
                +
                +

                Search results

                + +
                +
                +
                  +
                  +
                  +
                  +
                  +
                  + + +
                  + + + + diff --git a/docs/classes/MCI-Footnotes-Settings.html b/docs/classes/MCI-Footnotes-Settings.html new file mode 100644 index 0000000..e436525 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Settings.html @@ -0,0 +1,6221 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                  +

                  Documentation

                  + + + + + +
                  + +
                  +
                  + + + + +
                  + + +
                  +

                  + MCI_Footnotes_Settings + + + + +

                  + + + +

                  Loads the settings values, sets to default values if undefined.

                  + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + + + + + + +

                  + Table of Contents + +

                  + +
                  +
                  + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_max_width_enabled" +
                  +
                  + +
                  + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_width_enabled" +
                  +
                  + +
                  + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + +  = "footnotes_inputfield_backlinks_line_breaks_enabled" +
                  +
                  + +
                  + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + +  = "footnotes_inputfield_backlinks_separator_enabled" +
                  +
                  + +
                  + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + +  = "footnotes_inputfield_backlinks_terminator_enabled" +
                  +
                  + +
                  + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +  = "footnote_inputfield_combine_identical" +
                  +
                  Settings Container Key for combining identical footnotes.
                  + +
                  + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +  = "footnote_inputfield_custom_css_legacy_enable" +
                  +
                  Settings Container Key to enable display of legacy Custom CSS metaboxes.
                  + +
                  + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +  = "footnote_inputfield_expert_lookup_the_content" +
                  +
                  Settings Container Key to enable the 'the_content' hook.
                  + +
                  + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +  = "footnote_inputfield_expert_lookup_the_excerpt" +
                  +
                  Settings Container Key to enable the 'the_excerpt' hook.
                  + +
                  + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +  = "footnote_inputfield_expert_lookup_the_title" +
                  +
                  Settings Container Key to enable the 'the_title' hook.
                  + +
                  + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +  = "footnote_inputfield_expert_lookup_widget_text" +
                  +
                  Settings Container Key to enable the 'widget_text' hook.
                  + +
                  + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +  = "footnote_inputfield_expert_lookup_widget_title" +
                  +
                  Settings Container Key to enable the 'widget_title' hook.
                  + +
                  + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +  = "footnotes_inputfield_shortcode_syntax_validation_enable" +
                  +
                  Settings container key for shortcode syntax validation.
                  + +
                  + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +  = "footnote_inputfield_url_wrap_enabled" +
                  +
                  Settings Container Key for URL wrap option
                  + +
                  + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + +  = "footnotes_inputfield_backlink_tooltip_enable" +
                  +
                  Settings container key to enable backlink tooltips.
                  + +
                  + C_BOOL_FOOTNOTES_EXPERT_MODE + +  = "footnote_inputfield_enable_expert_mode" +
                  +
                  Settings Container Key for the Expert mode.
                  + +
                  + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + +  = "footnotes_inputfield_hard_links_enable" +
                  +
                  + +
                  + C_BOOL_FOOTNOTES_IN_EXCERPT + +  = "footnote_inputfield_search_in_excerpt" +
                  +
                  Settings Container Key to look for footnotes in post excerpts.
                  + +
                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +  = "footnote_inputfield_custom_mouse_over_box_alternative" +
                  +
                  Settings Container Key to enable the alternative tooltips.
                  + +
                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_enabled" +
                  +
                  Settings Container Key to enable the mouse-over box.
                  + +
                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" +
                  +
                  Settings Container Key to enable tooltip truncation.
                  + +
                  + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +  = "footnotes_inputfield_referrer_superscript_tags" +
                  +
                  Settings Container Key for the referrer element.
                  + +
                  + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +  = "footnotes_inputfield_tooltip_excerpt_mirror_enable" +
                  +
                  Settings container key to enable mirroring the tooltip excerpt in the reference container.
                  + +
                  + C_BOOL_LINK_ELEMENT_ENABLED + +  = "footnote_inputfield_link_element_enabled" +
                  +
                  Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations
                  + +
                  + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +  = "footnotes_inputfield_mouse_over_box_font_size_enabled" +
                  +
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +  = "footnotes_inputfield_reference_container_3column_layout_enable" +
                  +
                  Settings Container Key to enable the legacy layout of the reference container.
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + +  = "footnotes_inputfield_reference_container_backlink_symbol_enable" +
                  +
                  Settings Container Key to enable the display of a backlink symbol.
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + +  = "footnotes_inputfield_reference_container_backlink_symbol_switch" +
                  +
                  Settings Container Key to get the backlink symbol switch side.
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +  = "footnote_inputfield_collapse_references" +
                  +
                  Settings Container Key to collapse the reference container by default.
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +  = "footnotes_inputfield_reference_container_label_bottom_border" +
                  +
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +  = "footnotes_inputfield_reference_container_row_borders_enable" +
                  +
                  Settings Container Key for table cell borders, thanks to @noobishh
                  + +
                  + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +  = "footnotes_inputfield_reference_container_start_page_enable" +
                  +
                  Settings Container Key to not display the reference container on the homepage.
                  + +
                  + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +  = "footnotes_inputfield_mouse_over_box_font_size_scalar" +
                  +
                  + +
                  + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_max_width_scalar" +
                  +
                  + +
                  + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_width_scalar" +
                  +
                  + +
                  + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_content_priority_level" +
                  +
                  Settings Container Key for 'the_content' hook priority level.
                  + +
                  + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" +
                  +
                  + +
                  + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_title_priority_level" +
                  +
                  Settings Container Key for '' hook priority level
                  + +
                  + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_text_priority_level" +
                  +
                  + +
                  + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_title_priority_level" +
                  +
                  + +
                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_x" +
                  +
                  + +
                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_y" +
                  +
                  + +
                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +  = "footnotes_inputfield_alternative_mouse_over_box_width" +
                  +
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +  = "footnote_inputfield_custom_mouse_over_box_border_radius" +
                  +
                  Settings Container Key for the mouse-over box to define the border radius.
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_border_width" +
                  +
                  Settings Container Key for the mouse-over box to define the border width.
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_length" +
                  +
                  Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_max_width" +
                  +
                  Settings Container Key for the mouse-over box to define the max. width.
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +  = "footnote_inputfield_custom_mouse_over_box_offset_x" +
                  +
                  Settings Container Key for the mouse-over box to define the offset (x).
                  + +
                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnote_inputfield_custom_mouse_over_box_offset_y" +
                  +
                  Settings Container Key for the mouse-over box to define the offset (y).
                  + +
                  + C_INT_FOOTNOTES_SCROLL_DURATION + +  = "footnotes_inputfield_scroll_duration" +
                  +
                  + +
                  + C_INT_FOOTNOTES_SCROLL_OFFSET + +  = "footnotes_inputfield_scroll_offset" +
                  +
                  Scroll offset and duration
                  + +
                  + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_in_delay" +
                  +
                  + +
                  + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_in_duration" +
                  +
                  + +
                  + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_out_delay" +
                  +
                  + +
                  + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_out_duration" +
                  +
                  + +
                  + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +  = "footnotes_inputfield_reference_container_bottom_margin" +
                  +
                  + +
                  + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +  = "footnotes_inputfield_reference_container_top_margin" +
                  +
                  Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes
                  + +
                  + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_max_width_unit" +
                  +
                  + +
                  + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_width_unit" +
                  +
                  + +
                  + C_STR_BACKLINKS_SEPARATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_separator_custom" +
                  +
                  + +
                  + C_STR_BACKLINKS_SEPARATOR_OPTION + +  = "footnotes_inputfield_backlinks_separator_option" +
                  +
                  + +
                  + C_STR_BACKLINKS_TERMINATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_terminator_custom" +
                  +
                  + +
                  + C_STR_BACKLINKS_TERMINATOR_OPTION + +  = "footnotes_inputfield_backlinks_terminator_option" +
                  +
                  + +
                  + C_STR_CUSTOM_CSS + +  = "footnote_inputfield_custom_css" +
                  +
                  Settings Container Key for the Custom CSS.
                  + +
                  + C_STR_CUSTOM_CSS_NEW + +  = "footnote_inputfield_custom_css_new" +
                  +
                  Settings Container Key for the Custom CSS migrated to a dedicated tab.
                  + +
                  + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_footnote_fragment_id_slug" +
                  +
                  + +
                  + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +  = "footnotes_inputfield_referrers_normal_superscript" +
                  +
                  Settings container key to enable superscript style normalization.
                  + +
                  + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +  = "footnotes_inputfield_alternative_mouse_over_box_position" +
                  +
                  Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer
                  + +
                  + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + +  = "footnotes_inputfield_backlink_tooltip_text" +
                  +
                  Settings container key to configure the backlink tooltip.
                  + +
                  + C_STR_FOOTNOTES_COUNTER_STYLE + +  = "footnote_inputfield_counter_style" +
                  +
                  Settings Container Key for the counter style of the footnotes.
                  + +
                  + C_STR_FOOTNOTES_LOVE + +  = "footnote_inputfield_love" +
                  +
                  Settings Container Key for the 'I love footnotes' text.
                  + +
                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +  = "footnote_inputfield_custom_mouse_over_box_background" +
                  +
                  Settings Container Key for the mouse-over box to define the background color.
                  + +
                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_border_color" +
                  +
                  Settings Container Key for the mouse-over box to define the border color.
                  + +
                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_color" +
                  +
                  Settings Container Key for the mouse-over box to define the color.
                  + +
                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +  = "footnote_inputfield_custom_mouse_over_box_position" +
                  +
                  Settings Container Key for the mouse-over box to define the position.
                  + +
                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_shadow_color" +
                  +
                  Settings Container Key for the mouse-over box to define the box-shadow color.
                  + +
                  + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +  = "footnotes_inputfield_page_layout_support" +
                  +
                  + +
                  + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +  = "footnotes_inputfield_reference_container_script_mode" +
                  +
                  Settings container key to select the script mode for the reference container.
                  + +
                  + C_STR_FOOTNOTES_SHORT_CODE_END + +  = "footnote_inputfield_placeholder_end" +
                  +
                  Settings Container Key for the short code of the footnote’s end.
                  + +
                  + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +  = "footnote_inputfield_placeholder_end_user_defined" +
                  +
                  Settings Container Key for the user-defined short code of the footnotes end.
                  + +
                  + C_STR_FOOTNOTES_SHORT_CODE_START + +  = "footnote_inputfield_placeholder_start" +
                  +
                  Settings Container Key for the short code of the footnote’s start.
                  + +
                  + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +  = "footnote_inputfield_placeholder_start_user_defined" +
                  +
                  Settings Container Key for the user-defined short code of the footnotes start.
                  + +
                  + C_STR_FOOTNOTES_STYLING_AFTER + +  = "footnote_inputfield_custom_styling_after" +
                  +
                  Settings Container Key for the string after the footnote referrer.
                  + +
                  + C_STR_FOOTNOTES_STYLING_BEFORE + +  = "footnote_inputfield_custom_styling_before" +
                  +
                  Settings Container Key for the string before the footnote referrer.
                  + +
                  + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +  = "footnotes_inputfield_tooltip_excerpt_delimiter" +
                  +
                  Settings container key to configure the tooltip excerpt delimiter.
                  + +
                  + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +  = "footnotes_inputfield_tooltip_excerpt_mirror_separator" +
                  +
                  Settings container key to configure the tooltip excerpt separator in the reference container.
                  + +
                  + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +  = "footnote_inputfield_readon_label" +
                  +
                  Settings Container Key for the label of the Read-on button in truncated tooltips.
                  + +
                  + C_STR_HARD_LINK_IDS_SEPARATOR + +  = "footnotes_inputfield_hard_link_ids_separator" +
                  +
                  + +
                  + C_STR_HYPERLINK_ARROW + +  = "footnote_inputfield_custom_hyperlink_symbol" +
                  +
                  Settings Container Key for the backlink symbol selection.
                  + +
                  + C_STR_HYPERLINK_ARROW_USER_DEFINED + +  = "footnote_inputfield_custom_hyperlink_symbol_user" +
                  +
                  Settings Container Key for the user-defined backlink symbol.
                  + +
                  + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +  = "footnotes_inputfield_mouse_over_box_font_size_unit" +
                  +
                  + +
                  + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +  = "footnotes_inputfield_reference_container_label_element" +
                  +
                  + +
                  + C_STR_REFERENCE_CONTAINER_NAME + +  = "footnote_inputfield_references_label" +
                  +
                  Settings Container Key for the label of the reference container.
                  + +
                  + C_STR_REFERENCE_CONTAINER_POSITION + +  = "footnote_inputfield_reference_container_place" +
                  +
                  Settings Container Key for the position of the reference container.
                  + +
                  + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +  = "footnote_inputfield_reference_container_position_shortcode" +
                  +
                  Settings Container Key for reference container position shortcode
                  + +
                  + C_STR_REFERRER_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_referrer_fragment_id_slug" +
                  +
                  + +
                  + $a_arr_Container + +  : array<string|int, mixed> +
                  +
                  Contains all Settings Container names.
                  + +
                  + $a_arr_Default + +  : array<string|int, mixed> +
                  +
                  Contains all Default Settings for each Settings Container.
                  + +
                  + $a_arr_Settings + +  : array<string|int, mixed> +
                  +
                  Contains all Settings from each Settings container as soon as this class is initialized.
                  + +
                  + $a_obj_Instance + +  : MCI_Footnotes_Settings +
                  +
                  Stores a singleton reference of this class.
                  + +
                  + ClearAll() + +  : mixed +
                  +
                  Deletes each Settings Container and loads the default values for each Settings Container.
                  + +
                  + get() + +  : mixed +
                  +
                  Returns the value of specified Settings name.
                  + +
                  + getContainer() + +  : str +
                  +
                  Returns the name of a specified Settings Container.
                  + +
                  + getDefaults() + +  : array<string|int, mixed> +
                  +
                  Returns the default values of a specific Settings Container.
                  + +
                  + instance() + +  : MCI_Footnotes_Settings +
                  +
                  Returns a singleton of this class.
                  + +
                  + RegisterSettings() + +  : mixed +
                  +
                  Register all Settings Container for the Plugin Settings Page in the Dashboard.
                  + +
                  + saveOptions() + +  : bool +
                  +
                  Updates a whole Settings container.
                  + +
                  + __construct() + +  : mixed +
                  +
                  Class Constructor. Loads all Settings from each WordPress Settings container.
                  + +
                  + Load() + +  : array<string|int, mixed> +
                  +
                  Loads all Settings from specified Settings Container.
                  + +
                  + loadAll() + +  : mixed +
                  +
                  Loads all Settings from each Settings container.
                  + +
                  + + + + +
                  +

                  + Constants + +

                  +
                  + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_max_width_enabled" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_width_enabled" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + = "footnotes_inputfield_backlinks_line_breaks_enabled" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + = "footnotes_inputfield_backlinks_separator_enabled" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + = "footnotes_inputfield_backlinks_terminator_enabled" + + + + + + +
                  +
                  +

                  + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +

                  + + + +

                  Settings Container Key for combining identical footnotes.

                  + + + public + str + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + = "footnote_inputfield_combine_identical" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +

                  + + + +

                  Settings Container Key to enable display of legacy Custom CSS metaboxes.

                  + + + public + str + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + = "footnote_inputfield_custom_css_legacy_enable" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.2.2 + +
                  + +
                  +
                  + since +
                  +
                  + 2.3.0 + +

                  swap Boolean from 'migration complete' to 'show legacy'

                  +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-12-15T0520+0100

                  +
                  + +
                  +
                  + 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 toBool() converts empty to false.

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +

                  + + + +

                  Settings Container Key to enable the 'the_content' hook.

                  + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + = "footnote_inputfield_expert_lookup_the_content" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +

                  + + + +

                  Settings Container Key to enable the 'the_excerpt' hook.

                  + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + = "footnote_inputfield_expert_lookup_the_excerpt" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +

                  + + + +

                  Settings Container Key to enable the 'the_title' hook.

                  + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_TITLE + = "footnote_inputfield_expert_lookup_the_title" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +

                  + + + +

                  Settings Container Key to enable the 'widget_text' hook.

                  + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + = "footnote_inputfield_expert_lookup_widget_text" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +

                  + + + +

                  Settings Container Key to enable the 'widget_title' hook.

                  + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + = "footnote_inputfield_expert_lookup_widget_title" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +

                  + + + +

                  Settings container key for shortcode syntax validation.

                  + + + public + str + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + = "footnotes_inputfield_shortcode_syntax_validation_enable" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.4.0 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2021-01-01T0616+0100

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +

                  + + + +

                  Settings Container Key for URL wrap option

                  + + + public + str + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + = "footnote_inputfield_url_wrap_enabled" + + + +

                  This is made optional because it causes weird line breaks. +Unicode-compliant browsers break URLs at slashes.

                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.6 + +
                  + +
                  +
                  + +
                  +
                  + + + + +

                  Settings container key to enable backlink tooltips.

                  + + + public + str + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + = "footnotes_inputfield_backlink_tooltip_enable" + + + +
                    +
                  • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @theroninjedi47

                  +
                  + +
                  +
                  + link +
                  +
                  +

                  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 + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_EXPERT_MODE + +

                  + + + +

                  Settings Container Key for the Expert mode.

                  + + + public + str + C_BOOL_FOOTNOTES_EXPERT_MODE + = "footnote_inputfield_enable_expert_mode" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.5 + +
                  + +
                  +
                  + 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.

                  +
                  + +
                  +
                  + +
                  +
                  + + + + + + + public + mixed + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + = "footnotes_inputfield_hard_links_enable" + + + + + + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_IN_EXCERPT + +

                  + + + +

                  Settings Container Key to look for footnotes in post excerpts.

                  + + + public + str + C_BOOL_FOOTNOTES_IN_EXCERPT + = "footnote_inputfield_search_in_excerpt" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +

                  + + + +

                  Settings Container Key to enable the alternative tooltips.

                  + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + = "footnote_inputfield_custom_mouse_over_box_alternative" + + + +
                    +
                  • Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-11T1817+0100

                  +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @andreasra

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +

                  + + + +

                  Settings Container Key to enable the mouse-over box.

                  + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + = "footnote_inputfield_custom_mouse_over_box_enabled" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.2 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +

                  + + + +

                  Settings Container Key to enable tooltip truncation.

                  + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.4 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +

                  + + + +

                  Settings Container Key for the referrer element.

                  + + + public + str + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + = "footnotes_inputfield_referrer_superscript_tags" + + + +
                    +
                  • Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-16T0859+0100

                  +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @cwbayer

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +

                  + + + +

                  Settings container key to enable mirroring the tooltip excerpt in the reference container.

                  + + + public + str + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + = "footnotes_inputfield_tooltip_excerpt_mirror_enable" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + link +
                  +
                  +

                  But this must not be the default behavior.

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/change-tooltip-text/#post-13935488 + +
                  +
                  + +
                  +
                  + + + + +

                  Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations

                  + + + public + str|bool|int|flo + C_BOOL_LINK_ELEMENT_ENABLED + = "footnote_inputfield_link_element_enabled" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.4 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +

                  + + + + + + public + mixed + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + = "footnotes_inputfield_mouse_over_box_font_size_enabled" + + + + + + +
                  +
                  +

                  + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +

                  + + + +

                  Settings Container Key to enable the legacy layout of the reference container.

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + = "footnotes_inputfield_reference_container_3column_layout_enable" + + + +
                    +
                  • Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + +
                  +
                  + + + + +

                  Settings Container Key to enable the display of a backlink symbol.

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + = "footnotes_inputfield_reference_container_backlink_symbol_enable" + + + +
                    +
                  • Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @spaceling

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 + +
                  +
                  + +
                  +
                  + + + + +

                  Settings Container Key to get the backlink symbol switch side.

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + = "footnotes_inputfield_reference_container_backlink_symbol_switch" + + + +
                    +
                  • Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-16T2024+0100

                  +
                  + +
                  +
                  + contributor +
                  +
                  + +

                  @spaceling

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/change-the-position-5/#post-13615994 + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +

                  + + + +

                  Settings Container Key to collapse the reference container by default.

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + = "footnote_inputfield_collapse_references" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + see +
                  +
                  + MCI_Footnotes_Convert::toBool() + +

                  The type in the variable name is useful to show the intention.

                  +
                  + +
                  +
                  + todo +
                  +
                  + +

                  Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +

                  + + + + + + public + mixed + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + = "footnotes_inputfield_reference_container_label_bottom_border" + + + + + + +
                  +
                  +

                  + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +

                  + + + +

                  Settings Container Key for table cell borders, thanks to @noobishh

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + = "footnotes_inputfield_reference_container_row_borders_enable" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/borders-25/ + +
                  +
                  + since +
                  +
                  + 2.2.10 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +

                  + + + +

                  Settings Container Key to not display the reference container on the homepage.

                  + + + public + str + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + = "footnotes_inputfield_reference_container_start_page_enable" + + + +
                    +
                  • Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @dragon013

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/ + +
                  +
                  + +
                  +
                  +

                  + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +

                  + + + + + + public + mixed + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + = "footnotes_inputfield_mouse_over_box_font_size_scalar" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_max_width_scalar" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_width_scalar" + + + + + + +
                  +
                  +

                  + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +

                  + + + +

                  Settings Container Key for 'the_content' hook priority level.

                  + + + public + str + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_content_priority_level" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.1 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-16T0859+0100

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +

                  + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" + + + + + + +
                  +
                  +

                  + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +

                  + + + +

                  Settings Container Key for '' hook priority level

                  + + + public + str + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_title_priority_level" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.2 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-20T0620+0100

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +

                  + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_text_priority_level" + + + + + + +
                  +
                  +

                  + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +

                  + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_title_priority_level" + + + + + + +
                  +
                  +

                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +

                  + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + = "footnotes_inputfield_alternative_mouse_over_box_offset_x" + + + + + + +
                  +
                  +

                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +

                  + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + = "footnotes_inputfield_alternative_mouse_over_box_offset_y" + + + + + + +
                  +
                  +

                  + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +

                  + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + = "footnotes_inputfield_alternative_mouse_over_box_width" + + + + + + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the border radius.

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + = "footnote_inputfield_custom_mouse_over_box_border_radius" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the border width.

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + = "footnote_inputfield_custom_mouse_over_box_border_width" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + = "footnote_inputfield_custom_mouse_over_box_excerpt_length" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.4 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the max. width.

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + = "footnote_inputfield_custom_mouse_over_box_max_width" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the offset (x).

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + = "footnote_inputfield_custom_mouse_over_box_offset_x" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.7 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the offset (y).

                  + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + = "footnote_inputfield_custom_mouse_over_box_offset_y" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.7 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_FOOTNOTES_SCROLL_DURATION + +

                  + + + + + + public + mixed + C_INT_FOOTNOTES_SCROLL_DURATION + = "footnotes_inputfield_scroll_duration" + + + + + + +
                  +
                  +

                  + C_INT_FOOTNOTES_SCROLL_OFFSET + +

                  + + + +

                  Scroll offset and duration

                  + + + public + mixed + C_INT_FOOTNOTES_SCROLL_OFFSET + = "footnotes_inputfield_scroll_offset" + + + +
                    +
                  • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                  • +
                  • Bugfix: Scroll duration: make configurable to conform to website content and style requirements.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.4 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-12-05T0538+0100

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +

                  + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + = "footnotes_inputfield_mouse_over_box_fade_in_delay" + + + + + + +
                  +
                  +

                  + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +

                  + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + = "footnotes_inputfield_mouse_over_box_fade_in_duration" + + + + + + +
                  +
                  +

                  + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +

                  + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + = "footnotes_inputfield_mouse_over_box_fade_out_delay" + + + + + + +
                  +
                  +

                  + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +

                  + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + = "footnotes_inputfield_mouse_over_box_fade_out_duration" + + + + + + +
                  +
                  +

                  + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +

                  + + + + + + public + mixed + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + = "footnotes_inputfield_reference_container_bottom_margin" + + + + + + +
                  +
                  +

                  + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +

                  + + + +

                  Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes

                  + + + public + int|bool|str + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + = "footnotes_inputfield_reference_container_top_margin" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.3.0 + +
                  + +
                  +
                  + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_max_width_unit" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_width_unit" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_CUSTOM + = "footnotes_inputfield_backlinks_separator_custom" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_OPTION + = "footnotes_inputfield_backlinks_separator_option" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_CUSTOM + = "footnotes_inputfield_backlinks_terminator_custom" + + + + + + +
                  +
                  + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_OPTION + = "footnotes_inputfield_backlinks_terminator_option" + + + + + + +
                  +
                  +

                  + C_STR_CUSTOM_CSS + +

                  + + + +

                  Settings Container Key for the Custom CSS.

                  + + + public + str + C_STR_CUSTOM_CSS + = "footnote_inputfield_custom_css" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + since +
                  +
                  + 1.3.0 + +

                  Adding: new settings tab for custom CSS settings.

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_CUSTOM_CSS_NEW + +

                  + + + +

                  Settings Container Key for the Custom CSS migrated to a dedicated tab.

                  + + + public + str + C_STR_CUSTOM_CSS_NEW + = "footnote_inputfield_custom_css_new" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.2.2 + +

                  Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.

                  +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-12-15T0520+0100

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +

                  + + + + + + public + mixed + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + = "footnotes_inputfield_footnote_fragment_id_slug" + + + + + + +
                  +
                  +

                  + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +

                  + + + +

                  Settings container key to enable superscript style normalization.

                  + + + public + str + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + = "footnotes_inputfield_referrers_normal_superscript" + + + +

                  -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.

                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @tomturowski

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/ + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +

                  + + + +

                  Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer

                  + + + public + int + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + = "footnotes_inputfield_alternative_mouse_over_box_position" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
                  +
                  + since +
                  +
                  + 2.2.5 + +
                  + +
                  +
                  + +
                  +
                  + + + + +

                  Settings container key to configure the backlink tooltip.

                  + + + public + str + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + = "footnotes_inputfield_backlink_tooltip_text" + + + +
                    +
                  • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @theroninjedi47

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_COUNTER_STYLE + +

                  + + + +

                  Settings Container Key for the counter style of the footnotes.

                  + + + public + str + C_STR_FOOTNOTES_COUNTER_STYLE + = "footnote_inputfield_counter_style" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_LOVE + +

                  + + + +

                  Settings Container Key for the 'I love footnotes' text.

                  + + + public + str + C_STR_FOOTNOTES_LOVE + = "footnote_inputfield_love" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the background color.

                  + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + = "footnote_inputfield_custom_mouse_over_box_background" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the border color.

                  + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + = "footnote_inputfield_custom_mouse_over_box_border_color" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the color.

                  + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + = "footnote_inputfield_custom_mouse_over_box_color" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the position.

                  + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + = "footnote_inputfield_custom_mouse_over_box_position" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.7 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +

                  + + + +

                  Settings Container Key for the mouse-over box to define the box-shadow color.

                  + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + = "footnote_inputfield_custom_mouse_over_box_shadow_color" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.8 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +

                  + + + + + + public + mixed + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + = "footnotes_inputfield_page_layout_support" + + + + + + +
                  +
                  +

                  + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +

                  + + + +

                  Settings container key to select the script mode for the reference container.

                  + + + public + str + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + = "footnotes_inputfield_reference_container_script_mode" + + + +
                    +
                  • Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.6 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @hopper87it

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/footnotes-wp-rocket/ + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_SHORT_CODE_END + +

                  + + + +

                  Settings Container Key for the short code of the footnote’s end.

                  + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END + = "footnote_inputfield_placeholder_end" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +

                  + + + +

                  Settings Container Key for the user-defined short code of the footnotes end.

                  + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + = "footnote_inputfield_placeholder_end_user_defined" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_SHORT_CODE_START + +

                  + + + +

                  Settings Container Key for the short code of the footnote’s start.

                  + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START + = "footnote_inputfield_placeholder_start" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +

                  + + + +

                  Settings Container Key for the user-defined short code of the footnotes start.

                  + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + = "footnote_inputfield_placeholder_start_user_defined" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_STYLING_AFTER + +

                  + + + +

                  Settings Container Key for the string after the footnote referrer.

                  + + + public + str + C_STR_FOOTNOTES_STYLING_AFTER + = "footnote_inputfield_custom_styling_after" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_STYLING_BEFORE + +

                  + + + +

                  Settings Container Key for the string before the footnote referrer.

                  + + + public + str + C_STR_FOOTNOTES_STYLING_BEFORE + = "footnote_inputfield_custom_styling_before" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +

                  + + + +

                  Settings container key to configure the tooltip excerpt delimiter.

                  + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + = "footnotes_inputfield_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.

                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @jbj2199

                  +
                  + +
                  +
                  + link +
                  +
                  +

                  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.

                  +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +

                  + + + +

                  Settings container key to configure the tooltip excerpt separator in the reference container.

                  + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + = "footnotes_inputfield_tooltip_excerpt_mirror_separator" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.5.4 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +

                  + + + +

                  Settings Container Key for the label of the Read-on button in truncated tooltips.

                  + + + public + str + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + = "footnote_inputfield_readon_label" + + + +
                    +
                  • Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
                  • +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.1.0 + +
                  + +
                  +
                  + date +
                  +
                  + +

                  2020-11-08T2106+0100

                  +
                  + +
                  +
                  + reporter +
                  +
                  + +

                  @rovanov

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + +
                  +
                  + +
                  +
                  + + + + + + + public + mixed + C_STR_HARD_LINK_IDS_SEPARATOR + = "footnotes_inputfield_hard_link_ids_separator" + + + + + + +
                  +
                  + + + + +

                  Settings Container Key for the backlink symbol selection.

                  + + + public + str + C_STR_HYPERLINK_ARROW + = "footnote_inputfield_custom_hyperlink_symbol" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  + + + + +

                  Settings Container Key for the user-defined backlink symbol.

                  + + + public + str + C_STR_HYPERLINK_ARROW_USER_DEFINED + = "footnote_inputfield_custom_hyperlink_symbol_user" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +

                  + + + + + + public + mixed + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + = "footnotes_inputfield_mouse_over_box_font_size_unit" + + + + + + +
                  +
                  +

                  + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +

                  + + + + + + public + mixed + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + = "footnotes_inputfield_reference_container_label_element" + + + + + + +
                  +
                  +

                  + C_STR_REFERENCE_CONTAINER_NAME + +

                  + + + +

                  Settings Container Key for the label of the reference container.

                  + + + public + str + C_STR_REFERENCE_CONTAINER_NAME + = "footnote_inputfield_references_label" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_REFERENCE_CONTAINER_POSITION + +

                  + + + +

                  Settings Container Key for the position of the reference container.

                  + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION + = "footnote_inputfield_reference_container_place" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +

                  + + + +

                  Settings Container Key for reference container position shortcode

                  + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + = "footnote_inputfield_reference_container_position_shortcode" + + + +
                  + + +
                  + Tags + +
                  +
                  +
                  + since +
                  +
                  + 2.2.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + C_STR_REFERRER_FRAGMENT_ID_SLUG + +

                  + + + + + + public + mixed + C_STR_REFERRER_FRAGMENT_ID_SLUG + = "footnotes_inputfield_referrer_fragment_id_slug" + + + + + + +
                  +
                  + + +
                  +

                  + Properties + +

                  +
                  +

                  + $a_arr_Container + + + +

                  + + +

                  Contains all Settings Container names.

                  + + + private + array<string|int, mixed> + $a_arr_Container + = array("footnotes_storage", "footnotes_storage_custom", "footnotes_storage_expert", "footnotes_storage_custom_css") + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + $a_arr_Default + + + +

                  + + +

                  Contains all Default Settings for each Settings Container.

                  + + + private + array<string|int, mixed> + $a_arr_Default + = array("footnotes_storage" => array( + self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', + self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', + self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', + self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + self::C_STR_REFERENCE_CONTAINER_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // whether a <br /> tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_LOVE => 'no', +), "footnotes_storage_custom" => array( + self::C_STR_HYPERLINK_ARROW => '&#8593;', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', +), "footnotes_storage_expert" => array( + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See <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. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + // And the_excerpt is disabled by default following @nikelaos in + // <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879> + // <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068> + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // <https://github.com/Modernizr/Modernizr/issues/171> + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, +), "footnotes_storage_custom_css" => array(self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', self::C_STR_CUSTOM_CSS_NEW => '')) + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + since +
                  +
                  + 2.1.3 + +

                  excerpt hook: disable by default, thanks to @nikelaos

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068 + +
                  +
                  + +
                  +
                  +

                  + $a_arr_Settings + + + +

                  + + +

                  Contains all Settings from each Settings container as soon as this class is initialized.

                  + + + private + array<string|int, mixed> + $a_arr_Settings + = array() + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  +

                  + $a_obj_Instance + + + +

                  + + +

                  Stores a singleton reference of this class.

                  + + + private + static MCI_Footnotes_Settings + $a_obj_Instance + = +ull + +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  +
                  + +
                  +

                  + Methods + +

                  +
                  +

                  + ClearAll() + +

                  + + +

                  Deletes each Settings Container and loads the default values for each Settings Container.

                  + + + public + ClearAll() : mixed + +
                  + + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +

                  Edit: This didn’t actually work.

                  +
                  + +
                  +
                  + since +
                  +
                  + 2.2.0 + +

                  this function is not called any longer when deleting the plugin, +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

                  +
                  + +
                  +
                  + +
                  Return values
                  + mixed + — +
                  + + +
                  +
                  +

                  + get() + +

                  + + +

                  Returns the value of specified Settings name.

                  + + + public + get(string $p_str_Key) : mixed + +
                  + +
                  Parameters
                  +
                  +
                  + $p_str_Key + : string +
                  +
                  +

                  Settings Array Key name.

                  +
                  + +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + mixed + — +

                  Value of the Setting on Success or Null in Settings name is invalid.

                  +
                  + + +
                  +
                  +

                  + getContainer() + +

                  + + +

                  Returns the name of a specified Settings Container.

                  + + + public + getContainer(int $p_int_Index) : str + +
                  + +
                  Parameters
                  +
                  +
                  + $p_int_Index + : int +
                  +
                  +

                  Settings Container Array Key Index.

                  +
                  + +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + str + — +

                  Settings Container name.

                  +
                  + + +
                  +
                  +

                  + getDefaults() + +

                  + + +

                  Returns the default values of a specific Settings Container.

                  + + + public + getDefaults(int $p_int_Index) : array<string|int, mixed> + +
                  + +
                  Parameters
                  +
                  +
                  + $p_int_Index + : int +
                  +
                  +

                  Settings Container Aray Key Index.

                  +
                  + +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.6 + +
                  + +
                  +
                  + +
                  Return values
                  + array<string|int, mixed> + — +
                  + + +
                  +
                  +

                  + instance() + +

                  + + +

                  Returns a singleton of this class.

                  + + + public + static instance() : MCI_Footnotes_Settings + +
                  + + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + MCI_Footnotes_Settings + — +
                  + + +
                  +
                  +

                  + RegisterSettings() + +

                  + + +

                  Register all Settings Container for the Plugin Settings Page in the Dashboard.

                  + + + public + RegisterSettings() : mixed + +

                  Settings Container Label will be the same as the Settings Container Name.

                  +
                  + + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + mixed + — +
                  + + +
                  +
                  +

                  + saveOptions() + +

                  + + +

                  Updates a whole Settings container.

                  + + + public + saveOptions(int $p_int_Index, array<string|int, mixed> $p_arr_newValues) : bool + +
                  + +
                  Parameters
                  +
                  +
                  + $p_int_Index + : int +
                  +
                  +

                  Index of the Settings container.

                  +
                  + +
                  +
                  + $p_arr_newValues + : array<string|int, mixed> +
                  +
                  +

                  new Settings.

                  +
                  + +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + bool + — +
                  + + +
                  +
                  +

                  + __construct() + +

                  + + +

                  Class Constructor. Loads all Settings from each WordPress Settings container.

                  + + + private + __construct() : mixed + +
                  + + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + mixed + — +
                  + + +
                  +
                  +

                  + Load() + +

                  + + +

                  Loads all Settings from specified Settings Container.

                  + + + private + Load(int $p_int_Index) : array<string|int, mixed> + +
                  + +
                  Parameters
                  +
                  +
                  + $p_int_Index + : int +
                  +
                  +

                  Settings Container Array Key Index.

                  +
                  + +
                  +
                  + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + since +
                  +
                  + +

                  ditched trimming whitespace from text box content in response to user request.

                  +
                  + +
                  +
                  + link +
                  +
                  + https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 + +
                  +
                  + +
                  Return values
                  + array<string|int, mixed> + — +

                  Settings loaded from Container of Default Settings if Settings Container is empty (first usage).

                  +
                  + + +
                  +
                  +

                  + loadAll() + +

                  + + +

                  Loads all Settings from each Settings container.

                  + + + private + loadAll() : mixed + +
                  + + + +
                  + Tags + +
                  +
                  +
                  + author +
                  +
                  + +

                  Stefan Herndler

                  +
                  + +
                  +
                  + since +
                  +
                  + 1.5.0 + +
                  + +
                  +
                  + +
                  Return values
                  + mixed + — +
                  + + +
                  +
                  + +
                  +
                  +
                  +
                  +

                  Search results

                  + +
                  +
                  +
                    +
                    +
                    +
                    +
                    +
                    + + +
                    + + + + diff --git a/docs/classes/MCI-Footnotes-Task.html b/docs/classes/MCI-Footnotes-Task.html new file mode 100644 index 0000000..b8cddb3 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Task.html @@ -0,0 +1,2902 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                    +

                    Documentation

                    + + + + + +
                    + +
                    +
                    + + + + +
                    + + +
                    +

                    + MCI_Footnotes_Task + + + + +

                    + + + +

                    Searches and replaces the footnotes.

                    + +

                    Generates the reference container.

                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + + + + + + +

                    + Table of Contents + +

                    + +
                    +
                    + $a_arr_Footnotes + +  : array<string|int, mixed> +
                    +
                    Contains all footnotes found on current public page.
                    + +
                    + $a_bool_AllowLoveMe + +  : bool +
                    +
                    Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
                    + +
                    + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                    +
                    + +
                    + $a_bool_HardLinksEnable + +  : bool|str|int +
                    +
                    Hard links for AMP compatibility
                    + +
                    + $a_bool_MirrorTooltipText + +  : mixed +
                    +
                    Dedicated tooltip text
                    + +
                    + $a_bool_SyntaxErrorFlag + +  : bool +
                    +
                    Footnote delimiter syntax validation
                    + +
                    + $a_bool_TooltipsEnabled + +  : bool +
                    +
                    Template process optimization
                    + +
                    + $a_int_PostId + +  : int +
                    +
                    Infinite scroll / autoload or archive view
                    + +
                    + $a_int_ReferenceContainerId + +  : int +
                    +
                    Multiple reference containers in content and widgets
                    + +
                    + $a_int_ScrollOffset + +  : int +
                    +
                    Scroll offset
                    + +
                    + $a_int_TooltipShortcodeLength + +  : mixed +
                    +
                    + +
                    + $a_str_FootnoteLinkSlug + +  : mixed +
                    +
                    + +
                    + $a_str_LinkCloseTag + +  : mixed +
                    +
                    + +
                    + $a_str_LinkIdsSeparator + +  : mixed +
                    +
                    + +
                    + $a_str_LinkOpenTag + +  : mixed +
                    +
                    + +
                    + $a_str_LinkSpan + +  : mixed +
                    +
                    Optional link element for footnote referrers and backlinks
                    + +
                    + $a_str_PostContainerIdCompound + +  : mixed +
                    +
                    + +
                    + $a_str_Prefix + +  : string +
                    +
                    Prefix for the Footnote html element ID.
                    + +
                    + $a_str_ReferrerLinkSlug + +  : mixed +
                    +
                    + +
                    + $a_str_TooltipShortcode + +  : mixed +
                    +
                    + +
                    + exec() + +  : string +
                    +
                    Replaces all footnotes that occur in the given content.
                    + +
                    + ReferenceContainer() + +  : string +
                    +
                    Generates the reference container.
                    + +
                    + registerHooks() + +  : mixed +
                    +
                    Register WordPress Hooks to replace Footnotes in the content of a public page.
                    + +
                    + search() + +  : string +
                    +
                    Replaces all footnotes in the given content and appends them to the static property.
                    + +
                    + the_content() + +  : string +
                    +
                    Replaces footnotes in the content of the current page/post.
                    + +
                    + the_excerpt() + +  : string +
                    +
                    Replaces footnotes in the excerpt of the current page/post.
                    + +
                    + the_post() + +  : mixed +
                    +
                    Replaces footnotes in each Content var of the current Post object.
                    + +
                    + the_title() + +  : string +
                    +
                    Replaces footnotes in the post/page title.
                    + +
                    + widget_text() + +  : string +
                    +
                    Replaces footnotes in the content of the current widget.
                    + +
                    + widget_title() + +  : string +
                    +
                    Replaces footnotes in the widget title.
                    + +
                    + wp_footer() + +  : mixed +
                    +
                    Displays the 'LOVE FOOTNOTES' slug if enabled.
                    + +
                    + wp_head() + +  : mixed +
                    +
                    Outputs the custom css to the header of the public page.
                    + +
                    + replacePostObject() + +  : WP_Post +
                    +
                    Replace all Footnotes in a WP_Post object.
                    + +
                    + + + + + + +
                    +

                    + Properties + +

                    +
                    +

                    + $a_arr_Footnotes + + + +

                    + + +

                    Contains all footnotes found on current public page.

                    + + + public + static array<string|int, mixed> + $a_arr_Footnotes + = array() + +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_bool_AllowLoveMe + + + +

                    + + +

                    Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.

                    + + + public + static bool + $a_bool_AllowLoveMe + = rue + +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_bool_AlternativeTooltipsEnabled + + + +

                    + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                    +
                    +

                    + $a_bool_HardLinksEnable + + + +

                    + + +

                    Hard links for AMP compatibility

                    + + + public + static bool|str|int + $a_bool_HardLinksEnable + = alse + +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.0.0 + +

                    Bugfix: footnote links script independent.

                    +
                      +
                    • Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
                    • +
                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.4 + +
                    + +
                    +
                    + since +
                    +
                    + 2.3.0 + +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @theroninjedi47

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @psykonevro

                    +
                    + +
                    +
                    + link +
                    +
                    +
                      +
                    • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                    • +
                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                    +
                    + link +
                    +
                    +

                    The official AMP plugin strips off JavaScript, breaking Footnotes’ +animated scrolling. +When the alternative reference container is enabled, hard links are too.

                    +
                    + +
                    +
                    + contributor +
                    +
                    + +

                    @martinneumannat

                    +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_bool_MirrorTooltipText + + + +

                    + + +

                    Dedicated tooltip text

                    + + + public + static mixed + $a_bool_MirrorTooltipText + = alse + +
                      +
                    • Update: Tooltips: ability to display dedicated content before [[/tooltip]], thanks to @jbj2199 issue report.
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.5.2 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2021-01-19T2223+0100

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @jbj2199

                    +
                    + +
                    +
                    + link +
                    +
                    +

                    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.

                    +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_bool_SyntaxErrorFlag + + + +

                    + + +

                    Footnote delimiter syntax validation

                    + + + public + static bool + $a_bool_SyntaxErrorFlag + = rue + +
                      +
                    • Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.4.0 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2021-01-01T0227+0100

                    +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_bool_TooltipsEnabled + + + +

                    + + +

                    Template process optimization

                    + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                      +
                    • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.4.0 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2021-01-04T1355+0100

                    +
                    + +
                    +
                    + author +
                    +
                    + +

                    Patrizia Lutz @misfist

                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                    +
                    + link +
                    +
                    +

                    repository

                    +
                    + +
                    +
                    + link +
                    +
                    +

                    diff

                    +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_int_PostId + + + +

                    + + +

                    Infinite scroll / autoload or archive view

                    + + + public + static int + $a_int_PostId + = 0 + +
                      +
                    • Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.0.6 + +
                    + +
                    +
                    + contributor +
                    +
                    + +

                    @docteurfitness

                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/auto-load-post-compatibility-update/#post-13618833 + +
                    +
                    + link +
                    +
                    +

                    As multiple posts are appended to each other, functions and fragment IDs must be disambiguated. +post ID to make everything unique wrt infinite scroll and archive view:

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @docteurfitness

                    +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_int_ReferenceContainerId + + + +

                    + + +

                    Multiple reference containers in content and widgets

                    + + + public + static int + $a_int_ReferenceContainerId + = 1 + +
                      +
                    • Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report.
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.2.9 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2020-12-25T0338+0100

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @justbecuz

                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/reset-footnotes-to-1/ + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830 + +
                    +
                    + +
                    +
                    +

                    + $a_int_ScrollOffset + + + +

                    + + +

                    Scroll offset

                    + + + public + static int + $a_int_ScrollOffset + = 34 + +
                      +
                    • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                    • +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.1.4 + +
                    + +
                    +
                    + since +
                    +
                    + 2.4.0 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2020-12-05T0538+0100

                    +
                      +
                    • Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report.
                    • +
                    +
                    + +
                    +
                    + date +
                    +
                    + +

                    2021-01-03T2055+0100

                    +
                    + +
                    +
                    + date +
                    +
                    + +

                    2021-01-04T0504+0100

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @lukashuggenberg

                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13857922 + +
                    +
                    + +
                    +
                    +

                    + $a_int_TooltipShortcodeLength + + + +

                    + + + + + public + static mixed + $a_int_TooltipShortcodeLength + = 12 + + + + +
                    +
                    +

                    + $a_str_FootnoteLinkSlug + + + +

                    + + + + + public + static mixed + $a_str_FootnoteLinkSlug + = 'f' + + + + +
                    +
                    +

                    + $a_str_LinkCloseTag + + + +

                    + + + + + public + static mixed + $a_str_LinkCloseTag + = '' + + + + +
                    +
                    +

                    + $a_str_LinkIdsSeparator + + + +

                    + + + + + public + static mixed + $a_str_LinkIdsSeparator + = '+' + + + + +
                    +
                    +

                    + $a_str_LinkOpenTag + + + +

                    + + + + + public + static mixed + $a_str_LinkOpenTag + = '' + + + + +
                    +
                    +

                    + $a_str_LinkSpan + + + +

                    + + +

                    Optional link element for footnote referrers and backlinks

                    + + + public + static mixed + $a_str_LinkSpan + = 'span' + +
                    + + +
                    + Tags + +
                    +
                    +
                    + since +
                    +
                    + 2.0.0 + +

                    add link elements along with hard links.

                    +
                      +
                    • Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
                    • +
                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.4 + +
                    + +
                    +
                    + since +
                    +
                    + 2.3.0 + +
                    + +
                    +
                    + date +
                    +
                    + +

                    2020-11-25T1306+0100

                    +
                    + +
                    +
                    + date +
                    +
                    + +

                    2020-11-26T1051+0100

                    +
                    + +
                    +
                    + date +
                    +
                    + +

                    2020-12-30T2313+0100

                    +
                    + +
                    +
                    + contributor +
                    +
                    + +

                    @docteurfitness

                    +
                    + +
                    +
                    + contributor +
                    +
                    + +

                    @martinneumannat

                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/update-2-1-3/#post-13704194 + +
                    +
                    + link +
                    +
                    +
                      +
                    • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                    • +
                    +
                    + +
                    +
                    + link +
                    +
                    + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                    +
                    + link +
                    +
                    +

                    Although widely used for that purpose, hyperlinks are disliked for footnote linking. +Browsers may need to be prevented from logging these clicks in the browsing history, +as logging compromises the usability of the 'return to previous' button in browsers. +For that purpose, and for scroll animation, this linking is performed by JavaScript.

                    +

                    Link elements raise concerns, so that mitigating their proliferation may be desired.

                    +

                    By contrast, due to an insufficiency in the CSS standard, coloring elements with the +theme’s link color requires real link elements and cannot be done with named colors, +as CSS does not support 'color: link|hover|active|visited', after the pseudo-classes +of the link element.

                    +

                    Yet styling these elements with the link color is not universally preferred, so that +the very presence of these link elements may need to be avoided.

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @docteurfitness

                    +
                    + +
                    +
                    + reporter +
                    +
                    + +

                    @psykonevro

                    +
                    + +
                    +
                    + see +
                    +
                    + self::$a_bool_HardLinksEnable + +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_str_PostContainerIdCompound + + + +

                    + + + + + public + static mixed + $a_str_PostContainerIdCompound + = '' + + + + +
                    +
                    +

                    + $a_str_Prefix + + + +

                    + + +

                    Prefix for the Footnote html element ID.

                    + + + public + static string + $a_str_Prefix + = "" + +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.8 + +
                    + +
                    +
                    + +
                    +
                    +

                    + $a_str_ReferrerLinkSlug + + + +

                    + + + + + public + static mixed + $a_str_ReferrerLinkSlug + = 'r' + + + + +
                    +
                    +

                    + $a_str_TooltipShortcode + + + +

                    + + + + + public + static mixed + $a_str_TooltipShortcode + = '[[/tooltip]]' + + + + +
                    +
                    + +
                    +

                    + Methods + +

                    +
                    +

                    + exec() + +

                    + + +

                    Replaces all footnotes that occur in the given content.

                    + + + public + exec(string $p_str_Content[, bool $p_bool_OutputReferences = false ][, bool $p_bool_HideFootnotesText = false ]) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Any string that may contain footnotes to be replaced.

                    +
                    + +
                    +
                    + $p_bool_OutputReferences + : bool + = false
                    +
                    +

                    Appends the Reference Container to the output if set to true, default true.

                    +
                    + +
                    +
                    + $p_bool_HideFootnotesText + : bool + = false
                    +
                    +

                    Hide footnotes found in the string.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 2.2.0 + +

                    Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.2.5 + +

                    Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.

                    +
                    + +
                    +
                    + +
                    Return values
                    + string + — +
                    + + +
                    +
                    +

                    + ReferenceContainer() + +

                    + + +

                    Generates the reference container.

                    + + + public + ReferenceContainer() : string + +
                    + + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 2.0.0 + +

                    Update: remove backlink symbol along with column 2 of the reference container

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.3 + +

                    Bugfix: prepend an arrow on user request

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.6 + +

                    Bugfix: Reference container: fix line breaking behavior in footnote number clusters.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.4 + +

                    Bugfix: restore the arrow select and backlink symbol input settings

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.1 + +

                    Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.1 + +

                    Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.

                    +
                    + +
                    +
                    + +
                    Return values
                    + string + — +
                    + + +
                    +
                    +

                    + registerHooks() + +

                    + + +

                    Register WordPress Hooks to replace Footnotes in the content of a public page.

                    + + + public + registerHooks() : mixed + +
                    + + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 1.5.4 + +

                    Adding: Hooks: support 'the_post' in response to user request for custom post types.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.5 + +

                    Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.5 + +

                    Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.6 + +

                    Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility).

                    +
                    + +
                    +
                    + 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.0.7 + +

                    Bugfix: Set priority level back to 10 assuming it is unproblematic 2020-11-06T1344+0100.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.0.8 + +

                    Bugfix: Priority level back to PHP_INT_MAX (need to get in touch with other plugins).

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.0 + +

                    UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.1 + +

                    Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.2 + +

                    Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.0 + +

                    Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.1 + +

                    Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report.

                    +
                    + +
                    +
                    + +
                    Return values
                    + mixed + — +
                    + + +
                    +
                    + + + +

                    Replaces all footnotes in the given content and appends them to the static property.

                    + + + public + search(string $p_str_Content, bool $p_bool_ConvertHtmlChars, bool $p_bool_HideFootnotesText) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Content to be searched for footnotes.

                    +
                    + +
                    +
                    + $p_bool_ConvertHtmlChars + : bool +
                    +
                    +

                    html encode settings, default true.

                    +
                    + +
                    +
                    + $p_bool_HideFootnotesText + : bool +
                    +
                    +

                    Hide footnotes found in the string.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 2.0.0 + +

                    various.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.4.0 + +

                    Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.0 + +

                    Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.0 + +

                    Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.0 + +

                    Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.

                    +
                    + +
                    +
                    + +
                    Return values
                    + string + — +
                    + + +
                    +
                    +

                    + the_content() + +

                    + + +

                    Replaces footnotes in the content of the current page/post.

                    + + + public + the_content(string $p_str_Content) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Page/Post content.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    Return values
                    + string + — +

                    Content with replaced footnotes.

                    +
                    + + +
                    +
                    +

                    + the_excerpt() + +

                    + + +

                    Replaces footnotes in the excerpt of the current page/post.

                    + + + public + the_excerpt(string $p_str_Content) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Page/Post content.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    Return values
                    + string + — +

                    Content with replaced footnotes.

                    +
                    + + +
                    +
                    +

                    + the_post() + +

                    + + +

                    Replaces footnotes in each Content var of the current Post object.

                    + + + public + the_post(array<string|int, mixed>|WP_Post &$p_mixed_Posts) : mixed + +
                    + +
                    Parameters
                    +
                    +
                    + $p_mixed_Posts + : array<string|int, mixed>|WP_Post +
                    +
                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.4 + +
                    + +
                    +
                    + +
                    Return values
                    + mixed + — +
                    + + +
                    +
                    +

                    + the_title() + +

                    + + +

                    Replaces footnotes in the post/page title.

                    + + + public + the_title(string $p_str_Content) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Widget content.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    Return values
                    + string + — +

                    Content with replaced footnotes.

                    +
                    + + +
                    +
                    +

                    + widget_text() + +

                    + + +

                    Replaces footnotes in the content of the current widget.

                    + + + public + widget_text(string $p_str_Content) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Widget content.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    Return values
                    + string + — +

                    Content with replaced footnotes.

                    +
                    + + +
                    +
                    +

                    + widget_title() + +

                    + + +

                    Replaces footnotes in the widget title.

                    + + + public + widget_title(string $p_str_Content) : string + +
                    + +
                    Parameters
                    +
                    +
                    + $p_str_Content + : string +
                    +
                    +

                    Widget content.

                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + +
                    Return values
                    + string + — +

                    Content with replaced footnotes.

                    +
                    + + +
                    +
                    + + + +

                    Displays the 'LOVE FOOTNOTES' slug if enabled.

                    + + + public + wp_footer() : mixed + +
                    + + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 2.2.0 + +

                    more options 2020-12-11T0506+0100

                    +
                    + +
                    +
                    + +
                    Return values
                    + mixed + — +
                    + + +
                    +
                    +

                    + wp_head() + +

                    + + +

                    Outputs the custom css to the header of the public page.

                    + + + public + wp_head() : mixed + +
                    + + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.0 + +
                    + +
                    +
                    + since +
                    +
                    + 2.1.1 + +

                    Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.1 + +

                    Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.3 + +

                    raise settings priority to override theme stylesheets

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.4 + +

                    Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.1.4 + +

                    Bugfix: Reference container: fix layout issues by moving backlink column width to settings.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.2.5 + +

                    Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.2.5 + +

                    Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.3.0 + +

                    Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.

                    +
                    + +
                    +
                    + since +
                    +
                    + 2.5.4 + +

                    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.

                    +
                    + +
                    +
                    + +
                    Return values
                    + mixed + — +
                    + + +
                    +
                    +

                    + replacePostObject() + +

                    + + +

                    Replace all Footnotes in a WP_Post object.

                    + + + private + replacePostObject(WP_Post $p_obj_Post) : WP_Post + +
                    + +
                    Parameters
                    +
                    +
                    + $p_obj_Post + : WP_Post +
                    +
                    +
                    + +
                    +
                    + + +
                    + Tags + +
                    +
                    +
                    + author +
                    +
                    + +

                    Stefan Herndler

                    +
                    + +
                    +
                    + since +
                    +
                    + 1.5.6 + +
                    + +
                    +
                    + +
                    Return values
                    + WP_Post + — +
                    + + +
                    +
                    + +
                    +
                    +
                    +
                    +

                    Search results

                    + +
                    +
                    +
                      +
                      +
                      +
                      +
                      +
                      + + +
                      + + + + diff --git a/docs/classes/MCI-Footnotes-Template.html b/docs/classes/MCI-Footnotes-Template.html new file mode 100644 index 0000000..98bc1ed --- /dev/null +++ b/docs/classes/MCI-Footnotes-Template.html @@ -0,0 +1,1044 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                      +

                      Documentation

                      + + + + + +
                      + +
                      +
                      + + + + +
                      + + +
                      +

                      + MCI_Footnotes_Template + + + + +

                      + + + +

                      Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).

                      + +

                      Loads a template file, replaces all Placeholders and returns the replaced file content.

                      +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + + + + + + +

                      + Table of Contents + +

                      + +
                      +
                      + C_STR_DASHBOARD + +  = "dashboard" +
                      +
                      Directory name for dashboard templates.
                      + +
                      + C_STR_PUBLIC + +  = "public" +
                      +
                      Directory name for public templates.
                      + +
                      + $plugin_directory + +  : string +
                      +
                      Plugin Directory
                      + +
                      + $a_str_OriginalContent + +  : string +
                      +
                      Contains the content of the template after initialize.
                      + +
                      + $a_str_ReplacedContent + +  : string +
                      +
                      Contains the content of the template after initialize with replaced place holders.
                      + +
                      + __construct() + +  : mixed +
                      +
                      Class Constructor. Reads and loads the template file without replace any placeholder.
                      + +
                      + get_template() + +  : mixed +
                      +
                      Get the template
                      + +
                      + getContent() + +  : string +
                      +
                      Returns the content of the template file with replaced placeholders.
                      + +
                      + process_template() + +  : void +
                      +
                      Process template file
                      + +
                      + reload() + +  : mixed +
                      +
                      Reloads the original content of the template file.
                      + +
                      + replace() + +  : bool +
                      +
                      Replace all placeholders specified in array.
                      + +
                      + + + + +
                      +

                      + Constants + +

                      +
                      +

                      + C_STR_DASHBOARD + +

                      + + + +

                      Directory name for dashboard templates.

                      + + + public + string + C_STR_DASHBOARD + = "dashboard" + + + +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      +
                      +

                      + C_STR_PUBLIC + +

                      + + + +

                      Directory name for public templates.

                      + + + public + string + C_STR_PUBLIC + = "public" + + + +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      +
                      + + +
                      +

                      + Properties + +

                      +
                      +

                      + $plugin_directory + + + +

                      + + +

                      Plugin Directory

                      + + + public + string + $plugin_directory + + +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Patrizia Lutz @misfist

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.4.0d3 + +
                      + +
                      +
                      + +
                      +
                      +

                      + $a_str_OriginalContent + + + +

                      + + +

                      Contains the content of the template after initialize.

                      + + + private + string + $a_str_OriginalContent + = "" + +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      +
                      +

                      + $a_str_ReplacedContent + + + +

                      + + +

                      Contains the content of the template after initialize with replaced place holders.

                      + + + private + string + $a_str_ReplacedContent + = "" + +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      +
                      + +
                      +

                      + Methods + +

                      +
                      +

                      + __construct() + +

                      + + +

                      Class Constructor. Reads and loads the template file without replace any placeholder.

                      + + + public + __construct(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                      + +
                      Parameters
                      +
                      +
                      + $p_str_FileType + : string +
                      +
                      +

                      Template file type (take a look on the Class constants).

                      +
                      + +
                      +
                      + $p_str_FileName + : string +
                      +
                      +

                      Template file name inside the Template directory without the file extension.

                      +
                      + +
                      +
                      + $p_str_Extension + : string + = "html"
                      +
                      +

                      Optional Template file extension (default: html)

                      +
                      + +
                      +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + since +
                      +
                      + 2.2.6 + +

                      support for custom templates 2020-12-19T0606+0100

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.4.0 + +

                      look for custom template in the active theme first, thanks to @misfist

                      +
                      + +
                      +
                      + link +
                      +
                      + https://wordpress.org/support/topic/template-override-filter/ + +
                      +
                      + link +
                      +
                      + https://wordpress.org/support/topic/template-override-filter/#post-13846598 + +
                      +
                      + +
                      Return values
                      + mixed + — +
                      + + +
                      +
                      +

                      + get_template() + +

                      + + +

                      Get the template

                      + + + public + get_template(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                      + +
                      Parameters
                      +
                      +
                      + $p_str_FileType + : string +
                      +
                      +
                      + +
                      +
                      + $p_str_FileName + : string +
                      +
                      +
                      + +
                      +
                      + $p_str_Extension + : string + = "html"
                      +
                      +
                      + +
                      +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Patrizia Lutz @misfist

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.4.0d3 + +
                      + +
                      +
                      + +
                      Return values
                      + mixed + — +

                      false | template path

                      +
                      + + +
                      +
                      +

                      + getContent() + +

                      + + +

                      Returns the content of the template file with replaced placeholders.

                      + + + public + getContent() : string + +
                      + + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      Return values
                      + string + — +

                      Template content with replaced placeholders.

                      +
                      + + +
                      +
                      +

                      + process_template() + +

                      + + +

                      Process template file

                      + + + public + process_template(string $template) : void + +
                      + +
                      Parameters
                      +
                      +
                      + $template + : string +
                      +
                      +
                      + +
                      +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Patrizia Lutz @misfist

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.4.0d3 + +
                      + +
                      +
                      + since +
                      +
                      + 2.0.3 + +

                      replace tab with a space

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.0.3 + +

                      replace 2 spaces with 1

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.0.4 + +

                      collapse multiple spaces

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.2.6 + +

                      delete a space before a closing pointy bracket

                      +
                      + +
                      +
                      + since +
                      +
                      + 2.5.4 + +

                      collapse HTML comments and PHP/JS docblocks (only)

                      +
                      + +
                      +
                      + +
                      Return values
                      + void + — +
                      + + +
                      +
                      +

                      + reload() + +

                      + + +

                      Reloads the original content of the template file.

                      + + + public + reload() : mixed + +
                      + + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      Return values
                      + mixed + — +
                      + + +
                      +
                      +

                      + replace() + +

                      + + +

                      Replace all placeholders specified in array.

                      + + + public + replace(array<string|int, mixed> $p_arr_Placeholders) : bool + +
                      + +
                      Parameters
                      +
                      +
                      + $p_arr_Placeholders + : array<string|int, mixed> +
                      +
                      +

                      Placeholders (key = placeholder, value = value).

                      +
                      + +
                      +
                      + + +
                      + Tags + +
                      +
                      +
                      + author +
                      +
                      + +

                      Stefan Herndler

                      +
                      + +
                      +
                      + since +
                      +
                      + 1.5.0 + +
                      + +
                      +
                      + +
                      Return values
                      + bool + — +

                      True on Success, False if Placeholders invalid.

                      +
                      + + +
                      +
                      + +
                      +
                      +
                      +
                      +

                      Search results

                      + +
                      +
                      +
                        +
                        +
                        +
                        +
                        +
                        + + +
                        + + + + diff --git a/docs/classes/MCI-Footnotes-WYSIWYG.html b/docs/classes/MCI-Footnotes-WYSIWYG.html new file mode 100644 index 0000000..08eae4a --- /dev/null +++ b/docs/classes/MCI-Footnotes-WYSIWYG.html @@ -0,0 +1,492 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                        +

                        Documentation

                        + + + + + +
                        + +
                        +
                        + + + + +
                        + + +
                        +

                        + MCI_Footnotes_WYSIWYG + + + + +

                        + + + + +
                        + + +
                        + Tags + +
                        +
                        +
                        + author +
                        +
                        + +

                        Stefan Herndler

                        +
                        + +
                        +
                        + since +
                        +
                        + 1.5.0 + +
                        + +
                        +
                        + + + + + + +

                        + Table of Contents + +

                        + +
                        +
                        + ajaxCallback() + +  : mixed +
                        +
                        AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.
                        + +
                        + includeScripts() + +  : array<string|int, mixed> +
                        +
                        Includes the Plugins WYSIWYG editor script.
                        + +
                        + newPlainTextEditorButton() + +  : mixed +
                        +
                        Add a new button to the plain text editor.
                        + +
                        + newVisualEditorButton() + +  : array<string|int, mixed> +
                        +
                        Append a new Button to the WYSIWYG editor of Posts and Pages.
                        + +
                        + registerHooks() + +  : mixed +
                        +
                        + +
                        + + + + + + + +
                        +

                        + Methods + +

                        +
                        +

                        + ajaxCallback() + +

                        + + +

                        AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.

                        + + + public + static ajaxCallback() : mixed + +

                        Returns an JSON encoded array with the Footnotes start and end short code.

                        +
                        + + + +
                        + Tags + +
                        +
                        +
                        + author +
                        +
                        + +

                        Stefan Herndler

                        +
                        + +
                        +
                        + since +
                        +
                        + 1.5.0 + +
                        + +
                        +
                        + +
                        Return values
                        + mixed + — +
                        + + +
                        +
                        +

                        + includeScripts() + +

                        + + +

                        Includes the Plugins WYSIWYG editor script.

                        + + + public + static includeScripts(array<string|int, mixed> $p_arr_Plugins) : array<string|int, mixed> + +
                        + +
                        Parameters
                        +
                        +
                        + $p_arr_Plugins + : array<string|int, mixed> +
                        +
                        +

                        Scripts to be included to the editor.

                        +
                        + +
                        +
                        + + +
                        + Tags + +
                        +
                        +
                        + author +
                        +
                        + +

                        Stefan Herndler

                        +
                        + +
                        +
                        + since +
                        +
                        + 1.5.0 + +
                        + +
                        +
                        + +
                        Return values
                        + array<string|int, mixed> + — +
                        + + +
                        +
                        +

                        + newPlainTextEditorButton() + +

                        + + +

                        Add a new button to the plain text editor.

                        + + + public + static newPlainTextEditorButton() : mixed + +
                        + + + +
                        + Tags + +
                        +
                        +
                        + author +
                        +
                        + +

                        Stefan Herndler

                        +
                        + +
                        +
                        + since +
                        +
                        + 1.5.0 + +
                        + +
                        +
                        + +
                        Return values
                        + mixed + — +
                        + + +
                        +
                        +

                        + newVisualEditorButton() + +

                        + + +

                        Append a new Button to the WYSIWYG editor of Posts and Pages.

                        + + + public + static newVisualEditorButton(array<string|int, mixed> $p_arr_Buttons) : array<string|int, mixed> + +
                        + +
                        Parameters
                        +
                        +
                        + $p_arr_Buttons + : array<string|int, mixed> +
                        +
                        +

                        pre defined Buttons from WordPress.

                        +
                        + +
                        +
                        + + +
                        + Tags + +
                        +
                        +
                        + author +
                        +
                        + +

                        Stefan Herndler

                        +
                        + +
                        +
                        + since +
                        +
                        + 1.5.0 + +
                        + +
                        +
                        + +
                        Return values
                        + array<string|int, mixed> + — +
                        + + +
                        +
                        +

                        + registerHooks() + +

                        + + + + + public + static registerHooks() : mixed + + + + + +
                        Return values
                        + mixed + — +
                        + + +
                        +
                        + +
                        +
                        +
                        +
                        +

                        Search results

                        + +
                        +
                        +
                          +
                          +
                          +
                          +
                          +
                          + + +
                          + + + + diff --git a/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html new file mode 100644 index 0000000..8ef7d35 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html @@ -0,0 +1,688 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                          +

                          Documentation

                          + + + + + +
                          + +
                          +
                          + + + + +
                          + + +
                          +

                          + MCI_Footnotes_Widget_ReferenceContainer + + + extends MCI_Footnotes_WidgetBase + + + + +

                          + + + +

                          Registers a Widget to put the Reference Container to the widget area.

                          + +
                          + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + + + + + + +

                          + Table of Contents + +

                          + +
                          +
                          + __construct() + +  : mixed +
                          +
                          Class Constructor. Registers the child Widget to WordPress.
                          + +
                          + form() + +  : void +
                          +
                          Outputs the Settings of the Widget.
                          + +
                          + widget() + +  : mixed +
                          +
                          Outputs the Content of the Widget.
                          + +
                          + getDescription() + +  : string +
                          +
                          Returns the Description of the child widget.
                          + +
                          + getID() + +  : string +
                          +
                          Returns an unique ID as string used for the Widget Base ID.
                          + +
                          + getName() + +  : string +
                          +
                          Returns the Public name of the Widget to be displayed in the Configuration page.
                          + +
                          + getWidgetWidth() + +  : int +
                          +
                          Returns the width of the Widget. Default width is 250 pixel.
                          + +
                          + + + + + + + +
                          +

                          + Methods + +

                          +
                          +

                          + __construct() + +

                          + + +

                          Class Constructor. Registers the child Widget to WordPress.

                          + + + public + __construct() : mixed + +
                          + + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                            +
                          • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                          • +
                          +
                          + +
                          +
                          + since +
                          +
                          + 1.6.4 + +
                          + +
                          +
                          + contributor +
                          +
                          + +

                          @dartiss

                          +
                          + +
                          +
                          + link +
                          +
                          +

                          “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                          +
                          + +
                          +
                          + +
                          Return values
                          + mixed + — +
                          + + +
                          +
                          +

                          + form() + +

                          + + +

                          Outputs the Settings of the Widget.

                          + + + public + form(mixed $instance) : void + +
                          + +
                          Parameters
                          +
                          +
                          + $instance + : mixed +
                          +
                          +
                          + +
                          +
                          + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + void + — +

                          Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                          +
                          + + +
                          +
                          +

                          + widget() + +

                          + + +

                          Outputs the Content of the Widget.

                          + + + public + widget(mixed $args, mixed $instance) : mixed + +
                          + +
                          Parameters
                          +
                          +
                          + $args + : mixed +
                          +
                          +
                          + +
                          +
                          + $instance + : mixed +
                          +
                          +
                          + +
                          +
                          + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + mixed + — +
                          + + +
                          +
                          +

                          + getDescription() + +

                          + + +

                          Returns the Description of the child widget.

                          + + + protected + getDescription() : string + +
                          + + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + string + — +

                          Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                          +
                          + + +
                          +
                          +

                          + getID() + +

                          + + +

                          Returns an unique ID as string used for the Widget Base ID.

                          + + + protected + getID() : string + +
                          + + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + string + — +
                          + + +
                          +
                          +

                          + getName() + +

                          + + +

                          Returns the Public name of the Widget to be displayed in the Configuration page.

                          + + + protected + getName() : string + +
                          + + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + string + — +
                          + + +
                          +
                          +

                          + getWidgetWidth() + +

                          + + +

                          Returns the width of the Widget. Default width is 250 pixel.

                          + + + protected + getWidgetWidth() : int + +
                          + + + +
                          + Tags + +
                          +
                          +
                          + author +
                          +
                          + +

                          Stefan Herndler

                          +
                          + +
                          +
                          + since +
                          +
                          + 1.5.0 + +
                          + +
                          +
                          + +
                          Return values
                          + int + — +
                          + + +
                          +
                          + +
                          +
                          +
                          +
                          +

                          Search results

                          + +
                          +
                          +
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + + diff --git a/docs/classes/MCI-Footnotes-WidgetBase.html b/docs/classes/MCI-Footnotes-WidgetBase.html new file mode 100644 index 0000000..31cc342 --- /dev/null +++ b/docs/classes/MCI-Footnotes-WidgetBase.html @@ -0,0 +1,529 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                            +

                            Documentation

                            + + + + + +
                            + +
                            +
                            + + + + +
                            + + +
                            +

                            + MCI_Footnotes_WidgetBase + + + extends WP_Widget + + + + +

                            + + + +

                            Base Class for all Plugin Widgets. Registers each Widget to WordPress.

                            + +

                            The following Methods MUST be overwritten in each sub class: +public function widget($args, $instance) -> echo the Widget Content +public function form($instance) -> echo the Settings of the Widget

                            +
                            + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                            + +
                            +
                            + + + + + + +

                            + Table of Contents + +

                            + +
                            +
                            + __construct() + +  : mixed +
                            +
                            Class Constructor. Registers the child Widget to WordPress.
                            + +
                            + getDescription() + +  : string +
                            +
                            Returns the Description of the child widget.
                            + +
                            + getID() + +  : string +
                            +
                            Returns an unique ID as string used for the Widget Base ID.
                            + +
                            + getName() + +  : string +
                            +
                            Returns the Public name of child Widget to be displayed in the Configuration page.
                            + +
                            + getWidgetWidth() + +  : int +
                            +
                            Returns the width of the Widget. Default width is 250 pixel.
                            + +
                            + + + + + + + +
                            +

                            + Methods + +

                            +
                            +

                            + __construct() + +

                            + + +

                            Class Constructor. Registers the child Widget to WordPress.

                            + + + public + __construct() : mixed + +
                            + + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                              +
                            • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                            • +
                            +
                            + +
                            +
                            + since +
                            +
                            + 1.6.4 + +
                            + +
                            +
                            + contributor +
                            +
                            + +

                            @dartiss

                            +
                            + +
                            +
                            + link +
                            +
                            +

                            “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                            +
                            + +
                            +
                            + +
                            Return values
                            + mixed + — +
                            + + +
                            +
                            +

                            + getDescription() + +

                            + + +

                            Returns the Description of the child widget.

                            + + + protected + abstract getDescription() : string + +
                            + + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                            + +
                            +
                            + +
                            Return values
                            + string + — +
                            + + +
                            +
                            +

                            + getID() + +

                            + + +

                            Returns an unique ID as string used for the Widget Base ID.

                            + + + protected + abstract getID() : string + +
                            + + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                            + +
                            +
                            + +
                            Return values
                            + string + — +
                            + + +
                            +
                            +

                            + getName() + +

                            + + +

                            Returns the Public name of child Widget to be displayed in the Configuration page.

                            + + + protected + abstract getName() : string + +
                            + + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                            + +
                            +
                            + +
                            Return values
                            + string + — +
                            + + +
                            +
                            +

                            + getWidgetWidth() + +

                            + + +

                            Returns the width of the Widget. Default width is 250 pixel.

                            + + + protected + getWidgetWidth() : int + +
                            + + + +
                            + Tags + +
                            +
                            +
                            + author +
                            +
                            + +

                            Stefan Herndler

                            +
                            + +
                            +
                            + since +
                            +
                            + 1.5.0 + +
                            + +
                            +
                            + +
                            Return values
                            + int + — +
                            + + +
                            +
                            + +
                            +
                            +
                            +
                            +

                            Search results

                            + +
                            +
                            +
                              +
                              +
                              +
                              +
                              +
                              + + +
                              + + + + diff --git a/docs/classes/MCI-Footnotes.html b/docs/classes/MCI-Footnotes.html new file mode 100644 index 0000000..d09558a --- /dev/null +++ b/docs/classes/MCI-Footnotes.html @@ -0,0 +1,873 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                              +

                              Documentation

                              + + + + + +
                              + +
                              +
                              + + + + +
                              + + +
                              +

                              + MCI_Footnotes + + + + +

                              + + + +

                              Entry point of the Plugin. Loads the Dashboard and executes the Task.

                              + +
                              + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                              + +
                              +
                              + + + + + + +

                              + Table of Contents + +

                              + +
                              +
                              + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                              +
                              + +
                              + $a_bool_TooltipsEnabled + +  : bool +
                              +
                              Template process and script / stylesheet load optimization.
                              + +
                              + $a_obj_Task + +  : null|MCI_Footnotes_Task +
                              +
                              Reference to the Plugin Task object.
                              + +
                              + initializeWidgets() + +  : mixed +
                              +
                              Initializes all Widgets of the Plugin.
                              + +
                              + registerPublic() + +  : mixed +
                              +
                              Registers and enqueues scripts and stylesheets to the public pages.
                              + +
                              + run() + +  : mixed +
                              +
                              Executes the Plugin.
                              + +
                              + initializeDashboard() + +  : mixed +
                              +
                              Initializes the Dashboard of the Plugin and loads them.
                              + +
                              + initializeTask() + +  : mixed +
                              +
                              Initializes the Plugin Task and registers the Task hooks.
                              + +
                              + + + + + + +
                              +

                              + Properties + +

                              +
                              +

                              + $a_bool_AlternativeTooltipsEnabled + + + +

                              + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                              +
                              +

                              + $a_bool_TooltipsEnabled + + + +

                              + + +

                              Template process and script / stylesheet load optimization.

                              + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                                +
                              • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                              • +
                              +
                              + + +
                              + Tags + +
                              +
                              +
                              + since +
                              +
                              + 2.4.0 + +
                              + +
                              +
                              + date +
                              +
                              + +

                              2021-01-04T1355+0100

                              +
                              + +
                              +
                              + author +
                              +
                              + +

                              Patrizia Lutz @misfist

                              +
                              + +
                              +
                              + link +
                              +
                              + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                              +
                              + link +
                              +
                              +

                              repository

                              +
                              + +
                              +
                              + link +
                              +
                              +

                              diff

                              +
                              + +
                              +
                              + +
                              +
                              +

                              + $a_obj_Task + + + +

                              + + +

                              Reference to the Plugin Task object.

                              + + + public + null|MCI_Footnotes_Task + $a_obj_Task + = +ull + +
                              + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                              + +
                              +
                              + +
                              +
                              + +
                              +

                              + Methods + +

                              +
                              +

                              + initializeWidgets() + +

                              + + +

                              Initializes all Widgets of the Plugin.

                              + + + public + initializeWidgets() : mixed + +
                              + + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                                +
                              • Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution
                              • +
                              +
                              + +
                              +
                              + since +
                              +
                              + 1.6.5 + +
                              + +
                              +
                              + contributor +
                              +
                              + +

                              @felipelavinz

                              +
                              + +
                              +
                              + link +
                              +
                              + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                              +
                              + link +
                              +
                              + https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + +
                              +
                              + link +
                              +
                              + https://wordpress.org/support/topic/deprecated-function-create_function-14/ + +
                              +
                              + link +
                              +
                              +

                              create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0.

                              +
                              + +
                              +
                              + link +
                              +
                              +

                              The fix is to move add_action() above into run(), +and use the bare register_widget() here.

                              +
                              + +
                              +
                              + reporter +
                              +
                              + +

                              @psykonevro

                              +
                              + +
                              +
                              + reporter +
                              +
                              + +

                              @daliasued

                              +
                              + +
                              +
                              + see +
                              +
                              + self::run() + +

                              Also, the visibility of initializeWidgets() is not private any longer.

                              +
                              + +
                              +
                              + +
                              Return values
                              + mixed + — +
                              + + +
                              +
                              +

                              + registerPublic() + +

                              + + +

                              Registers and enqueues scripts and stylesheets to the public pages.

                              + + + public + registerPublic() : mixed + +
                              + + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                              + +
                              +
                              + since +
                              +
                              + 2.0.0 + +

                              Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution.

                              +
                              + +
                              +
                              + since +
                              +
                              + 2.0.3 + +

                              add versioning of public.css for cache busting 2020-10-29T1413+0100

                              +
                              + +
                              +
                              + since +
                              +
                              + 2.0.4 + +

                              add jQuery UI from WordPress 2020-11-01T1902+0100

                              +
                              + +
                              +
                              + since +
                              +
                              + 2.1.4 + +

                              automate passing version number for cache busting 2020-11-30T0646+0100

                              +
                              + +
                              +
                              + since +
                              +
                              + 2.1.4 + +

                              optionally enqueue an extra stylesheet 2020-12-04T2231+0100

                              +
                              + +
                              +
                              + +
                              Return values
                              + mixed + — +
                              + + +
                              +
                              +

                              + run() + +

                              + + +

                              Executes the Plugin.

                              + + + public + run() : mixed + +
                              + + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                                +
                              • Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution.
                              • +
                              +
                              + +
                              +
                              + since +
                              +
                              + 1.6.5 + +
                              + +
                              +
                              + contributor +
                              +
                              + +

                              @felipelavinz

                              +
                              + +
                              +
                              + link +
                              +
                              + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                              +
                              + see +
                              +
                              + self::initializeWidgets() + +
                              + +
                              +
                              + +
                              Return values
                              + mixed + — +
                              + + +
                              +
                              +

                              + initializeDashboard() + +

                              + + +

                              Initializes the Dashboard of the Plugin and loads them.

                              + + + private + initializeDashboard() : mixed + +
                              + + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                              + +
                              +
                              + +
                              Return values
                              + mixed + — +
                              + + +
                              +
                              +

                              + initializeTask() + +

                              + + +

                              Initializes the Plugin Task and registers the Task hooks.

                              + + + private + initializeTask() : mixed + +
                              + + + +
                              + Tags + +
                              +
                              +
                              + author +
                              +
                              + +

                              Stefan Herndler

                              +
                              + +
                              +
                              + since +
                              +
                              + 1.5.0 + +
                              + +
                              +
                              + +
                              Return values
                              + mixed + — +
                              + + +
                              +
                              + +
                              +
                              +
                              +
                              +

                              Search results

                              + +
                              +
                              +
                                +
                                +
                                +
                                +
                                +
                                + + +
                                + + + + diff --git a/docs/css/base.css b/docs/css/base.css new file mode 100644 index 0000000..3fa8f23 --- /dev/null +++ b/docs/css/base.css @@ -0,0 +1,1002 @@ + +:root { + /* Typography */ + --font-primary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --font-secondary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --line-height--primary: 1.6; + --letter-spacing--primary: .05rem; + --text-base-size: 1em; + --text-scale-ratio: 1.2; + + --text-xxs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-xs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-sm: calc(var(--text-base-size) / var(--text-scale-ratio)); + --text-md: var(--text-base-size); + --text-lg: calc(var(--text-base-size) * var(--text-scale-ratio)); + --text-xl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + + /* Colors */ + --primary-color: hsl(96, 57%, 60%); + --primary-color-darken: hsl(96, 57%, 40%); + --primary-color-darker: hsl(96, 57%, 20%); + --primary-color-lighten: hsl(96, 57%, 80%); + --primary-color-lighter: hsl(96, 57%, 97%); + --dark-gray: #d1d1d1; + --light-gray: #f0f0f0; + + --text-color: #4b3b40; + + --header-height: var(--spacing-xxxxl); + --header-bg-color: var(--primary-color); + --code-background-color: #f7faf5; + --code-border-color: #d6e7cb; + --button-border-color: var(--primary-color-darken); + --button-color: transparent; + --button-color-primary: var(--primary-color); + --button-text-color: #555; + --button-text-color-primary: white; + --popover-background-color: rgba(255, 255, 255, 0.75); + --link-color-primary: var(--primary-color-darken); + --link-hover-color-primary: var(--primary-color-darker); + --form-field-border-color: var(--dark-gray); + --form-field-color: #fff; + --admonition-success-color: var(--primary-color); + --admonition-border-color: silver; + --table-separator-color: var(--primary-color-lighten); + --title-text-color: var(--primary-color); + + --sidebar-border-color: var(--primary-color-lighten); + + /* Grid */ + --container-width: 1400px; + + /* Spacing */ + --spacing-base-size: 1rem; + --spacing-scale-ratio: 1.5; + + --spacing-xxxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-sm: calc(var(--spacing-base-size) / var(--spacing-scale-ratio)); + --spacing-md: var(--spacing-base-size); + --spacing-lg: calc(var(--spacing-base-size) * var(--spacing-scale-ratio)); + --spacing-xl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + + --border-radius-base-size: 3px; +} + +/* Base Styles +-------------------------------------------------- */ +body { + color: var(--text-color); + font-family: var(--font-primary); + font-size: var(--text-md); + letter-spacing: var(--letter-spacing--primary); + line-height: var(--line-height--primary); +} + +.phpdocumentor h1, +.phpdocumentor h2, +.phpdocumentor h3, +.phpdocumentor h4, +.phpdocumentor h5, +.phpdocumentor h6 { + margin-bottom: var(--spacing-lg); + margin-top: var(--spacing-lg); + font-weight: 600; +} + +.phpdocumentor h1 { + font-size: var(--text-xxxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.2; + margin-top: 0; +} + +.phpdocumentor h2 { + font-size: var(--text-xxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.25; + margin-top: 0; +} + +.phpdocumentor h3 { + font-size: var(--text-xxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.3; +} + +.phpdocumentor h4 { + font-size: var(--text-xl); + letter-spacing: calc(var(--letter-spacing--primary) / 2); + line-height: 1.35; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor h5 { + font-size: var(--text-lg); + letter-spacing: calc(var(--letter-spacing--primary) / 4); + line-height: 1.5; + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h6 { + font-size: var(--text-md); + letter-spacing: 0; + line-height: var(--line-height--primary); + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h1 .headerlink, +.phpdocumentor h2 .headerlink, +.phpdocumentor h3 .headerlink, +.phpdocumentor h4 .headerlink, +.phpdocumentor h5 .headerlink, +.phpdocumentor h6 .headerlink +{ + transition: all .3s ease-in-out; + opacity: 0; + text-decoration: none; + color: silver; + font-size: 80%; +} + +.phpdocumentor h1:hover .headerlink, +.phpdocumentor h2:hover .headerlink, +.phpdocumentor h3:hover .headerlink, +.phpdocumentor h4:hover .headerlink, +.phpdocumentor h5:hover .headerlink, +.phpdocumentor h6:hover .headerlink +{ + opacity: 1; +} +.phpdocumentor p { + margin-top: 0; + margin-bottom: var(--spacing-md); +} +.phpdocumentor figure { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-line { + border-top: 1px solid #E1E1E1; + border-width: 0; + margin-bottom: var(--spacing-xxl); + margin-top: var(--spacing-xxl); +} +.phpdocumentor-section { + box-sizing: border-box; + margin: 0 auto; + max-width: var(--container-width); + padding: 0 var(--spacing-lg); + position: relative; + width: 100%; +} + +@media (min-width: 1200px) { + .phpdocumentor-section { + padding: 0; + width: 95%; + } +} +.phpdocumentor-column { + box-sizing: border-box; + float: left; + width: 100%; +} + +@media (min-width: 550px) { + .phpdocumentor-column { + margin-left: 4%; + } + + .phpdocumentor-column:first-child { + margin-left: 0; + } + + .-one.phpdocumentor-column { + width: 4.66666666667%; + } + + .-two.phpdocumentor-column { + width: 13.3333333333%; + } + + .-three.phpdocumentor-column { + width: 22%; + } + + .-four.phpdocumentor-column { + width: 30.6666666667%; + } + + .-five.phpdocumentor-column { + width: 39.3333333333%; + } + + .-six.phpdocumentor-column { + width: 48%; + } + + .-seven.phpdocumentor-column { + width: 56.6666666667%; + } + + .-eight.phpdocumentor-column { + width: 65.3333333333%; + } + + .-nine.phpdocumentor-column { + width: 74.0%; + } + + .-ten.phpdocumentor-column { + width: 82.6666666667%; + } + + .-eleven.phpdocumentor-column { + width: 91.3333333333%; + } + + .-twelve.phpdocumentor-column { + margin-left: 0; + width: 100%; + } + + .-one-third.phpdocumentor-column { + width: 30.6666666667%; + } + + .-two-thirds.phpdocumentor-column { + width: 65.3333333333%; + } + + .-one-half.phpdocumentor-column { + width: 48%; + } + + /* Offsets */ + .-offset-by-one.phpdocumentor-column { + margin-left: 8.66666666667%; + } + + .-offset-by-two.phpdocumentor-column { + margin-left: 17.3333333333%; + } + + .-offset-by-three.phpdocumentor-column { + margin-left: 26%; + } + + .-offset-by-four.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-five.phpdocumentor-column { + margin-left: 43.3333333333%; + } + + .-offset-by-six.phpdocumentor-column { + margin-left: 52%; + } + + .-offset-by-seven.phpdocumentor-column { + margin-left: 60.6666666667%; + } + + .-offset-by-eight.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-nine.phpdocumentor-column { + margin-left: 78.0%; + } + + .-offset-by-ten.phpdocumentor-column { + margin-left: 86.6666666667%; + } + + .-offset-by-eleven.phpdocumentor-column { + margin-left: 95.3333333333%; + } + + .-offset-by-one-third.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-two-thirds.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-one-half.phpdocumentor-column { + margin-left: 52%; + } +} +.phpdocumentor a { + color: var(--link-color-primary); +} + +.phpdocumentor a:hover { + color: var(--link-hover-color-primary); +} +.phpdocumentor-button { + background-color: var(--button-color); + border: 1px solid var(--button-border-color); + border-radius: var(--border-radius-base-size); + box-sizing: border-box; + color: var(--button-text-color); + cursor: pointer; + display: inline-block; + font-size: var(--text-sm); + font-weight: 600; + height: 38px; + letter-spacing: .1rem; + line-height: 38px; + padding: 0 var(--spacing-xxl); + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-button .-wide { + width: 100%; +} + +.phpdocumentor-button:hover, +.phpdocumentor-button:focus { + border-color: #888; + color: #333; + outline: 0; +} + +.phpdocumentor-button.-primary { + background-color: var(--button-color-primary); + border-color: var(--button-color-primary); + color: var(--button-text-color-primary); +} + +.phpdocumentor-button.-primary:hover, +.phpdocumentor-button.-primary:focus { + background-color: var(--link-color-primary); + border-color: var(--link-color-primary); + color: var(--button-text-color-primary); +} +.phpdocumentor form { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-field { + background-color: var(--form-field-color); + border: 1px solid var(--form-field-border-color); + border-radius: var(--border-radius-base-size); + box-shadow: none; + box-sizing: border-box; + height: 38px; + padding: var(--spacing-xxxs) var(--spacing-xxs); /* The 6px vertically centers text on FF, ignored by Webkit */ + margin-bottom: var(--spacing-md); +} + +/* Removes awkward default styles on some inputs for iOS */ +input[type="email"], +input[type="number"], +input[type="search"], +input[type="text"], +input[type="tel"], +input[type="url"], +input[type="password"], +textarea { + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; +} + +.phpdocumentor-textarea { + min-height: 65px; + padding-bottom: var(--spacing-xxxs); + padding-top: var(--spacing-xxxs); +} + +.phpdocumentor-field:focus { + border: 1px solid var(--button-color-primary); + outline: 0; +} + +.phpdocumentor-label { + display: block; + margin-bottom: var(--spacing-xs); +} + +.phpdocumentor-fieldset { + border-width: 0; + padding: 0; +} + +input[type="checkbox"].phpdocumentor-field, +input[type="radio"].phpdocumentor-field { + display: inline; +} +div.phpdocumentor-list > ul, +ul.phpdocumentor-list { + list-style: circle inside; +} + +ol.phpdocumentor-list { + list-style: decimal inside; +} + +div.phpdocumentor-list > ul, +ol.phpdocumentor-list, +ul.phpdocumentor-list { + margin-top: 0; + padding-left: 0; + margin-bottom: var(--spacing-md); +} + +dl { + margin-bottom: var(--spacing-md); +} + +div.phpdocumentor-list > ul ul, +ul.phpdocumentor-list ul.phpdocumentor-list, +ul.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ul.phpdocumentor-list { + font-size: var(--text-sm); + margin: var(--spacing-xs) 0 var(--spacing-xs) calc(var(--spacing-xs) * 2); +} + +li.phpdocumentor-list { + margin-bottom: var(--spacing-md); +} +.phpdocumentor pre { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-code { + background: var(--code-background-color); + border: 1px solid var(--code-border-color); + border-radius: var(--border-radius-base-size); + font-size: var(--text-sm); + padding: var(--spacing-sm) var(--spacing-md); + width: 100%; + box-sizing: border-box; +} + +pre > .phpdocumentor-code { + display: block; + white-space: pre; +} +.phpdocumentor blockquote { + border-left: 4px solid var(--primary-color); + margin: var(--spacing-md) 0; + padding: var(--spacing-xs) var(--spacing-sm); + color: var(--primary-color-darker); + font-style: italic; + font-size: var(--text-sm); +} +.phpdocumentor table { + margin-bottom: var(--spacing-md); +} + +th.phpdocumentor-heading, +td.phpdocumentor-cell { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) var(--spacing-md); + text-align: left; +} + +th.phpdocumentor-heading:first-child, +td.phpdocumentor-cell:first-child { + padding-left: 0; +} + +th.phpdocumentor-heading:last-child, +td.phpdocumentor-cell:last-child { + padding-right: 0; +} + +.phpdocumentor-header { + display: flex; + flex-direction: row; + align-items: stretch; + flex-wrap: wrap; + justify-content: space-between; + height: auto; + padding: var(--spacing-md) var(--spacing-md); +} + +.phpdocumentor-header__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-header__menu-icon { + font-size: 2rem; + color: var(--primary-color); +} + +.phpdocumentor-header__menu-button:checked ~ .phpdocumentor-topnav { + max-height: 250px; + padding-top: var(--spacing-md); +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + flex-direction: row; + padding: var(--spacing-lg) var(--spacing-lg); + min-height: var(--header-height); + } + + .phpdocumentor-header__menu-icon { + display: none; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + padding-top: 0; + padding-bottom: 0; + } +} +@media (min-width: 1200px) { + .phpdocumentor-header { + padding: 0; + } +} +.phpdocumentor-title { + box-sizing: border-box; + color: var(--title-text-color); + font-size: var(--text-xxl); + letter-spacing: .05rem; + font-weight: normal; + width: auto; + margin: 0; + display: flex; + align-items: center; +} + +.phpdocumentor-title.-without-divider { + border: none; +} + +.phpdocumentor-title__link { + transition: all .3s ease-out; + display: flex; + color: var(--title-text-color); + text-decoration: none; + font-weight: normal; + white-space: nowrap; + transform: scale(.75); + transform-origin: left; +} + +.phpdocumentor-title__link:hover { + transform: perspective(15rem) translateX(.5rem); + font-weight: 600; +} + +@media (min-width: 1000px) { + .phpdocumentor-title { + width: 30.6666666667%; + border-right: var(--sidebar-border-color) solid 1px; + } + + .phpdocumentor-title__link { + transform-origin: left; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-title__link { + transform: scale(.85); + } +} + +@media (min-width: 1200px) { + .phpdocumentor-title__link { + transform: scale(1); + } +} +.phpdocumentor-topnav { + display: flex; + align-items: center; + margin: 0; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s ease-out; + flex-basis: 100%; +} + +.phpdocumentor-topnav__menu { + text-align: right; + list-style: none; + margin: 0; + padding: 0; + flex: 1; + display: flex; + flex-flow: row wrap; + justify-content: center; +} + +.phpdocumentor-topnav__menu-item { + margin: 0; + width: 100%; + display: inline-block; + text-align: center; + padding: var(--spacing-sm) 0 +} + +.phpdocumentor-topnav__menu-item.-social { + width: auto; + padding: var(--spacing-sm) +} + +.phpdocumentor-topnav__menu-item a { + display: inline-block; + color: var(--text-color); + text-decoration: none; + font-size: var(--text-lg); + transition: all .3s ease-out; + border-bottom: 1px dotted transparent; + line-height: 1; +} + +.phpdocumentor-topnav__menu-item a:hover { + transform: perspective(15rem) translateY(.1rem); + border-bottom: 1px dotted var(--text-color); +} + +@media (min-width: 1000px) { + .phpdocumentor-topnav { + max-height: none; + overflow: visible; + flex-basis: auto; + } + + .phpdocumentor-topnav__menu { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; + } + + .phpdocumentor-topnav__menu-item, + .phpdocumentor-topnav__menu-item.-social { + width: auto; + display: inline; + text-align: right; + padding: 0 0 0 var(--spacing-md) + } +} +.phpdocumentor-sidebar { + margin: 0; + overflow: hidden; + max-height: 0; +} + +.phpdocumentor .phpdocumentor-sidebar .phpdocumentor-list { + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + list-style: none; +} + +.phpdocumentor .phpdocumentor-sidebar li { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 0 0 var(--spacing-xxxs) var(--spacing-md); +} + +.phpdocumentor .phpdocumentor-sidebar abbr, +.phpdocumentor .phpdocumentor-sidebar a { + text-decoration: none; + border-bottom: none; + color: var(--text-color); + font-size: var(--text-md); + padding-left: 0; + transition: padding-left .4s ease-out; +} + +.phpdocumentor .phpdocumentor-sidebar a:hover { + padding-left: 5px; + font-weight: 600; +} + +.phpdocumentor .phpdocumentor-sidebar__category > * { + border-left: 1px solid var(--primary-color-lighten); +} + +.phpdocumentor .phpdocumentor-sidebar__category { + margin-bottom: var(--spacing-lg); +} + +.phpdocumentor .phpdocumentor-sidebar__category-header { + font-size: var(--text-md); + margin-bottom: var(--spacing-xs); + color: var(--link-color-primary); + font-weight: 600; + border-left: 0; +} + +.phpdocumentor .phpdocumentor-sidebar__root-package, +.phpdocumentor .phpdocumentor-sidebar__root-namespace { + font-size: var(--text-md); + margin: 0; + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + color: var(--text-color); + font-weight: normal; +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + border-right: var(--sidebar-border-color) solid 1px; + } +} + +.phpdocumentor-sidebar__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-sidebar__menu-icon { + font-size: var(--text-md); + font-weight: 600; + background: var(--primary-color); + color: white; + margin: 0 0 var(--spacing-lg); + display: block; + padding: var(--spacing-sm); + text-align: center; + border-radius: 3px; + text-transform: uppercase; + letter-spacing: .15rem; +} + +.phpdocumentor-sidebar__menu-button:checked ~ .phpdocumentor-sidebar { + max-height: 100%; + padding-top: var(--spacing-md); +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + overflow: visible; + max-height: 100%; + } + + .phpdocumentor-sidebar__menu-icon { + display: none; + } +} +.phpdocumentor-admonition { + border: 1px solid var(--admonition-border-color); + border-radius: var(--border-radius-base-size); + border-color: var(--primary-color-lighten); + background-color: var(--primary-color-lighter); + font-size: 85%; + padding: .5rem; + margin: 2rem 0; + display: flex; + flex-direction: row; +} + +.phpdocumentor-admonition--success { + border-color: var(--admonition-success-color); +} + +.phpdocumentor-admonition__icon { + font-size: 2rem; + margin: .75rem 0.75rem 1.25rem 0.5rem; + color: var(--primary-color); +} +.phpdocumentor ul.phpdocumentor-breadcrumbs { + font-size: var(--text-md); + list-style: none; + margin: 0; + padding: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs a { + color: var(--text-color); + text-decoration: none; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li { + display: inline-block; + margin: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li + li:before { + color: var(--dark-gray); + content: "\\\A0"; + padding: 0; +} +.phpdocumentor .phpdocumentor-back-to-top { + position: fixed; + bottom: 2rem; + font-size: 2.5rem; + opacity: .25; + transition: all .3s ease-in-out; + right: 2rem; +} + +.phpdocumentor .phpdocumentor-back-to-top:hover { + color: var(--link-color-primary); + opacity: 1; +} +.phpdocumentor-search { + position: relative; + display: none; /** disable by default for non-js flow */ + opacity: .3; /** white-out default for loading indication */ + transition: opacity .3s, background .3s; + margin: var(--spacing-sm) 0; + flex: 1; + min-width: 100%; +} + +.phpdocumentor-search label { + display: flex; + align-items: center; + flex: 1; +} + +.phpdocumentor-search__icon { + color: var(--primary-color); + margin-right: var(--spacing-sm); + width: 1rem; + height: 1rem; +} + +.phpdocumentor-search--enabled { + display: flex; +} + +.phpdocumentor-search--active { + opacity: 1; +} + +.phpdocumentor-search input:disabled { + background-color: lightgray; +} + +.phpdocumentor-search__field:focus, +.phpdocumentor-search__field { + margin-bottom: 0; + border: 0; + border-bottom: 2px solid var(--primary-color); + padding: 0; + border-radius: 0; + flex: 1; +} + +@media (min-width: 1000px) { + .phpdocumentor-search { + min-width: auto; + max-width: 20rem; + margin: 0 0 0 auto; + } +} +.phpdocumentor-content { + position: relative; +} + +.phpdocumentor-search-results { + backdrop-filter: blur(5px); + background: var(--popover-background-color); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + padding: 0; + opacity: 1; + pointer-events: all; + + transition: opacity .3s, background .3s; +} + +.phpdocumentor-search-results--hidden { + background: transparent; + backdrop-filter: blur(0); + opacity: 0; + pointer-events: none; +} + +.phpdocumentor-search-results__dialog { + width: 100%; + background: white; + max-height: 100%; + display: flex; + flex-direction: column; +} + +.phpdocumentor-search-results__body { + overflow: auto; +} + +.phpdocumentor-search-results__header { + padding: var(--spacing-lg); + display: flex; + justify-content: space-between; + background: var(--primary-color-darken); + color: white; + align-items: center; +} + +.phpdocumentor-search-results__close { + font-size: var(--text-xl); + background: none; + border: none; + padding: 0; + margin: 0; +} + +.phpdocumentor .phpdocumentor-search-results__title { + font-size: var(--text-xl); + margin-bottom: 0; +} + +.phpdocumentor-search-results__entries { + list-style: none; + padding: 0 var(--spacing-lg); + margin: 0; +} + +.phpdocumentor-search-results__entry { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) 0; + text-align: left; +} + +.phpdocumentor-search-results__entry a { + display: block; +} + +.phpdocumentor-search-results__entry small { + margin-top: var(--spacing-xs); + margin-bottom: var(--spacing-md); + color: var(--primary-color-darker); + display: block; + word-break: break-word; +} + +.phpdocumentor-search-results__entry h3 { + font-size: var(--text-lg); + margin: 0; +} + +@media (min-width: 550px) { + .phpdocumentor-search-results { + padding: 0 var(--spacing-lg); + } + + .phpdocumentor-search-results__entry h3 { + font-size: var(--text-xxl); + } + + .phpdocumentor-search-results__dialog { + margin: var(--spacing-xl) auto; + max-width: 40rem; + background: white; + border: 1px solid silver; + box-shadow: 0 2px 5px silver; + max-height: 40rem; + border-radius: 3px; + } +} + +/* Used for screen readers and such */ +.visually-hidden { + display: none; +} diff --git a/docs/css/normalize.css b/docs/css/normalize.css new file mode 100644 index 0000000..46f646a --- /dev/null +++ b/docs/css/normalize.css @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/docs/css/template.css b/docs/css/template.css new file mode 100644 index 0000000..fb905f3 --- /dev/null +++ b/docs/css/template.css @@ -0,0 +1,169 @@ +.phpdocumentor-summary { + font-style: italic; +} +.phpdocumentor-description { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-element { + position: relative; +} + +.phpdocumentor .phpdocumentor-element__name { + line-height: 1; +} + +.phpdocumentor-element__package, +.phpdocumentor-element__extends, +.phpdocumentor-element__implements { + display: block; + font-size: var(--text-xxs); + font-weight: normal; + opacity: .7; +} + +.phpdocumentor-element__package .phpdocumentor-breadcrumbs { + display: inline; +} + +.phpdocumentor-element:not(:last-child) { + border-bottom: 1px solid var(--primary-color-lighten); + padding-bottom: var(--spacing-lg); +} + +.phpdocumentor-element.-deprecated .phpdocumentor-element__name { + text-decoration: line-through; +} + +.phpdocumentor-element__modifier { + font-size: var(--text-xxs); + padding: calc(var(--spacing-base-size) / 4) calc(var(--spacing-base-size) / 2); + color: var(--text-color); + background-color: var(--light-gray); + border-radius: 3px; + text-transform: uppercase; +} +.phpdocumentor-signature { + display: inline-block; + font-size: var(--text-sm); + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-signature.-deprecated .phpdocumentor-signature__name { + text-decoration: line-through; +} +.phpdocumentor-table-of-contents { +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry { + padding-top: var(--spacing-xs); + margin-left: 2rem; + display: flex; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > a { + flex: 0 1 auto; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > span { + flex: 1; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:after { + content: ''; + height: 12px; + width: 12px; + left: 16px; + position: absolute; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-private:after { + background: url('data:image/svg+xml;utf8,') no-repeat; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-protected:after { + left: 13px; + background: url('data:image/svg+xml;utf8,') no-repeat; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:before { + width: 1.25rem; + height: 1.25rem; + line-height: 1.25rem; + background: transparent url('data:image/svg+xml;utf8,') no-repeat center center; + content: ''; + position: absolute; + left: 0; + border-radius: 50%; + font-weight: 600; + color: white; + text-align: center; + font-size: .75rem; + margin-top: .2rem; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-method:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-function:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-property:before { + content: 'P' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-constant:before { + content: 'C'; + background-color: transparent; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-class:before { + content: 'C' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-interface:before { + content: 'I' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-trait:before { + content: 'T' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-namespace:before { + content: 'N' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-package:before { + content: 'P' +} + +.phpdocumentor-table-of-contents dd { + font-style: italic; + margin-left: 2rem; +} +.phpdocumentor-element-found-in { + position: absolute; + top: 0; + right: 0; + font-size: var(--text-sm); + color: gray; +} +.phpdocumentor-class-graph { + width: 100%; height: 600px; border:1px solid black; overflow: hidden +} + +.phpdocumentor-class-graph__graph { + width: 100%; +} +.phpdocumentor-tag-list__definition { + display: flex; +} + +.phpdocumentor-tag-link { + margin-right: var(--spacing-sm); +} diff --git a/docs/files/class-config.html b/docs/files/class-config.html new file mode 100644 index 0000000..27fa852 --- /dev/null +++ b/docs/files/class-config.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                +

                                Documentation

                                + + + + + +
                                + +
                                +
                                + + + + +
                                + + +
                                +

                                config.php

                                + + + +

                                + Interfaces, Classes and Traits + +

                                + +
                                + +
                                MCI_Footnotes_Config
                                +
                                Contains all Plugin Constants. Contains no Method or Property.
                                + +
                                + + + + + + + +
                                +
                                +
                                +
                                +

                                Search results

                                + +
                                +
                                +
                                  +
                                  +
                                  +
                                  +
                                  +
                                  + + +
                                  + + + + diff --git a/docs/files/class-convert.html b/docs/files/class-convert.html new file mode 100644 index 0000000..332a478 --- /dev/null +++ b/docs/files/class-convert.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                  +

                                  Documentation

                                  + + + + + +
                                  + +
                                  +
                                  + + + + +
                                  + + +
                                  +

                                  convert.php

                                  + + + +

                                  + Interfaces, Classes and Traits + +

                                  + +
                                  + +
                                  MCI_Footnotes_Convert
                                  +
                                  Converts data types and Footnotes specific values.
                                  + +
                                  + + + + + + + +
                                  +
                                  +
                                  +
                                  +

                                  Search results

                                  + +
                                  +
                                  +
                                    +
                                    +
                                    +
                                    +
                                    +
                                    + + +
                                    + + + + diff --git a/docs/files/class-dashboard-init.html b/docs/files/class-dashboard-init.html new file mode 100644 index 0000000..b64a13d --- /dev/null +++ b/docs/files/class-dashboard-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                    +

                                    Documentation

                                    + + + + + +
                                    + +
                                    +
                                    + + + + +
                                    + + +
                                    +

                                    init.php

                                    + + + +

                                    + Interfaces, Classes and Traits + +

                                    + +
                                    + +
                                    MCI_Footnotes_Layout_Init
                                    +
                                    Handles the Settings interface of the Plugin.
                                    + +
                                    + + + + + + + +
                                    +
                                    +
                                    +
                                    +

                                    Search results

                                    + +
                                    +
                                    +
                                      +
                                      +
                                      +
                                      +
                                      +
                                      + + +
                                      + + + + diff --git a/docs/files/class-dashboard-layout.html b/docs/files/class-dashboard-layout.html new file mode 100644 index 0000000..18778f8 --- /dev/null +++ b/docs/files/class-dashboard-layout.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                      +

                                      Documentation

                                      + + + + + +
                                      + +
                                      +
                                      + + + + +
                                      + + +
                                      +

                                      layout.php

                                      + + + +

                                      + Interfaces, Classes and Traits + +

                                      + +
                                      + +
                                      MCI_Footnotes_LayoutEngine
                                      +
                                      Layout Engine for the administration dashboard.
                                      + +
                                      + + + + + + + +
                                      +
                                      +
                                      +
                                      +

                                      Search results

                                      + +
                                      +
                                      +
                                        +
                                        +
                                        +
                                        +
                                        +
                                        + + +
                                        + + + + diff --git a/docs/files/class-dashboard-subpage-diagnostics.html b/docs/files/class-dashboard-subpage-diagnostics.html new file mode 100644 index 0000000..e6ed92b --- /dev/null +++ b/docs/files/class-dashboard-subpage-diagnostics.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                        +

                                        Documentation

                                        + + + + + +
                                        + +
                                        +
                                        + + + + +
                                        + + +
                                        +

                                        subpage-diagnostics.php

                                        + + + +

                                        + Interfaces, Classes and Traits + +

                                        + +
                                        + +
                                        MCI_Footnotes_Layout_Diagnostics
                                        +
                                        Displays Diagnostics of the web server, PHP and WordPress.
                                        + +
                                        + + + + + + + +
                                        +
                                        +
                                        +
                                        +

                                        Search results

                                        + +
                                        +
                                        +
                                          +
                                          +
                                          +
                                          +
                                          +
                                          + + +
                                          + + + + diff --git a/docs/files/class-dashboard-subpage-main.html b/docs/files/class-dashboard-subpage-main.html new file mode 100644 index 0000000..62a90fc --- /dev/null +++ b/docs/files/class-dashboard-subpage-main.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                          +

                                          Documentation

                                          + + + + + +
                                          + +
                                          +
                                          + + + + +
                                          + + +
                                          +

                                          subpage-main.php

                                          + + + +

                                          + Interfaces, Classes and Traits + +

                                          + +
                                          + +
                                          MCI_Footnotes_Layout_Settings
                                          +
                                          Displays and handles all Settings of the Plugin.
                                          + +
                                          + + + + + + + +
                                          +
                                          +
                                          +
                                          +

                                          Search results

                                          + +
                                          +
                                          +
                                            +
                                            +
                                            +
                                            +
                                            +
                                            + + +
                                            + + + + diff --git a/docs/files/class-hooks.html b/docs/files/class-hooks.html new file mode 100644 index 0000000..b57ef84 --- /dev/null +++ b/docs/files/class-hooks.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                            +

                                            Documentation

                                            + + + + + +
                                            + +
                                            +
                                            + + + + +
                                            + + +
                                            +

                                            hooks.php

                                            + + + +

                                            + Interfaces, Classes and Traits + +

                                            + +
                                            + +
                                            MCI_Footnotes_Hooks
                                            +
                                            Registers all WordPress Hooks and executes them on demand.
                                            + +
                                            + + + + + + + +
                                            +
                                            +
                                            +
                                            +

                                            Search results

                                            + +
                                            +
                                            +
                                              +
                                              +
                                              +
                                              +
                                              +
                                              + + +
                                              + + + + diff --git a/docs/files/class-init.html b/docs/files/class-init.html new file mode 100644 index 0000000..27020fe --- /dev/null +++ b/docs/files/class-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                              +

                                              Documentation

                                              + + + + + +
                                              + +
                                              +
                                              + + + + +
                                              + + +
                                              +

                                              init.php

                                              + + + +

                                              + Interfaces, Classes and Traits + +

                                              + +
                                              + +
                                              MCI_Footnotes
                                              +
                                              Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                              + +
                                              + + + + + + + +
                                              +
                                              +
                                              +
                                              +

                                              Search results

                                              + +
                                              +
                                              +
                                                +
                                                +
                                                +
                                                +
                                                +
                                                + + +
                                                + + + + diff --git a/docs/files/class-language.html b/docs/files/class-language.html new file mode 100644 index 0000000..db941a6 --- /dev/null +++ b/docs/files/class-language.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                +

                                                Documentation

                                                + + + + + +
                                                + +
                                                +
                                                + + + + +
                                                + + +
                                                +

                                                language.php

                                                + + + +

                                                + Interfaces, Classes and Traits + +

                                                + +
                                                + +
                                                MCI_Footnotes_Language
                                                +
                                                Loads text domain of current or default language for localization.
                                                + +
                                                + + + + + + + +
                                                +
                                                +
                                                +
                                                +

                                                Search results

                                                + +
                                                +
                                                +
                                                  +
                                                  +
                                                  +
                                                  +
                                                  +
                                                  + + +
                                                  + + + + diff --git a/docs/files/class-settings.html b/docs/files/class-settings.html new file mode 100644 index 0000000..910ad5e --- /dev/null +++ b/docs/files/class-settings.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                  +

                                                  Documentation

                                                  + + + + + +
                                                  + +
                                                  +
                                                  + + + + +
                                                  + + +
                                                  +

                                                  settings.php

                                                  + + + +

                                                  + Interfaces, Classes and Traits + +

                                                  + +
                                                  + +
                                                  MCI_Footnotes_Settings
                                                  +
                                                  Loads the settings values, sets to default values if undefined.
                                                  + +
                                                  + + + + + + + +
                                                  +
                                                  +
                                                  +
                                                  +

                                                  Search results

                                                  + +
                                                  +
                                                  +
                                                    +
                                                    +
                                                    +
                                                    +
                                                    +
                                                    + + +
                                                    + + + + diff --git a/docs/files/class-task.html b/docs/files/class-task.html new file mode 100644 index 0000000..d4b6618 --- /dev/null +++ b/docs/files/class-task.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                    +

                                                    Documentation

                                                    + + + + + +
                                                    + +
                                                    +
                                                    + + + + +
                                                    + + +
                                                    +

                                                    task.php

                                                    + + + +

                                                    + Interfaces, Classes and Traits + +

                                                    + +
                                                    + +
                                                    MCI_Footnotes_Task
                                                    +
                                                    Searches and replaces the footnotes.
                                                    + +
                                                    + + + + + + + +
                                                    +
                                                    +
                                                    +
                                                    +

                                                    Search results

                                                    + +
                                                    +
                                                    +
                                                      +
                                                      +
                                                      +
                                                      +
                                                      +
                                                      + + +
                                                      + + + + diff --git a/docs/files/class-template.html b/docs/files/class-template.html new file mode 100644 index 0000000..09b8714 --- /dev/null +++ b/docs/files/class-template.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                      +

                                                      Documentation

                                                      + + + + + +
                                                      + +
                                                      +
                                                      + + + + +
                                                      + + +
                                                      +

                                                      template.php

                                                      + + + +

                                                      + Interfaces, Classes and Traits + +

                                                      + +
                                                      + +
                                                      MCI_Footnotes_Template
                                                      +
                                                      Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                      + +
                                                      + + + + + + + +
                                                      +
                                                      +
                                                      +
                                                      +

                                                      Search results

                                                      + +
                                                      +
                                                      +
                                                        +
                                                        +
                                                        +
                                                        +
                                                        +
                                                        + + +
                                                        + + + + diff --git a/docs/files/class-widgets-base.html b/docs/files/class-widgets-base.html new file mode 100644 index 0000000..edfbc18 --- /dev/null +++ b/docs/files/class-widgets-base.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                        +

                                                        Documentation

                                                        + + + + + +
                                                        + +
                                                        +
                                                        + + + + +
                                                        + + +
                                                        +

                                                        base.php

                                                        + + + +

                                                        + Interfaces, Classes and Traits + +

                                                        + +
                                                        + +
                                                        MCI_Footnotes_WidgetBase
                                                        +
                                                        Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                        + +
                                                        + + + + + + + +
                                                        +
                                                        +
                                                        +
                                                        +

                                                        Search results

                                                        + +
                                                        +
                                                        +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          + + +
                                                          + + + + diff --git a/docs/files/class-widgets-reference-container.html b/docs/files/class-widgets-reference-container.html new file mode 100644 index 0000000..9553b8a --- /dev/null +++ b/docs/files/class-widgets-reference-container.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                          +

                                                          Documentation

                                                          + + + + + +
                                                          + +
                                                          +
                                                          + + + + +
                                                          + + +
                                                          +

                                                          reference-container.php

                                                          + + + +

                                                          + Interfaces, Classes and Traits + +

                                                          + +
                                                          + +
                                                          MCI_Footnotes_Widget_ReferenceContainer
                                                          +
                                                          Registers a Widget to put the Reference Container to the widget area.
                                                          + +
                                                          + + + + + + + +
                                                          +
                                                          +
                                                          +
                                                          +

                                                          Search results

                                                          + +
                                                          +
                                                          +
                                                            +
                                                            +
                                                            +
                                                            +
                                                            +
                                                            + + +
                                                            + + + + diff --git a/docs/files/class-wysiwyg.html b/docs/files/class-wysiwyg.html new file mode 100644 index 0000000..59d1315 --- /dev/null +++ b/docs/files/class-wysiwyg.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                            +

                                                            Documentation

                                                            + + + + + +
                                                            + +
                                                            +
                                                            + + + + +
                                                            + + +
                                                            +

                                                            wysiwyg.php

                                                            + + + +

                                                            + Interfaces, Classes and Traits + +

                                                            + +
                                                            + +
                                                            MCI_Footnotes_WYSIWYG
                                                            +
                                                            + +
                                                            + + + + + + + +
                                                            +
                                                            +
                                                            +
                                                            +

                                                            Search results

                                                            + +
                                                            +
                                                            +
                                                              +
                                                              +
                                                              +
                                                              +
                                                              +
                                                              + + +
                                                              + + + + diff --git a/docs/files/footnotes.html b/docs/files/footnotes.html new file mode 100644 index 0000000..132a72c --- /dev/null +++ b/docs/files/footnotes.html @@ -0,0 +1,110 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                              +

                                                              Documentation

                                                              + + + + + +
                                                              + +
                                                              +
                                                              + + + + +
                                                              + + +
                                                              +

                                                              footnotes.php

                                                              + + + + + + + + + + +
                                                              +
                                                              +
                                                              +
                                                              +

                                                              Search results

                                                              + +
                                                              +
                                                              +
                                                                +
                                                                +
                                                                +
                                                                +
                                                                +
                                                                + + +
                                                                + + + + diff --git a/docs/files/includes.html b/docs/files/includes.html new file mode 100644 index 0000000..de8700d --- /dev/null +++ b/docs/files/includes.html @@ -0,0 +1,190 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                +

                                                                Documentation

                                                                + + + + + +
                                                                + +
                                                                +
                                                                + + + + +
                                                                + + +
                                                                +

                                                                includes.php

                                                                + + + + + +

                                                                + Table of Contents + +

                                                                + +
                                                                +
                                                                + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                +
                                                                Requires (require_once) all *.php files inside a specific Directory.
                                                                + +
                                                                + + + + +
                                                                +

                                                                + Functions + +

                                                                +
                                                                +

                                                                + MCI_Footnotes_requirePhpFiles() + +

                                                                + + +

                                                                Requires (require_once) all *.php files inside a specific Directory.

                                                                + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                + +
                                                                Parameters
                                                                +
                                                                +
                                                                + $p_str_Directory + : string +
                                                                +
                                                                +

                                                                Absolute Directory path to lookup for *.php files

                                                                +
                                                                + +
                                                                +
                                                                + + +
                                                                + Tags + +
                                                                +
                                                                +
                                                                + author +
                                                                +
                                                                + +

                                                                Stefan Herndler

                                                                +
                                                                + +
                                                                +
                                                                + since +
                                                                +
                                                                + 1.5.0 + +
                                                                + +
                                                                +
                                                                + + +
                                                                +
                                                                + +
                                                                +
                                                                +
                                                                +
                                                                +

                                                                Search results

                                                                + +
                                                                +
                                                                +
                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  + + +
                                                                  + + + + diff --git a/docs/graphs/classes.html b/docs/graphs/classes.html new file mode 100644 index 0000000..f77584f --- /dev/null +++ b/docs/graphs/classes.html @@ -0,0 +1,97 @@ + + + + + Documentation + + + + + + + + +
                                                                  +

                                                                  Documentation

                                                                  + + + + + +
                                                                  + +
                                                                  +
                                                                  + + + + +
                                                                  +
                                                                  + +
                                                                  + +
                                                                  +
                                                                  +
                                                                  +

                                                                  Search results

                                                                  + +
                                                                  +
                                                                  +
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    + + +
                                                                    + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..003b277 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,223 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                    +

                                                                    Documentation

                                                                    + + + + + +
                                                                    + +
                                                                    +
                                                                    + + + + +
                                                                    +

                                                                    Documentation

                                                                    + + + + +

                                                                    + Interfaces, Classes and Traits + +

                                                                    + +
                                                                    + +
                                                                    MCI_Footnotes_Config
                                                                    +
                                                                    Contains all Plugin Constants. Contains no Method or Property.
                                                                    +
                                                                    MCI_Footnotes_Convert
                                                                    +
                                                                    Converts data types and Footnotes specific values.
                                                                    +
                                                                    MCI_Footnotes_Layout_Init
                                                                    +
                                                                    Handles the Settings interface of the Plugin.
                                                                    +
                                                                    MCI_Footnotes_LayoutEngine
                                                                    +
                                                                    Layout Engine for the administration dashboard.
                                                                    +
                                                                    MCI_Footnotes_Layout_Diagnostics
                                                                    +
                                                                    Displays Diagnostics of the web server, PHP and WordPress.
                                                                    +
                                                                    MCI_Footnotes_Layout_Settings
                                                                    +
                                                                    Displays and handles all Settings of the Plugin.
                                                                    +
                                                                    MCI_Footnotes_Hooks
                                                                    +
                                                                    Registers all WordPress Hooks and executes them on demand.
                                                                    +
                                                                    MCI_Footnotes
                                                                    +
                                                                    Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                    +
                                                                    MCI_Footnotes_Language
                                                                    +
                                                                    Loads text domain of current or default language for localization.
                                                                    +
                                                                    MCI_Footnotes_Settings
                                                                    +
                                                                    Loads the settings values, sets to default values if undefined.
                                                                    +
                                                                    MCI_Footnotes_Task
                                                                    +
                                                                    Searches and replaces the footnotes.
                                                                    +
                                                                    MCI_Footnotes_Template
                                                                    +
                                                                    Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                    +
                                                                    MCI_Footnotes_WidgetBase
                                                                    +
                                                                    Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                    +
                                                                    MCI_Footnotes_Widget_ReferenceContainer
                                                                    +
                                                                    Registers a Widget to put the Reference Container to the widget area.
                                                                    +
                                                                    MCI_Footnotes_WYSIWYG
                                                                    +
                                                                    + +
                                                                    + + +

                                                                    + Table of Contents + +

                                                                    + +
                                                                    +
                                                                    + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                    +
                                                                    Requires (require_once) all *.php files inside a specific Directory.
                                                                    + +
                                                                    + + + +
                                                                    +

                                                                    + Functions + +

                                                                    +
                                                                    +

                                                                    + MCI_Footnotes_requirePhpFiles() + +

                                                                    + + +

                                                                    Requires (require_once) all *.php files inside a specific Directory.

                                                                    + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                    + +
                                                                    Parameters
                                                                    +
                                                                    +
                                                                    + $p_str_Directory + : string +
                                                                    +
                                                                    +

                                                                    Absolute Directory path to lookup for *.php files

                                                                    +
                                                                    + +
                                                                    +
                                                                    + + +
                                                                    + Tags + +
                                                                    +
                                                                    +
                                                                    + author +
                                                                    +
                                                                    + +

                                                                    Stefan Herndler

                                                                    +
                                                                    + +
                                                                    +
                                                                    + since +
                                                                    +
                                                                    + 1.5.0 + +
                                                                    + +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    + +
                                                                    +
                                                                    +
                                                                    +

                                                                    Search results

                                                                    + +
                                                                    +
                                                                    +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + + +
                                                                      + + + + diff --git a/docs/indices/files.html b/docs/indices/files.html new file mode 100644 index 0000000..7ac73fe --- /dev/null +++ b/docs/indices/files.html @@ -0,0 +1,142 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                      +

                                                                      Documentation

                                                                      + + + + + +
                                                                      + +
                                                                      +
                                                                      + + + + +
                                                                      + +

                                                                      Files

                                                                      +

                                                                      B

                                                                      + +

                                                                      C

                                                                      + +

                                                                      F

                                                                      + +

                                                                      H

                                                                      + +

                                                                      I

                                                                      + +

                                                                      L

                                                                      + +

                                                                      R

                                                                      + +

                                                                      S

                                                                      + +

                                                                      T

                                                                      + +

                                                                      W

                                                                      + +
                                                                      +
                                                                      +
                                                                      +

                                                                      Search results

                                                                      + +
                                                                      +
                                                                      +
                                                                        +
                                                                        +
                                                                        +
                                                                        +
                                                                        +
                                                                        + + +
                                                                        + + + + diff --git a/docs/js/search.js b/docs/js/search.js new file mode 100644 index 0000000..a7e3595 --- /dev/null +++ b/docs/js/search.js @@ -0,0 +1,173 @@ +// Search module for phpDocumentor +// +// This module is a wrapper around fuse.js that will use a given index and attach itself to a +// search form and to a search results pane identified by the following data attributes: +// +// 1. data-search-form +// 2. data-search-results +// +// The data-search-form is expected to have a single input element of type 'search' that will trigger searching for +// a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated +// with rendered results. +// +// The search has various stages, upon loading this stage the data-search-form receives the CSS class +// 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended +// to hide the form by default and show it when it receives this class to achieve progressive enhancement for this +// feature. +// +// After loading this module, it is expected to load a search index asynchronously, for example: +// +// +// +// In this script the generated index should attach itself to the search module using the `appendIndex` function. By +// doing it like this the page will continue loading, unhindered by the loading of the search. +// +// After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will +// be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this +// point, the input field will also have it's 'disabled' attribute removed. +var Search = (function () { + var fuse; + var index = []; + var options = { + shouldSort: true, + threshold: 0.6, + location: 0, + distance: 100, + maxPatternLength: 32, + minMatchCharLength: 1, + keys: [ + "fqsen", + "name", + "summary", + "url" + ] + }; + + // Credit David Walsh (https://davidwalsh.name/javascript-debounce-function) + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + function debounce(func, wait, immediate) { + var timeout; + + return function executedFunction() { + var context = this; + var args = arguments; + + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; + } + + function close() { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + const scrollY = document.body.style.top; + document.body.style.position = ''; + document.body.style.top = ''; + window.scrollTo(0, parseInt(scrollY || '0') * -1); + // End scroll prevention + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + + form.classList.toggle('phpdocumentor-search--has-results', false); + searchResults.classList.add('phpdocumentor-search-results--hidden'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + searchField.blur(); + } + + function search(event) { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + document.body.style.position = 'fixed'; + document.body.style.top = `-${window.scrollY}px`; + // End scroll prevention + + // prevent enter's from autosubmitting + event.stopPropagation(); + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries'); + + searchResultEntries.innerHTML = ''; + + if (!event.target.value) { + close(); + return; + } + + form.classList.toggle('phpdocumentor-search--has-results', true); + searchResults.classList.remove('phpdocumentor-search-results--hidden'); + var results = fuse.search(event.target.value, {limit: 25}); + + results.forEach(function (result) { + var entry = document.createElement("li"); + entry.classList.add("phpdocumentor-search-results__entry"); + entry.innerHTML += '

                                                                        ' + result.name + "

                                                                        \n"; + entry.innerHTML += '' + result.fqsen + "\n"; + entry.innerHTML += '
                                                                        ' + result.summary + '
                                                                        '; + searchResultEntries.appendChild(entry) + }); + } + + function appendIndex(added) { + index = index.concat(added); + + // re-initialize search engine when appending an index after initialisation + if (typeof fuse !== 'undefined') { + fuse = new Fuse(index, options); + } + } + + function init() { + fuse = new Fuse(index, options); + + var form = document.querySelector('[data-search-form]'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + + var closeButton = document.querySelector('.phpdocumentor-search-results__close'); + closeButton.addEventListener('click', function() { close() }.bind(this)); + + var searchResults = document.querySelector('[data-search-results]'); + searchResults.addEventListener('click', function() { close() }.bind(this)); + + form.classList.add('phpdocumentor-search--active'); + + searchField.setAttribute('placeholder', 'Search (Press "/" to focus)'); + searchField.removeAttribute('disabled'); + searchField.addEventListener('keyup', debounce(search, 300)); + + window.addEventListener('keyup', function (event) { + if (event.key === '/') { + searchField.focus(); + } + if (event.code === 'Escape') { + close(); + } + }.bind(this)); + } + + return { + appendIndex, + init + } +})(); + +window.addEventListener('DOMContentLoaded', function () { + var form = document.querySelector('[data-search-form]'); + + // When JS is supported; show search box. Must be before including the search for it to take effect immediately + form.classList.add('phpdocumentor-search--enabled'); +}); + +window.addEventListener('load', function () { + Search.init(); +}); diff --git a/docs/js/searchIndex.js b/docs/js/searchIndex.js new file mode 100644 index 0000000..ca8f2cc --- /dev/null +++ b/docs/js/searchIndex.js @@ -0,0 +1,1419 @@ +Search.appendIndex( + [ + { + "fqsen": "\\MCI_Footnotes_Config", + "name": "MCI_Footnotes_Config", + "summary": "Contains\u0020all\u0020Plugin\u0020Constants.\u0020Contains\u0020no\u0020Method\u0020or\u0020Property.", + "url": "classes/MCI-Footnotes-Config.html" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_NAME", + "name": "C_STR_PLUGIN_NAME", + "summary": "Internal\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_PUBLIC_NAME", + "name": "C_STR_PLUGIN_PUBLIC_NAME", + "summary": "Public\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_PUBLIC_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_HEADING_NAME", + "name": "C_STR_PLUGIN_HEADING_NAME", + "summary": "Public\u0020Plugin\u0020name\u0020for\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_HEADING_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL", + "name": "C_STR_LOVE_SYMBOL", + "summary": "Html\u0020tag\u0020for\u0020the\u0020LOVE\u0020symbol.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL_HEADING", + "name": "C_STR_LOVE_SYMBOL_HEADING", + "summary": "HTML\u0020code\u0020for\u0020the\u0020\u0027love\u0027\u0020symbol\u0020used\u0020in\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL_HEADING" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_NO_LOVE_SLUG", + "name": "C_STR_NO_LOVE_SLUG", + "summary": "Short\u0020code\u0020to\u0020DON\u0027T\u0020display\u0020the\u0020\u0027LOVE\u0020ME\u0027\u0020slug\u0020on\u0020certain\u0020pages.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_NO_LOVE_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Convert", + "name": "MCI_Footnotes_Convert", + "summary": "Converts\u0020data\u0020types\u0020and\u0020Footnotes\u0020specific\u0020values.", + "url": "classes/MCI-Footnotes-Convert.html" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AIndex\u0028\u0029", + "name": "Index", + "summary": "Converts\u0020a\u0020integer\u0020into\u0020the\u0020user\u002Ddefined\u0020counter\u0020style\u0020for\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Convert.html#method_Index" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoLatin\u0028\u0029", + "name": "toLatin", + "summary": "Converts\u0020an\u0020integer\u0020into\u0020latin\u0020ascii\u0020characters,\u0020either\u0020lower\u0020or\u0020upper\u002Dcase.", + "url": "classes/MCI-Footnotes-Convert.html#method_toLatin" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoArabicLeading\u0028\u0029", + "name": "toArabicLeading", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020leading\u002D0\u0020integer.", + "url": "classes/MCI-Footnotes-Convert.html#method_toArabicLeading" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoRomanic\u0028\u0029", + "name": "toRomanic", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020romanic\u0020letter.", + "url": "classes/MCI-Footnotes-Convert.html#method_toRomanic" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoBool\u0028\u0029", + "name": "toBool", + "summary": "Converts\u0020a\u0020string\u0020depending\u0020on\u0020its\u0020value\u0020to\u0020a\u0020boolean.", + "url": "classes/MCI-Footnotes-Convert.html#method_toBool" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AgetArrow\u0028\u0029", + "name": "getArrow", + "summary": "Get\u0020a\u0020html\u0020Array\u0020short\u0020code\u0020depending\u0020on\u0020Arrow\u002DArray\u0020key\u0020index.", + "url": "classes/MCI-Footnotes-Convert.html#method_getArrow" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003Adebug\u0028\u0029", + "name": "debug", + "summary": "Displays\u0020a\u0020Variable.", + "url": "classes/MCI-Footnotes-Convert.html#method_debug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init", + "name": "MCI_Footnotes_Layout_Init", + "summary": "Handles\u0020the\u0020Settings\u0020interface\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Initializes\u0020all\u0020WordPress\u0020hooks\u0020for\u0020the\u0020Plugin\u0020Settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AinitializeSettings\u0028\u0029", + "name": "initializeSettings", + "summary": "Initializes\u0020all\u0020sub\u0020pages\u0020and\u0020registers\u0020the\u0020settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_initializeSettings" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterMainMenu\u0028\u0029", + "name": "registerMainMenu", + "summary": "Registers\u0020the\u0020new\u0020main\u0020menu\u0020for\u0020the\u0020WordPress\u0020dashboard.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerMainMenu" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterSubPages\u0028\u0029", + "name": "registerSubPages", + "summary": "Registers\u0020all\u0020SubPages\u0020for\u0020this\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerSubPages" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AdisplayOtherPlugins\u0028\u0029", + "name": "displayOtherPlugins", + "summary": "Displays\u0020other\u0020Plugins\u0020from\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_displayOtherPlugins" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AgetPluginMetaInformation\u0028\u0029", + "name": "getPluginMetaInformation", + "summary": "AJAX\u0020call.\u0020returns\u0020a\u0020JSON\u0020string\u0020containing\u0020meta\u0020information\u0020about\u0020a\u0020specific\u0020WordPress\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_getPluginMetaInformation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_SLUG", + "name": "C_STR_MAIN_MENU_SLUG", + "summary": "Slug\u0020for\u0020the\u0020Plugin\u0020main\u0020menu.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_TITLE", + "name": "C_STR_MAIN_MENU_TITLE", + "summary": "Plugin\u0020main\u0020menu\u0020name.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A\u0024a_arr_SubPageClasses", + "name": "a_arr_SubPageClasses", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Init.html#property_a_arr_SubPageClasses" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine", + "name": "MCI_Footnotes_LayoutEngine", + "summary": "Layout\u0020Engine\u0020for\u0020the\u0020administration\u0020dashboard.", + "url": "classes/MCI-Footnotes-LayoutEngine.html" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSection\u0028\u0029", + "name": "addSection", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020sub\u0020page\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddMetaBox\u0028\u0029", + "name": "addMetaBox", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020meta\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addMetaBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSubPage\u0028\u0029", + "name": "registerSubPage", + "summary": "Registers\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSubPage" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSections\u0028\u0029", + "name": "registerSections", + "summary": "Registers\u0020all\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterMetaBoxes\u0028\u0029", + "name": "registerMetaBoxes", + "summary": "Registers\u0020all\u0020Meta\u0020boxes\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AappendScripts\u0028\u0029", + "name": "appendScripts", + "summary": "Append\u0020javascript\u0020and\u0020css\u0020files\u0020for\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_appendScripts" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AdisplayContent\u0028\u0029", + "name": "displayContent", + "summary": "Displays\u0020the\u0020content\u0020of\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_displayContent" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AsaveSettings\u0028\u0029", + "name": "saveSettings", + "summary": "Save\u0020all\u0020Plugin\u0020settings.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_saveSettings" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ADescription\u0028\u0029", + "name": "Description", + "summary": "Output\u0020the\u0020Description\u0020of\u0020a\u0020section.\u0020May\u0020be\u0020overwritten\u0020in\u0020any\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_Description" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ALoadSetting\u0028\u0029", + "name": "LoadSetting", + "summary": "Loads\u0020specific\u0020setting\u0020and\u0020returns\u0020an\u0020array\u0020with\u0020the\u0020keys\u0020\u005Bid,\u0020name,\u0020value\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_LoadSetting" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNewline\u0028\u0029", + "name": "addNewline", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020start\u0020a\u0020new\u0020line.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNewline" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLineSpace\u0028\u0029", + "name": "addLineSpace", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020have\u0020a\u0020space\u0020between\u0020two\u0020lines.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLineSpace" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddText\u0028\u0029", + "name": "addText", + "summary": "Returns\u0020a\u0020simple\u0020text\u0020inside\u0020html\u0020\u003Cspan\u003E\u0020text.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addText" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLabel\u0028\u0029", + "name": "addLabel", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\/select\u0020label.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLabel" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextBox\u0028\u0029", + "name": "addTextBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddCheckbox\u0028\u0029", + "name": "addCheckbox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020checkbox\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addCheckbox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSelectBox\u0028\u0029", + "name": "addSelectBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020select\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSelectBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextArea\u0028\u0029", + "name": "addTextArea", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020text\u0020area.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextArea" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddColorSelection\u0028\u0029", + "name": "addColorSelection", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D\u0020with\u0020color\u0020selection\u0020class.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addColorSelection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNumBox\u0028\u0029", + "name": "addNumBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020num\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNumBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_str_SubPageHook", + "name": "a_str_SubPageHook", + "summary": "Stores\u0020the\u0020Hook\u0020connection\u0020string\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_str_SubPageHook" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_arr_Sections", + "name": "a_arr_Sections", + "summary": "Stores\u0020all\u0020Sections\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_arr_Sections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics", + "name": "MCI_Footnotes_Layout_Diagnostics", + "summary": "Displays\u0020Diagnostics\u0020of\u0020the\u0020web\u0020server,\u0020PHP\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003ADiagnostics\u0028\u0029", + "name": "Diagnostics", + "summary": "Displays\u0020a\u0020diagnostics\u0020about\u0020the\u0020web\u0020server,\u0020php\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_Diagnostics" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings", + "name": "MCI_Footnotes_Layout_Settings", + "summary": "Displays\u0020and\u0020handles\u0020all\u0020Settings\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AStartEnd\u0028\u0029", + "name": "StartEnd", + "summary": "Displays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020start\u0020and\u0020end\u0020tag\u0020short\u0020codes\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020numbering\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020scrolling\u0020behavior", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_StartEnd" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ANumbering\u0028\u0029", + "name": "Numbering", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Numbering" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AScrolling\u0028\u0029", + "name": "Scrolling", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Scrolling" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALove\u0028\u0029", + "name": "Love", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020\u0027I\u0020love\u0020Footnotes\u0027.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Love" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AExcerpts\u0028\u0029", + "name": "Excerpts", + "summary": "Displays\u0020the\u0020excerpt\u0020setting", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Excerpts" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ASuperscript\u0028\u0029", + "name": "Superscript", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnote\u0020referrers", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Superscript" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBox\u0028\u0029", + "name": "MouseOverBox", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnotes\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBox" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxPosition\u0028\u0029", + "name": "MouseOverBoxPosition", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxPosition" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxDimensions\u0028\u0029", + "name": "MouseOverBoxDimensions", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxDimensions" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTiming\u0028\u0029", + "name": "MouseOverBoxTiming", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTiming" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTruncation\u0028\u0029", + "name": "MouseOverBoxTruncation", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTruncation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxText\u0028\u0029", + "name": "MouseOverBoxText", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxText" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxAppearance\u0028\u0029", + "name": "MouseOverBoxAppearance", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxAppearance" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHyperlinkArrow\u0028\u0029", + "name": "HyperlinkArrow", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020prepended\u0020symbol", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_HyperlinkArrow" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSS\u0028\u0029", + "name": "CustomCSS", + "summary": "Displays\u0020the\u0020custom\u0020css\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSS" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSMigration\u0028\u0029", + "name": "CustomCSSMigration", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSMigration" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSNew\u0028\u0029", + "name": "CustomCSSNew", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSNew" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALookupHooks\u0028\u0029", + "name": "LookupHooks", + "summary": "Displays\u0020available\u0020Hooks\u0020to\u0020look\u0020for\u0020Footnote\u0020short\u0020codes.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_LookupHooks" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHelp\u0028\u0029", + "name": "Help", + "summary": "Displays\u0020a\u0020short\u0020introduction\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Help" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ADonate\u0028\u0029", + "name": "Donate", + "summary": "Displays\u0020all\u0020Donate\u0020button\u0020to\u0020support\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Donate" + }, { + "fqsen": "\\MCI_Footnotes_Hooks", + "name": "MCI_Footnotes_Hooks", + "summary": "Registers\u0020all\u0020WordPress\u0020Hooks\u0020and\u0020executes\u0020them\u0020on\u0020demand.", + "url": "classes/MCI-Footnotes-Hooks.html" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Registers\u0020all\u0020WordPress\u0020hooks.", + "url": "classes/MCI-Footnotes-Hooks.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AactivatePlugin\u0028\u0029", + "name": "activatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020activated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_activatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AdeactivatePlugin\u0028\u0029", + "name": "deactivatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020deactivated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_deactivatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AuninstallPlugin\u0028\u0029", + "name": "uninstallPlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020uninstalled.", + "url": "classes/MCI-Footnotes-Hooks.html#method_uninstallPlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003APluginLinks\u0028\u0029", + "name": "PluginLinks", + "summary": "Add\u0020Links\u0020to\u0020the\u0020Plugin\u0020in\u0020the\u0020\u0022installed\u0020Plugins\u0022\u0020page.", + "url": "classes/MCI-Footnotes-Hooks.html#method_PluginLinks" + }, { + "fqsen": "\\MCI_Footnotes", + "name": "MCI_Footnotes", + "summary": "Entry\u0020point\u0020of\u0020the\u0020Plugin.\u0020Loads\u0020the\u0020Dashboard\u0020and\u0020executes\u0020the\u0020Task.", + "url": "classes/MCI-Footnotes.html" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003Arun\u0028\u0029", + "name": "run", + "summary": "Executes\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_run" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeWidgets\u0028\u0029", + "name": "initializeWidgets", + "summary": "Initializes\u0020all\u0020Widgets\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_initializeWidgets" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeDashboard\u0028\u0029", + "name": "initializeDashboard", + "summary": "Initializes\u0020the\u0020Dashboard\u0020of\u0020the\u0020Plugin\u0020and\u0020loads\u0020them.", + "url": "classes/MCI-Footnotes.html#method_initializeDashboard" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeTask\u0028\u0029", + "name": "initializeTask", + "summary": "Initializes\u0020the\u0020Plugin\u0020Task\u0020and\u0020registers\u0020the\u0020Task\u0020hooks.", + "url": "classes/MCI-Footnotes.html#method_initializeTask" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AregisterPublic\u0028\u0029", + "name": "registerPublic", + "summary": "Registers\u0020and\u0020enqueues\u0020scripts\u0020and\u0020stylesheets\u0020to\u0020the\u0020public\u0020pages.", + "url": "classes/MCI-Footnotes.html#method_registerPublic" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_obj_Task", + "name": "a_obj_Task", + "summary": "Reference\u0020to\u0020the\u0020Plugin\u0020Task\u0020object.", + "url": "classes/MCI-Footnotes.html#property_a_obj_Task" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020and\u0020script\u0020\/\u0020stylesheet\u0020load\u0020optimization.", + "url": "classes/MCI-Footnotes.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Language", + "name": "MCI_Footnotes_Language", + "summary": "Loads\u0020text\u0020domain\u0020of\u0020current\u0020or\u0020default\u0020language\u0020for\u0020localization.", + "url": "classes/MCI-Footnotes-Language.html" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hook.", + "url": "classes/MCI-Footnotes-Language.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AloadTextDomain\u0028\u0029", + "name": "loadTextDomain", + "summary": "Loads\u0020the\u0020text\u0020domain\u0020for\u0020current\u0020WordPress\u0020language\u0020if\u0020exists.", + "url": "classes/MCI-Footnotes-Language.html#method_loadTextDomain" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003Aload\u0028\u0029", + "name": "load", + "summary": "Loads\u0020a\u0020specific\u0020text\u0020domain.", + "url": "classes/MCI-Footnotes-Language.html#method_load" + }, { + "fqsen": "\\MCI_Footnotes_Settings", + "name": "MCI_Footnotes_Settings", + "summary": "Loads\u0020the\u0020settings\u0020values,\u0020sets\u0020to\u0020default\u0020values\u0020if\u0020undefined.", + "url": "classes/MCI-Footnotes-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Loads\u0020all\u0020Settings\u0020from\u0020each\u0020WordPress\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Ainstance\u0028\u0029", + "name": "instance", + "summary": "Returns\u0020a\u0020singleton\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#method_instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetContainer\u0028\u0029", + "name": "getContainer", + "summary": "Returns\u0020the\u0020name\u0020of\u0020a\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getContainer" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetDefaults\u0028\u0029", + "name": "getDefaults", + "summary": "Returns\u0020the\u0020default\u0020values\u0020of\u0020a\u0020specific\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getDefaults" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AloadAll\u0028\u0029", + "name": "loadAll", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_loadAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ALoad\u0028\u0029", + "name": "Load", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_Load" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AsaveOptions\u0028\u0029", + "name": "saveOptions", + "summary": "Updates\u0020a\u0020whole\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_saveOptions" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "Returns\u0020the\u0020value\u0020of\u0020specified\u0020Settings\u0020name.", + "url": "classes/MCI-Footnotes-Settings.html#method_get" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AClearAll\u0028\u0029", + "name": "ClearAll", + "summary": "Deletes\u0020each\u0020Settings\u0020Container\u0020and\u0020loads\u0020the\u0020default\u0020values\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_ClearAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ARegisterSettings\u0028\u0029", + "name": "RegisterSettings", + "summary": "Register\u0020all\u0020Settings\u0020Container\u0020for\u0020the\u0020Plugin\u0020Settings\u0020Page\u0020in\u0020the\u0020Dashboard.", + "url": "classes/MCI-Footnotes-Settings.html#method_RegisterSettings" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_NAME", + "name": "C_STR_REFERENCE_CONTAINER_NAME", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "name": "C_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020collapse\u0020the\u0020reference\u0020container\u0020by\u0020default.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_COLLAPSE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION", + "name": "C_STR_REFERENCE_CONTAINER_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020position\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "name": "C_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020combining\u0020identical\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_COMBINE_IDENTICAL_FOOTNOTES" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_COUNTER_STYLE", + "name": "C_STR_FOOTNOTES_COUNTER_STYLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020counter\u0020style\u0020of\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_COUNTER_STYLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_LOVE", + "name": "C_STR_FOOTNOTES_LOVE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020\u0027I\u0020love\u0020footnotes\u0027\u0020text.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_LOVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_IN_EXCERPT", + "name": "C_BOOL_FOOTNOTES_IN_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020look\u0020for\u0020footnotes\u0020in\u0020post\u0020excerpts.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_IN_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_EXPERT_MODE", + "name": "C_BOOL_FOOTNOTES_EXPERT_MODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Expert\u0020mode.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_EXPERT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_BEFORE", + "name": "C_STR_FOOTNOTES_STYLING_BEFORE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020before\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_BEFORE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_AFTER", + "name": "C_STR_FOOTNOTES_STYLING_AFTER", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020after\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_AFTER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020alternative\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020tooltip\u0020truncation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020length\u0020of\u0020the\u0020enabled\u0020excerpt.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020position.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028x\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028y\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020background\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020radius.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020box\u002Dshadow\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW", + "name": "C_STR_HYPERLINK_ARROW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020backlink\u0020symbol\u0020selection.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW_USER_DEFINED", + "name": "C_STR_HYPERLINK_ARROW_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS", + "name": "C_STR_CUSTOM_CSS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS_NEW", + "name": "C_STR_CUSTOM_CSS_NEW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS\u0020migrated\u0020to\u0020a\u0020dedicated\u0020tab.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS_NEW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "name": "C_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020display\u0020of\u0020legacy\u0020Custom\u0020CSS\u0020metaboxes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_CUSTOM_CSS_LEGACY_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_THE_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_content\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_CONTENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_excerpt\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_text\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "name": "C_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020Read\u002Don\u0020button\u0020in\u0020truncated\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_READON_LABEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "name": "C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020referrer\u0020element.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020display\u0020of\u0020a\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020not\u0020display\u0020the\u0020reference\u0020container\u0020on\u0020the\u0020homepage.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020legacy\u0020layout\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020get\u0020the\u0020backlink\u0020symbol\u0020switch\u0020side.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027the_content\u0027\u0020hook\u0020priority\u0020level.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027\u0027\u0020hook\u0020priority\u0020level", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_LINK_ELEMENT_ENABLED", + "name": "C_BOOL_LINK_ELEMENT_ENABLED", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020the\u0020link\u0020element\u0020option\nSettings\u0020Container\u0020Keys\u0020for\u0020backlink\u0020typography\u0020and\u0020layout\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020font\u0020size\nSettings\u0020Container\u0020Keys\u0020for\u0020page\u0020layout\u0020support\nSettings\u0020Container\u0020Keys\u0020for\u0020scroll\u0020offset\u0020and\u0020duration\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020display\u0020durations", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_LINK_ELEMENT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_SEPARATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_OPTION", + "name": "C_STR_BACKLINKS_SEPARATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_CUSTOM", + "name": "C_STR_BACKLINKS_SEPARATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_TERMINATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_OPTION", + "name": "C_STR_BACKLINKS_TERMINATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_CUSTOM", + "name": "C_STR_BACKLINKS_TERMINATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "name": "C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "name": "C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "name": "C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "name": "C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "name": "C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_OFFSET", + "name": "C_INT_FOOTNOTES_SCROLL_OFFSET", + "summary": "Scroll\u0020offset\u0020and\u0020duration", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_OFFSET" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_DURATION", + "name": "C_INT_FOOTNOTES_SCROLL_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "name": "C_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020URL\u0020wrap\u0020option", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_URL_WRAP_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "name": "C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020reference\u0020container\u0020position\u0020shortcode", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020alternative\u0020tooltip\u0020position\nSettings\u0020Container\u0020Keys\u0020for\u0020reference\u0020container\u0020label\u0020element,\u0020thanks\u0020to\u0020\u0040markhillyer", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "name": "C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "name": "C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020table\u0020cell\u0020borders,\u0020thanks\u0020to\u0020\u0040noobishh", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "summary": "Settings\u0020container\u0020keys\u0020for\u0020reference\u0020container\u0020top\u0020and\u0020bottom\u0020margins\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020enabling\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020anchors\u0020in\u0020referrers\u0020and\u0020footnotes", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_TOP_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "name": "C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERRER_FRAGMENT_ID_SLUG", + "name": "C_STR_REFERRER_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERRER_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "name": "C_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HARD_LINK_IDS_SEPARATOR", + "name": "C_STR_HARD_LINK_IDS_SEPARATOR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HARD_LINK_IDS_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "name": "C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020for\u0020shortcode\u0020syntax\u0020validation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "name": "C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020backlink\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "name": "C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020backlink\u0020tooltip.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020delimiter.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "name": "C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020mirroring\u0020the\u0020tooltip\u0020excerpt\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020separator\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "name": "C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020superscript\u0020style\u0020normalization.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "name": "C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020select\u0020the\u0020script\u0020mode\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_obj_Instance", + "name": "a_obj_Instance", + "summary": "Stores\u0020a\u0020singleton\u0020reference\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_obj_Instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Container", + "name": "a_arr_Container", + "summary": "Contains\u0020all\u0020Settings\u0020Container\u0020names.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Container" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Default", + "name": "a_arr_Default", + "summary": "Contains\u0020all\u0020Default\u0020Settings\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Default" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Settings", + "name": "a_arr_Settings", + "summary": "Contains\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container\u0020as\u0020soon\u0020as\u0020this\u0020class\u0020is\u0020initialized.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Settings" + }, { + "fqsen": "\\MCI_Footnotes_Task", + "name": "MCI_Footnotes_Task", + "summary": "Searches\u0020and\u0020replaces\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Task.html" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hooks\u0020to\u0020replace\u0020Footnotes\u0020in\u0020the\u0020content\u0020of\u0020a\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_head\u0028\u0029", + "name": "wp_head", + "summary": "Outputs\u0020the\u0020custom\u0020css\u0020to\u0020the\u0020header\u0020of\u0020the\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_head" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_footer\u0028\u0029", + "name": "wp_footer", + "summary": "Displays\u0020the\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020slug\u0020if\u0020enabled.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_footer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_title\u0028\u0029", + "name": "the_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020post\/page\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_the_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_content\u0028\u0029", + "name": "the_content", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_content" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_excerpt\u0028\u0029", + "name": "the_excerpt", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020excerpt\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_excerpt" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_title\u0028\u0029", + "name": "widget_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020widget\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_text\u0028\u0029", + "name": "widget_text", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020widget.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_text" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_post\u0028\u0029", + "name": "the_post", + "summary": "Replaces\u0020footnotes\u0020in\u0020each\u0020Content\u0020var\u0020of\u0020the\u0020current\u0020Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_the_post" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AreplacePostObject\u0028\u0029", + "name": "replacePostObject", + "summary": "Replace\u0020all\u0020Footnotes\u0020in\u0020a\u0020WP_Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_replacePostObject" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Aexec\u0028\u0029", + "name": "exec", + "summary": "Replaces\u0020all\u0020footnotes\u0020that\u0020occur\u0020in\u0020the\u0020given\u0020content.", + "url": "classes/MCI-Footnotes-Task.html#method_exec" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Asearch\u0028\u0029", + "name": "search", + "summary": "Replaces\u0020all\u0020footnotes\u0020in\u0020the\u0020given\u0020content\u0020and\u0020appends\u0020them\u0020to\u0020the\u0020static\u0020property.", + "url": "classes/MCI-Footnotes-Task.html#method_search" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Generates\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Task.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_arr_Footnotes", + "name": "a_arr_Footnotes", + "summary": "Contains\u0020all\u0020footnotes\u0020found\u0020on\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_arr_Footnotes" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AllowLoveMe", + "name": "a_bool_AllowLoveMe", + "summary": "Flag\u0020if\u0020the\u0020display\u0020of\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020is\u0020allowed\u0020on\u0020the\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AllowLoveMe" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_Prefix", + "name": "a_str_Prefix", + "summary": "Prefix\u0020for\u0020the\u0020Footnote\u0020html\u0020element\u0020ID.", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_Prefix" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_PostId", + "name": "a_int_PostId", + "summary": "Infinite\u0020scroll\u0020\/\u0020autoload\u0020or\u0020archive\u0020view", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_PostId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ReferenceContainerId", + "name": "a_int_ReferenceContainerId", + "summary": "Multiple\u0020reference\u0020containers\u0020in\u0020content\u0020and\u0020widgets", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ReferenceContainerId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020optimization", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_HardLinksEnable", + "name": "a_bool_HardLinksEnable", + "summary": "Hard\u0020links\u0020for\u0020AMP\u0020compatibility", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_HardLinksEnable" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_ReferrerLinkSlug", + "name": "a_str_ReferrerLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_ReferrerLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_FootnoteLinkSlug", + "name": "a_str_FootnoteLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_FootnoteLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkIdsSeparator", + "name": "a_str_LinkIdsSeparator", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkIdsSeparator" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_PostContainerIdCompound", + "name": "a_str_PostContainerIdCompound", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_PostContainerIdCompound" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ScrollOffset", + "name": "a_int_ScrollOffset", + "summary": "Scroll\u0020offset", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ScrollOffset" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkSpan", + "name": "a_str_LinkSpan", + "summary": "Optional\u0020link\u0020element\u0020for\u0020footnote\u0020referrers\u0020and\u0020backlinks", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkSpan" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkOpenTag", + "name": "a_str_LinkOpenTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkOpenTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkCloseTag", + "name": "a_str_LinkCloseTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkCloseTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_MirrorTooltipText", + "name": "a_bool_MirrorTooltipText", + "summary": "Dedicated\u0020tooltip\u0020text", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_MirrorTooltipText" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_TooltipShortcode", + "name": "a_str_TooltipShortcode", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_TooltipShortcode" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_TooltipShortcodeLength", + "name": "a_int_TooltipShortcodeLength", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_TooltipShortcodeLength" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_SyntaxErrorFlag", + "name": "a_bool_SyntaxErrorFlag", + "summary": "Footnote\u0020delimiter\u0020syntax\u0020validation", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_SyntaxErrorFlag" + }, { + "fqsen": "\\MCI_Footnotes_Template", + "name": "MCI_Footnotes_Template", + "summary": "Handles\u0020each\u0020Template\u0020file\u0020for\u0020the\u0020Plugin\u0020Frontend\u0020\u0028e.g.\u0020Settings\u0020Dashboard,\u0020Public\u0020pages,\u0020...\u0029.", + "url": "classes/MCI-Footnotes-Template.html" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Reads\u0020and\u0020loads\u0020the\u0020template\u0020file\u0020without\u0020replace\u0020any\u0020placeholder.", + "url": "classes/MCI-Footnotes-Template.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areplace\u0028\u0029", + "name": "replace", + "summary": "Replace\u0020all\u0020placeholders\u0020specified\u0020in\u0020array.", + "url": "classes/MCI-Footnotes-Template.html#method_replace" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areload\u0028\u0029", + "name": "reload", + "summary": "Reloads\u0020the\u0020original\u0020content\u0020of\u0020the\u0020template\u0020file.", + "url": "classes/MCI-Footnotes-Template.html#method_reload" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AgetContent\u0028\u0029", + "name": "getContent", + "summary": "Returns\u0020the\u0020content\u0020of\u0020the\u0020template\u0020file\u0020with\u0020replaced\u0020placeholders.", + "url": "classes/MCI-Footnotes-Template.html#method_getContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aprocess_template\u0028\u0029", + "name": "process_template", + "summary": "Process\u0020template\u0020file", + "url": "classes/MCI-Footnotes-Template.html#method_process_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aget_template\u0028\u0029", + "name": "get_template", + "summary": "Get\u0020the\u0020template", + "url": "classes/MCI-Footnotes-Template.html#method_get_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_DASHBOARD", + "name": "C_STR_DASHBOARD", + "summary": "Directory\u0020name\u0020for\u0020dashboard\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_DASHBOARD" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_PUBLIC", + "name": "C_STR_PUBLIC", + "summary": "Directory\u0020name\u0020for\u0020public\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_PUBLIC" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_OriginalContent", + "name": "a_str_OriginalContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_OriginalContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_ReplacedContent", + "name": "a_str_ReplacedContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize\u0020with\u0020replaced\u0020place\u0020holders.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_ReplacedContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024plugin_directory", + "name": "plugin_directory", + "summary": "Plugin\u0020Directory", + "url": "classes/MCI-Footnotes-Template.html#property_plugin_directory" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase", + "name": "MCI_Footnotes_WidgetBase", + "summary": "Base\u0020Class\u0020for\u0020all\u0020Plugin\u0020Widgets.\u0020Registers\u0020each\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020child\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetWidgetWidth\u0028\u0029", + "name": "getWidgetWidth", + "summary": "Returns\u0020the\u0020width\u0020of\u0020the\u0020Widget.\u0020Default\u0020width\u0020is\u0020250\u0020pixel.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getWidgetWidth" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Registers\u0020the\u0020child\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer", + "name": "MCI_Footnotes_Widget_ReferenceContainer", + "summary": "Registers\u0020a\u0020Widget\u0020to\u0020put\u0020the\u0020Reference\u0020Container\u0020to\u0020the\u0020widget\u0020area.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020the\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Aform\u0028\u0029", + "name": "form", + "summary": "Outputs\u0020the\u0020Settings\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_form" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Awidget\u0028\u0029", + "name": "widget", + "summary": "Outputs\u0020the\u0020Content\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_widget" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG", + "name": "MCI_Footnotes_WYSIWYG", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewVisualEditorButton\u0028\u0029", + "name": "newVisualEditorButton", + "summary": "Append\u0020a\u0020new\u0020Button\u0020to\u0020the\u0020WYSIWYG\u0020editor\u0020of\u0020Posts\u0020and\u0020Pages.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newVisualEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewPlainTextEditorButton\u0028\u0029", + "name": "newPlainTextEditorButton", + "summary": "Add\u0020a\u0020new\u0020button\u0020to\u0020the\u0020plain\u0020text\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newPlainTextEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AincludeScripts\u0028\u0029", + "name": "includeScripts", + "summary": "Includes\u0020the\u0020Plugins\u0020WYSIWYG\u0020editor\u0020script.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_includeScripts" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AajaxCallback\u0028\u0029", + "name": "ajaxCallback", + "summary": "AJAX\u0020Callback\u0020function\u0020when\u0020the\u0020Footnotes\u0020Button\u0020is\u0020clicked.\u0020Either\u0020in\u0020the\u0020Plain\u0020text\u0020or\u0020Visual\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_ajaxCallback" + }, { + "fqsen": "\\MCI_Footnotes_requirePhpFiles\u0028\u0029", + "name": "MCI_Footnotes_requirePhpFiles", + "summary": "Requires\u0020\u0028require_once\u0029\u0020all\u0020\u002A.php\u0020files\u0020inside\u0020a\u0020specific\u0020Directory.", + "url": "namespaces/default.html#function_MCI_Footnotes_requirePhpFiles" + }, { + "fqsen": "\\", + "name": "\\", + "summary": "", + "url": "namespaces/default.html" + } ] +); diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html new file mode 100644 index 0000000..c9f9b75 --- /dev/null +++ b/docs/namespaces/default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                        +

                                                                        Documentation

                                                                        + + + + + +
                                                                        + +
                                                                        +
                                                                        + + + + +
                                                                        +
                                                                          +
                                                                        + +
                                                                        +

                                                                        API Documentation

                                                                        + + + +

                                                                        + Interfaces, Classes and Traits + +

                                                                        + +
                                                                        + +
                                                                        MCI_Footnotes_Config
                                                                        +
                                                                        Contains all Plugin Constants. Contains no Method or Property.
                                                                        +
                                                                        MCI_Footnotes_Convert
                                                                        +
                                                                        Converts data types and Footnotes specific values.
                                                                        +
                                                                        MCI_Footnotes_Layout_Init
                                                                        +
                                                                        Handles the Settings interface of the Plugin.
                                                                        +
                                                                        MCI_Footnotes_LayoutEngine
                                                                        +
                                                                        Layout Engine for the administration dashboard.
                                                                        +
                                                                        MCI_Footnotes_Layout_Diagnostics
                                                                        +
                                                                        Displays Diagnostics of the web server, PHP and WordPress.
                                                                        +
                                                                        MCI_Footnotes_Layout_Settings
                                                                        +
                                                                        Displays and handles all Settings of the Plugin.
                                                                        +
                                                                        MCI_Footnotes_Hooks
                                                                        +
                                                                        Registers all WordPress Hooks and executes them on demand.
                                                                        +
                                                                        MCI_Footnotes
                                                                        +
                                                                        Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                        +
                                                                        MCI_Footnotes_Language
                                                                        +
                                                                        Loads text domain of current or default language for localization.
                                                                        +
                                                                        MCI_Footnotes_Settings
                                                                        +
                                                                        Loads the settings values, sets to default values if undefined.
                                                                        +
                                                                        MCI_Footnotes_Task
                                                                        +
                                                                        Searches and replaces the footnotes.
                                                                        +
                                                                        MCI_Footnotes_Template
                                                                        +
                                                                        Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                        +
                                                                        MCI_Footnotes_WidgetBase
                                                                        +
                                                                        Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                        +
                                                                        MCI_Footnotes_Widget_ReferenceContainer
                                                                        +
                                                                        Registers a Widget to put the Reference Container to the widget area.
                                                                        +
                                                                        MCI_Footnotes_WYSIWYG
                                                                        +
                                                                        + +
                                                                        + + +

                                                                        + Table of Contents + +

                                                                        + +
                                                                        +
                                                                        + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                        +
                                                                        Requires (require_once) all *.php files inside a specific Directory.
                                                                        + +
                                                                        + + + +
                                                                        +

                                                                        + Functions + +

                                                                        +
                                                                        +

                                                                        + MCI_Footnotes_requirePhpFiles() + +

                                                                        + + +

                                                                        Requires (require_once) all *.php files inside a specific Directory.

                                                                        + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                        + +
                                                                        Parameters
                                                                        +
                                                                        +
                                                                        + $p_str_Directory + : string +
                                                                        +
                                                                        +

                                                                        Absolute Directory path to lookup for *.php files

                                                                        +
                                                                        + +
                                                                        +
                                                                        + + +
                                                                        + Tags + +
                                                                        +
                                                                        +
                                                                        + author +
                                                                        +
                                                                        + +

                                                                        Stefan Herndler

                                                                        +
                                                                        + +
                                                                        +
                                                                        + since +
                                                                        +
                                                                        + 1.5.0 + +
                                                                        + +
                                                                        +
                                                                        + + +
                                                                        +
                                                                        + +
                                                                        +
                                                                        +
                                                                        +
                                                                        +

                                                                        Search results

                                                                        + +
                                                                        +
                                                                        +
                                                                          +
                                                                          +
                                                                          +
                                                                          +
                                                                          +
                                                                          + + +
                                                                          + + + + diff --git a/docs/packages/Default.html b/docs/packages/Default.html new file mode 100644 index 0000000..d4680ea --- /dev/null +++ b/docs/packages/Default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                          +

                                                                          Documentation

                                                                          + + + + + +
                                                                          + +
                                                                          +
                                                                          + + + + +
                                                                          +
                                                                            +
                                                                          + +
                                                                          +

                                                                          Default

                                                                          + + + +

                                                                          + Interfaces, Classes and Traits + +

                                                                          + +
                                                                          + +
                                                                          MCI_Footnotes_Config
                                                                          +
                                                                          Contains all Plugin Constants. Contains no Method or Property.
                                                                          +
                                                                          MCI_Footnotes_Convert
                                                                          +
                                                                          Converts data types and Footnotes specific values.
                                                                          +
                                                                          MCI_Footnotes_Layout_Init
                                                                          +
                                                                          Handles the Settings interface of the Plugin.
                                                                          +
                                                                          MCI_Footnotes_LayoutEngine
                                                                          +
                                                                          Layout Engine for the administration dashboard.
                                                                          +
                                                                          MCI_Footnotes_Layout_Diagnostics
                                                                          +
                                                                          Displays Diagnostics of the web server, PHP and WordPress.
                                                                          +
                                                                          MCI_Footnotes_Layout_Settings
                                                                          +
                                                                          Displays and handles all Settings of the Plugin.
                                                                          +
                                                                          MCI_Footnotes_Hooks
                                                                          +
                                                                          Registers all WordPress Hooks and executes them on demand.
                                                                          +
                                                                          MCI_Footnotes
                                                                          +
                                                                          Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                          +
                                                                          MCI_Footnotes_Language
                                                                          +
                                                                          Loads text domain of current or default language for localization.
                                                                          +
                                                                          MCI_Footnotes_Settings
                                                                          +
                                                                          Loads the settings values, sets to default values if undefined.
                                                                          +
                                                                          MCI_Footnotes_Task
                                                                          +
                                                                          Searches and replaces the footnotes.
                                                                          +
                                                                          MCI_Footnotes_Template
                                                                          +
                                                                          Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                          +
                                                                          MCI_Footnotes_WidgetBase
                                                                          +
                                                                          Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                          +
                                                                          MCI_Footnotes_Widget_ReferenceContainer
                                                                          +
                                                                          Registers a Widget to put the Reference Container to the widget area.
                                                                          +
                                                                          MCI_Footnotes_WYSIWYG
                                                                          +
                                                                          + +
                                                                          + + +

                                                                          + Table of Contents + +

                                                                          + +
                                                                          +
                                                                          + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                          +
                                                                          Requires (require_once) all *.php files inside a specific Directory.
                                                                          + +
                                                                          + + + +
                                                                          +

                                                                          + Functions + +

                                                                          +
                                                                          +

                                                                          + MCI_Footnotes_requirePhpFiles() + +

                                                                          + + +

                                                                          Requires (require_once) all *.php files inside a specific Directory.

                                                                          + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                          + +
                                                                          Parameters
                                                                          +
                                                                          +
                                                                          + $p_str_Directory + : string +
                                                                          +
                                                                          +

                                                                          Absolute Directory path to lookup for *.php files

                                                                          +
                                                                          + +
                                                                          +
                                                                          + + +
                                                                          + Tags + +
                                                                          +
                                                                          +
                                                                          + author +
                                                                          +
                                                                          + +

                                                                          Stefan Herndler

                                                                          +
                                                                          + +
                                                                          +
                                                                          + since +
                                                                          +
                                                                          + 1.5.0 + +
                                                                          + +
                                                                          +
                                                                          + + +
                                                                          +
                                                                          + +
                                                                          +
                                                                          +
                                                                          +
                                                                          +

                                                                          Search results

                                                                          + +
                                                                          +
                                                                          +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            + + +
                                                                            + + + + diff --git a/docs/packages/default.html b/docs/packages/default.html new file mode 100644 index 0000000..3d3e60c --- /dev/null +++ b/docs/packages/default.html @@ -0,0 +1,116 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                            +

                                                                            Documentation

                                                                            + + + + + +
                                                                            + +
                                                                            +
                                                                            + + + + +
                                                                            +
                                                                              +
                                                                            + +
                                                                            +

                                                                            API Documentation

                                                                            + +

                                                                            + Packages + +

                                                                            + +
                                                                            +
                                                                            Default
                                                                            +
                                                                            + + + + + + + + +
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            Search results

                                                                            + +
                                                                            +
                                                                            +
                                                                              +
                                                                              +
                                                                              +
                                                                              +
                                                                              +
                                                                              + + +
                                                                              + + + + diff --git a/docs/reports/deprecated.html b/docs/reports/deprecated.html new file mode 100644 index 0000000..31e5420 --- /dev/null +++ b/docs/reports/deprecated.html @@ -0,0 +1,106 @@ + + + + + Documentation » Deprecated elements + + + + + + + + + + + + + + + + +
                                                                              +

                                                                              Documentation

                                                                              + + + + + +
                                                                              + +
                                                                              +
                                                                              + + + + +
                                                                              + + +
                                                                              +

                                                                              Deprecated

                                                                              + + +
                                                                              + No deprecated elements have been found in this project. +
                                                                              +
                                                                              +
                                                                              +
                                                                              +
                                                                              +

                                                                              Search results

                                                                              + +
                                                                              +
                                                                              +
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                + + +
                                                                                + + + + diff --git a/docs/reports/errors.html b/docs/reports/errors.html new file mode 100644 index 0000000..340516e --- /dev/null +++ b/docs/reports/errors.html @@ -0,0 +1,174 @@ + + + + + Documentation » Compilation errors + + + + + + + + + + + + + + + + +
                                                                                +

                                                                                Documentation

                                                                                + + + + + +
                                                                                + +
                                                                                +
                                                                                + + + + +
                                                                                + + +
                                                                                +

                                                                                Errors

                                                                                + +

                                                                                Table of Contents

                                                                                + + + + + + + + + + + + + +
                                                                                class/dashboard/subpage-main.php1
                                                                                class/language.php1
                                                                                class/settings.php1
                                                                                + + + +

                                                                                subpage-main.php

                                                                                + + + + + + + + + + + + + + + +
                                                                                TypeLineDescription
                                                                                ERROR0Tag "see" with body "@see templates/dashboard/customize-css.html + 2020-12-09T1113+0100" has error "\templates/dashboard/customize-css.html" is not a valid Fqsen.
                                                                                + +

                                                                                language.php

                                                                                + + + + + + + + + + + + + + + +
                                                                                TypeLineDescription
                                                                                ERROR0Tag "see" with body "@see wp-includes/l10n.php:857" has error "\wp-includes/l10n.php:857" is not a valid Fqsen.
                                                                                + +

                                                                                settings.php

                                                                                + + + + + + + + + + + + + + + +
                                                                                TypeLineDescription
                                                                                ERROR0Tag "since" with body "@since ditched trimming whitespace from text box content in response to user request." has error
                                                                                +
                                                                                +
                                                                                +
                                                                                +
                                                                                +

                                                                                Search results

                                                                                + +
                                                                                +
                                                                                +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + + +
                                                                                  + + + + diff --git a/docs/reports/markers.html b/docs/reports/markers.html new file mode 100644 index 0000000..67e0a4e --- /dev/null +++ b/docs/reports/markers.html @@ -0,0 +1,128 @@ + + + + + Documentation » Markers + + + + + + + + + + + + + + + + +
                                                                                  +

                                                                                  Documentation

                                                                                  + + + + + +
                                                                                  + +
                                                                                  +
                                                                                  + + + + +
                                                                                  + + +
                                                                                  +

                                                                                  Markers

                                                                                  + +

                                                                                  Table of Contents

                                                                                  + + + + + +
                                                                                  class/settings.php1
                                                                                  + + +

                                                                                  settings.php

                                                                                  + + + + + + + + + + + + + + + +
                                                                                  TypeLineDescription
                                                                                  TODO89Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  Search results

                                                                                  + +
                                                                                  +
                                                                                  +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + + +
                                                                                    + + + + From 81acfacfda992e608374f782f80411458989b303 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:56:10 +0000 Subject: [PATCH 005/144] Add .phpdoc/ to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fdc234 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.phpdoc/ From e6237612ca393691496e56e2e6d6a4aef36d6956 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:09:46 +0000 Subject: [PATCH 006/144] Create SECURITY.md --- SECURITY.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..67dd45e --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 2.x.x | :white_check_mark: | +| 1.x.x | :x: | + +## Reporting a Vulnerability + +To securely report a vulnerability, please DO NOT post on the WordPress +Support Forum or create an Issue on this repository. + +Please email [mark@cheret.de](mailto:mark@cheret.de) privately with the +full details of the vulnerability. From 22282f9df16516e91022da7ad21ce227c3411fc2 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:55:46 +0000 Subject: [PATCH 007/144] Add getting started instructions to README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 6a3e29e..d57f0f6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,21 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor **footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +## Getting Started + +1. Read the contributing guidelines +1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Install [Composer](https://getcomposer.org/download/), if you don't have it already +1. Install dependencies (`composer install`) +1. Create a new branch from `main` (`git checkout -b `) +1. When you're finished, commit your changes to the remote version of your branch + and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + +## Updating Documentation + +1. Install [phpDocumentor](https://phpdoc.org/) +1. Run it (`phpDocumentor -d . -t docs`) + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From c9f9213a568260aff14fa77c7066a7c73df6965d Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 07:52:09 +0000 Subject: [PATCH 008/144] Create LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 4363f68d43c71f6d9fa8eb0d354e44d29d08eccf Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:07:48 +0000 Subject: [PATCH 009/144] Add footnotes header image --- img/footnotes.png | Bin 0 -> 4964 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 img/footnotes.png diff --git a/img/footnotes.png b/img/footnotes.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d82f6c4b6b704625dbf3ee328e81bd0cc2e38b GIT binary patch literal 4964 zcmbVPdpy(s_g{%ViAu~}pGA@DHq2!%xtH8;V`7<^8D`9ciRdETmdbK#Mm54*r^ux! zS+0pLNGfxgB9d!vzo}23-|vs_Nf1I87c|Fhdbd8)8Up|V zL3npBvX_HB977~%p*JyFF@$iwHUMCJI3^s83Bi&<{#YD7%tUdz?ujA@A7G;B33Grr zgj-^R@JA^mtQ*DA9YYDh7zQXFHU$~S!1)FUSTY(ELkJCvgvXdD{;~__^P6I@BIp-{ z9AcvQJ18#)XOJb4gayI0AetD69u%afs|D4C80s2ofV3e{2pFmjhUjZTA#j*J90CRX z^Hbz|BLxJ)U9D{X@x^~KQ4AuJ!{K0Xbab>4M z$7qH{D*drwg^k3J@Zn@UF$}b65$#WmBAY1kBmJEMA>6^?U&CRM{}hT}GH?t!91PWh zfC+@nyndl0$*$P{4dXweBi&=ev0zthBr%GF;qOPF(jR4h?f$!?O&~uSxDyG_-xPGH z6%i9fz=n}+txOd8D_Q~g0Jx30z6}(ruM5%FhUghUq2}7=*4FxZRyq)vjirvY^&cDm zNmtL%+(OsNT*nFq(}qH=bu9D^&CP9ebf6a2Py-z(?2oQ(SR@%8hQa>vi|70OM_2p5 z>cTBaSTvbPawif)|8#(J5Rpub3?hbuEZtyQP>=%}gAd!3Y;Mr+e66q~{7Gzp4T(qq z{i-k={~scNKnx)NJ@enX0so(>f%(CJH{0X?w96k6zXvzjf198G@bCCw!}v2p;t$8} zM;QKG?Y?1aW$qp`FiAHdac#tt<2VxP+;Dq>Jj<+w#8Ia5-cQiZP7CuJLfHzqr zDQ&l7I!eNmm}=w7PJXl7ej0pS$S6T3ZZlh*15CS}ue^2Z=t(X;wr=}rA_|52i|?Yl zLy&(Y004o4d~&<>eU;S5wdHohX~RJxdrfk(8cMvI_AzdV_h4ZJ^lj^>+msD3}kmpf}(^ z<|k1+CDSm zyVW{4CZ|;#XzVesvsZQ=o)=4Za;zG9*h!yllnJPJ z>YHumTC%S95?+_4Hy{tQfaMo*Wi;;y5PA7)2jV@+Y1;iF<8 z#I$t&$Q+eRRbSW0e!2boK$Iv$pyBnA#_#r4<7+u5$_6yV6F%fiMXQ0 zn4Vke+-t)RVm;bH-F7AC#~y4JPu_jrKCF*rUBbRtU@RC*0`E><|e4Cf##GJ+L3$nJe|i=Ag>LHF7|IQA_Ju zS1S(LDMF{NKW4^rsb>x86&j_lSjk;}rzB|sy`iy+HPKcQAjBJumlBCp?Y~@g`>Ro6@s}RpMf=^7{!X(uJzjA4Qmzy%*{^fM zkSe(sC0Z`zQ^V~IK#=?&c{q#V9E>Z~YE+S`i>hz+imDYR;C)ZX zwZ;4Adeks*A4av3f*rPCHnV!>2B)TKB49$o2bJYvRkr)D;Lp>0r6R_p9_M}+h^6NZFSj)}8qM;00oLRW}&x=;fQ^?$7 zJU5nujyP@B_4DHKTM%^~ld=`A0X(b*ZhWEY=m=EHs#ANGwaYF$-873i)c5T>prAw!|DEQ24_=HzWw_V7O zs}nyFIiosVnJ;}EeNmr~V;i^kwpX0dbeF!coFGPv zfzO`b`<;w66H0jitMzy9wu=``L~|<;EHP0k*`Wf1;FgM9((4S)auHqf`EI`_u|Qfn8aUYI<`hWNTZ>Azmzt;CRJ%3ngip;ca5@ z7TU_*r{dn^Mp+3(43t%w9RnY|}tyvMWF6jq=j`IprPwNhj{F3Mjlny6973BU7x}ed>*U-S?%8 zDv0pZmnFPgj_4~BCJLnu+8Nm<8_!p;pWT{bUsc8g%*Nx=UB1t$B1F&jMdzk}$t2%* z(=6JtGBS3YQ)Ta%@SeC)9$`Ij*-4&V^!Uu}IRk_y@RTQ9ohK;h0EB<6l#%KEdGrF) z3h$#o7}3w^*Qm;TcYG@#F~LuHxbcT{izE7nJ7oPJag1o$bwNY1W8#}1A0hVD5^SW5 zz-rE8Eh*FPuUwyGF}d}EwFPkYP~}A`kiPkPuKrr79FS2dBdAJ$cdj~w(h%Sk`%aL( z6)<-`ZuW=rL*#+B4m&Lwt^RVwBA$U1|Ha=uuhmqUANIl0_4qij=W~E4#%Dn~Pj#>4 z_(^Yq0(;B~-V>werp~{}cQ*LC|F)E-5N-#&@>#xW z#k?jWu_6x%wtP{1@-4YWC%Jx4KiQixaisvo4Q>1)4MG5NrDjeXk&DQiJ%rL%@ozTG z^ysPh0)3HELaf+&Mf57A;^yeVkvGQ*u)5)3RCe!IPR4z`;s;BygGmb7UH_nXg7?JW z$@6kRsqu@n@1?&)LaVBT0u(tn~5EcMqnT@Kg6fx-JNw%`PpbMR>D~Wm*W{*(<`)@W_ zY_8K$_Anyjv+j2ThI#Uql@@QFQT3yT@pKw+rm!`GBRpn!1zHRcJIa{QczW$qbP3stDpmOdySI6xOu`}@QO4pLWT=f;QRB4;Epz+ zqy5j_ds{4wtKBC*Mf}2M&G{>n<0J=~?`j=rgAD4j6?fOR>{lp#(*7ap#G$>{8-l{` z)l>96x@bYI=_x?J(3rbYnTP+LtIvHV6L~EyzG0vZTAW9s-^*l41!AKw`9?P=)3=** z9I@iAkLH(5pHo720L;J+Uk{$FRqt$1vgG(&1FD6%ycS9000T2v`hgGfiB8dUHSw-v z8WDqT%R3cTBtm3k{MF}r@=+EXK-CxMNfM=KClW5$<%RdemPzSwib*F1SyP`ctHTFv z5*m$gMF9|HvKKDCG?&CbSNXdrezEs_vv6HJ=FUmmsGB+k%B4rd(jV4!h|s?osm*d^ z84~hvi{Lot+Ow}TINN}l5&Yu>2^5;y$75m}&dpH_A&7?z;_a}2; zO`0Kf!Nh}2uJ-G_8Sx<;bvMgj?nhkN#C$|GyKcHVN934#7W2NTR;&tfX@hfcFEsG` zg{Nz_?pJmOuRntNUVF3ahM~f(ay|L!-s{tj=j3=6;Q0ycbNc&Z&2i7)n>_J!b+Okg z^X&Q>El;G45uYr&p2~rh$mv}NZaDTYZSC^SLWH`A)8$@dr>CbAQKuHi!Lb{rVzjr} zLdVBm6wVALRpmb;pmKQSUDL|Zsk4i638zKHG3glkcR<^UarOpSe{GFhw$U)-wiJ1w zs9OIXBhler z`&0l0?+v!2Mw^#SgANbxBIam6Du_^fw|f<7d-ms1t9QnB%T%QyExUx4vwfa4t=)|G zNIY6i?P&zn>hR?+`}g|_o%g!-iHs;$;V}zKyTZn0M+C;n*6^@dBMDiVA9|f)<5ZZx z(R`10>w6?K3kWa;u(xXZsr)F+7-V~0)|{?HPyf0u@ Date: Sun, 21 Feb 2021 11:08:04 +0000 Subject: [PATCH 010/144] Add linting instructions and header image --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d57f0f6..6bd1e8d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![footnotes](https://raw.githubusercontent.com/media-competence-institute/footnotes/main/img/footnotes.png) + # footnotes ## Description @@ -18,11 +20,21 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. When you're finished, commit your changes to the remote version of your branch and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). +## Checking WP Coding Standard Compliance + +1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) +1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -n -p `) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `*/**/*.php` + ## Updating Documentation 1. Install [phpDocumentor](https://phpdoc.org/) 1. Run it (`phpDocumentor -d . -t docs`) +## Testing + +Unit tests are TODO. + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From a1aebed7f4075fdb012f383b792dc0f34bd92e13 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:20:11 +0000 Subject: [PATCH 011/144] Add more PHPCS tips --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6bd1e8d..2ff05d5 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,10 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor ## Checking WP Coding Standard Compliance 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) -1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -n -p `) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `*/**/*.php` +1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) + - Add the `-n` flag to ignore warnings (i.e., show only errors) + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` ## Updating Documentation From 0d6f5934aa97a358c85c2b1884d96da7d8ad780e Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:41:13 +0100 Subject: [PATCH 012/144] Update README.md moved image due to repo change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ff05d5..2624ba1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![footnotes](https://raw.githubusercontent.com/media-competence-institute/footnotes/main/img/footnotes.png) +![footnotes](https://raw.githubusercontent.com/markcheret/footnotes/main/img/footnotes.png) # footnotes From c0b0b8ff7f2ee09d914422eb8b08bd85073d3b05 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:42:58 +0100 Subject: [PATCH 013/144] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ff05d5..70839f3 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. ## Getting Started From 6e5215fdda1767e3fdea5933e024865be09425ae Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:44:24 +0100 Subject: [PATCH 014/144] Update readme.txt update minor language. How do we keep the readme's in sync? --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index d5ff8ee..5dbb96f 100755 --- a/readme.txt +++ b/readme.txt @@ -15,8 +15,8 @@ Cheers for the review, folks! https://www.youtube.com/watch?v=HzHaMAAJwbI -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. = Main Features = - Fully customizable **footnotes** start and end shortcodes; From 0f1440d772d7b0e22fa37725bc34b6c77e4de3e5 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:54:54 +0100 Subject: [PATCH 015/144] Update CONTRIBUTING.md --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73fa4de..d631099 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,19 @@ -footnotes welcomes contributions! +***footnotes*** welcomes contributions! Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: # Branching -- footnotes uses [GitHub Flow](https://githubflow.github.io/) +- ***footnotes*** uses [GitHub Flow](https://githubflow.github.io/) - branch off of `main` to start developing - give your new branch a descriptive name - when ready, submit a pull request to merge your branch with `main` # Commits -- footnotes uses [Conventional Commits](https://www.conventionalcommits.org) +- ***footnotes*** uses [Conventional Commits](https://www.conventionalcommits.org) - keep individual commits as small as possible # Versioning -- footnotes uses [Semantic Versioning](https://semver.org/) +- ***footnotes*** uses [Semantic Versioning](https://semver.org/) From b00d47b757930dcf6949752d8f637d609f608445 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:58:08 +0100 Subject: [PATCH 016/144] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2ff05d5..baabd72 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,19 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +***footnotes*** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +***footnotes*** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. ## Getting Started 1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) 1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + and submit a [pull request](https://github.com/markcheret/footnotes/pulls). ## Checking WP Coding Standard Compliance @@ -39,13 +39,13 @@ Unit tests are TODO. ## Main Features -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Fully customizable ***footnotes*** start and end shortcodes; +- Styled tooltips supporting hyperlinks display ***footnotes*** or a dedicated text; - Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; +- Display the ***footnotes*** *Reference Container* inside a Widget; - Wide choice of numbering styles; - Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Configure the ***footnotes'*** appearance by dashboard settings and Custom CSS style rules; - Button in both the Visual and the Text editor to add shortcodes around selection. ## Example Usage @@ -63,4 +63,4 @@ The current version is available on the [WordPress.org Plugin Directory](https:/ ## Acknowledgements -Huge thanks to every footnotes user, contributor, bug reporter, feature requester and fan! +Huge thanks to every ***footnotes user***, contributor, bug reporter, feature requester and fan! From b11f3bdc2e332ff827b9c13c1a02f49907204ad1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 13:53:51 +0000 Subject: [PATCH 017/144] Alter formatting, add contribution information --- CONTRIBUTING.md | 36 +++++++++++++++++++++++++++--------- README.md | 14 +++++++------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d631099..5802338 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,37 @@ -***footnotes*** welcomes contributions! +**footnotes** welcomes contributions! -Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: +Please follow these guidelines when contributing, as it will give your pull +request the best chance of being accepted: -# Branching +# Requesting Features/Reporting Bugs -- ***footnotes*** uses [GitHub Flow](https://githubflow.github.io/) -- branch off of `main` to start developing -- give your new branch a descriptive name -- when ready, submit a pull request to merge your branch with `main` +- To request a new feature or to report a bug, create an + [Issue](https://github.com/markcheret/footnotes/issues/new/choose) and choose + the correct template + +# Contributing Code + +- **footnotes** uses [GitHub Flow](https://githubflow.github.io/) +- branch off of `main` to start developing (`git checkout -b `) +- ensure that your new branch has a descriptive name +- create a remote copy of your new branch (`git push`) +- create a draft [pull request](https://github.com/markcheret/footnotes/compare) + to merge your branch with `main` — tag any related Issues, and if they are + assigned to a Project board, this will automatically move them into the + ‘In Progress’ bucket +- when you think you're finished, un-draft your pull request — if the PR is + assigned to a Project board, this will automatically move it and any related + Issues into the ‘Review in progress’ bucket # Commits -- ***footnotes*** uses [Conventional Commits](https://www.conventionalcommits.org) +- **footnotes** uses [Conventional Commits](https://www.conventionalcommits.org) - keep individual commits as small as possible # Versioning -- ***footnotes*** uses [Semantic Versioning](https://semver.org/) +- **footnotes** uses [Semantic Versioning](https://semver.org/) + +# Translating + +- Translations are welcome! diff --git a/README.md b/README.md index baabd72..d3ec650 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -***footnotes*** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -***footnotes*** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. ## Getting Started @@ -39,13 +39,13 @@ Unit tests are TODO. ## Main Features -- Fully customizable ***footnotes*** start and end shortcodes; -- Styled tooltips supporting hyperlinks display ***footnotes*** or a dedicated text; +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; - Responsive *Reference Container* at the end or positioned by shortcode; -- Display the ***footnotes*** *Reference Container* inside a Widget; +- Display the **footnotes** *Reference Container* inside a Widget; - Wide choice of numbering styles; - Freely configurable and optional backlink symbol; -- Configure the ***footnotes'*** appearance by dashboard settings and Custom CSS style rules; +- Configure the **footnotes'** appearance by dashboard settings and Custom CSS style rules; - Button in both the Visual and the Text editor to add shortcodes around selection. ## Example Usage @@ -63,4 +63,4 @@ The current version is available on the [WordPress.org Plugin Directory](https:/ ## Acknowledgements -Huge thanks to every ***footnotes user***, contributor, bug reporter, feature requester and fan! +Huge thanks to every **footnotes user**, contributor, bug reporter, feature requester and fan! From 9d8efe1a414700fcfeec64ae9c5313fe032cd287 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 13:55:22 +0000 Subject: [PATCH 018/144] Fix indentation --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5802338..83e6a64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ request the best chance of being accepted: - To request a new feature or to report a bug, create an [Issue](https://github.com/markcheret/footnotes/issues/new/choose) and choose - the correct template + the correct template # Contributing Code @@ -17,11 +17,11 @@ request the best chance of being accepted: - create a remote copy of your new branch (`git push`) - create a draft [pull request](https://github.com/markcheret/footnotes/compare) to merge your branch with `main` — tag any related Issues, and if they are - assigned to a Project board, this will automatically move them into the - ‘In Progress’ bucket + assigned to a Project board, this will automatically move them into the + ‘In Progress’ bucket - when you think you're finished, un-draft your pull request — if the PR is - assigned to a Project board, this will automatically move it and any related - Issues into the ‘Review in progress’ bucket + assigned to a Project board, this will automatically move it and any related + Issues into the ‘Review in progress’ bucket # Commits From 9ee72568efb1952076612069cd96a4128120543c Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:00:59 +0000 Subject: [PATCH 019/144] Append line endings --- class/config.php | 166 +- class/convert.php | 458 +- class/dashboard/init.php | 424 +- class/dashboard/layout.php | 1104 ++-- class/dashboard/subpage-diagnostics.php | 278 +- class/dashboard/subpage-main.php | 2364 ++++----- class/hooks.php | 188 +- class/init.php | 746 +-- class/language.php | 216 +- class/settings.php | 2506 ++++----- class/task.php | 4666 ++++++++--------- class/template.php | 522 +- class/widgets/base.php | 176 +- class/widgets/reference-container.php | 170 +- class/wysiwyg.php | 164 +- css/dev-common.css | 1182 ++--- css/dev-tooltips-alternative.css | 126 +- css/dev-tooltips.css | 116 +- css/settings.css | 564 +- features.txt | 38 +- footnotes.php | 150 +- includes.php | 75 +- js/wysiwyg-editor.js | 158 +- license.txt | 1346 ++--- readme.txt | 1244 ++--- .../dashboard/customize-css-migration.html | 36 +- templates/dashboard/customize-css-new.html | 66 +- templates/dashboard/customize-css.html | 22 +- .../dashboard/customize-hyperlink-arrow.html | 30 +- .../dashboard/customize-superscript.html | 48 +- templates/dashboard/diagnostics.html | 74 +- templates/dashboard/editor-button.html | 124 +- templates/dashboard/expert-lookup.html | 100 +- templates/dashboard/how-to-donate.html | 2 +- templates/dashboard/how-to-help.html | 32 +- templates/dashboard/manfisher.html | 20 +- .../dashboard/mouse-over-box-appearance.html | 64 +- .../dashboard/mouse-over-box-dimensions.html | 16 +- .../dashboard/mouse-over-box-display.html | 30 +- .../dashboard/mouse-over-box-position.html | 32 +- templates/dashboard/mouse-over-box-text.html | 44 +- .../dashboard/mouse-over-box-timing.html | 40 +- .../dashboard/mouse-over-box-truncation.html | 32 +- templates/dashboard/other-plugins.html | 182 +- templates/dashboard/settings-excerpts.html | 22 +- templates/dashboard/settings-love.html | 24 +- templates/dashboard/settings-numbering.html | 30 +- .../settings-reference-container.html | 234 +- templates/dashboard/settings-scrolling.html | 72 +- templates/dashboard/settings-start-end.html | 126 +- templates/public/footnote-alternative.html | 48 +- templates/public/footnote.html | 40 +- templates/public/js-reference-container.html | 176 +- .../reference-container-body-3column.html | 58 +- .../reference-container-body-combi.html | 28 +- .../reference-container-body-switch.html | 38 +- .../public/reference-container-body.html | 48 +- templates/public/reference-container.html | 166 +- templates/public/tooltip.html | 36 +- 59 files changed, 10644 insertions(+), 10643 deletions(-) diff --git a/class/config.php b/class/config.php index cb9b7bd..98a3245 100644 --- a/class/config.php +++ b/class/config.php @@ -1,83 +1,83 @@ -foot'; - - /** - * Public Plugin name for dashboard heading - * - * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not - * the last line. That ugly display bug badly affected the plugin’s communication. - * The only working solution found so far is using position:fixed in one heading - * that isn’t translated, and dropping the logo in another, translatable heading. - * - * @since 2.0.4 - * @var string - */ - const C_STR_PLUGIN_HEADING_NAME = 'footnotes'; - - /** - * Html tag for the LOVE symbol. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var string - */ - const C_STR_LOVE_SYMBOL = ''; - - /** - * HTML code for the 'love' symbol used in dashboard heading - * - * @since 2.0.4 - * @var string - */ - const C_STR_LOVE_SYMBOL_HEADING = ''; - - /** - * Short code to DON'T display the 'LOVE ME' slug on certain pages. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var string - */ - const C_STR_NO_LOVE_SLUG = '[[no footnotes: love]]'; -} +foot'; + + /** + * Public Plugin name for dashboard heading + * + * After properly displaying in dashboard headings until WPv5.4, the above started + * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * the last line. That ugly display bug badly affected the plugin’s communication. + * The only working solution found so far is using position:fixed in one heading + * that isn’t translated, and dropping the logo in another, translatable heading. + * + * @since 2.0.4 + * @var string + */ + const C_STR_PLUGIN_HEADING_NAME = 'footnotes'; + + /** + * Html tag for the LOVE symbol. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var string + */ + const C_STR_LOVE_SYMBOL = ''; + + /** + * HTML code for the 'love' symbol used in dashboard heading + * + * @since 2.0.4 + * @var string + */ + const C_STR_LOVE_SYMBOL_HEADING = ''; + + /** + * Short code to DON'T display the 'LOVE ME' slug on certain pages. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var string + */ + const C_STR_NO_LOVE_SLUG = '[[no footnotes: love]]'; +} diff --git a/class/convert.php b/class/convert.php index 767d25c..e1823ad 100644 --- a/class/convert.php +++ b/class/convert.php @@ -1,229 +1,229 @@ - 26) { - // increase offset and reduce counter - $l_int_Offset++; - $p_int_Value -= 26; - } - // if offset set (more then Z), then add a new letter in front - if ($l_int_Offset > 0) { - $l_str_Return = chr($l_int_Offset + 64); - } - // add the origin letter - $l_str_Return .= chr($p_int_Value + 64); - // return the latin character representing the integer - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); - } - return strtolower($l_str_Return); - } - - /** - * Converts an integer to a leading-0 integer. - * - * @author Stefan Herndler - * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @return string Value with a leading zero. - */ - private static function toArabicLeading($p_int_Value) { - // add a leading 0 if number lower then 10 - if ($p_int_Value < 10) { - return "0" . $p_int_Value; - } - return $p_int_Value; - } - - /** - * Converts an integer to a romanic letter. - * - * @author Stefan Herndler - * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @return string - * - * Edited: - * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 - */ - private static function toRomanic($p_int_Value, $p_bool_UpperCase) { - // table containing all necessary romanic letters - $l_arr_RomanicLetters = array( - 'M' => 1000, - 'CM' => 900, - 'D' => 500, - 'CD' => 400, - 'C' => 100, - 'XC' => 90, - 'L' => 50, - 'XL' => 40, - 'X' => 10, - 'IX' => 9, - 'V' => 5, - 'IV' => 4, - 'I' => 1 - ); - // return value - $l_str_Return = ''; - // iterate through integer value until it is reduced to 0 - while ($p_int_Value > 0) { - foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { - if ($p_int_Value >= $l_int_Arabic) { - $p_int_Value -= $l_int_Arabic; - $l_str_Return .= $l_str_Romanic; - break; - } - } - } - // return romanic letters as string - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); - } - return strtolower($l_str_Return); - } - - /** - * Converts a string depending on its value to a boolean. - * - * @author Stefan Herndler - * @since 1.0-beta - * @param string $p_str_Value String to be converted to boolean. - * @return bool Boolean representing the string. - */ - public static function toBool($p_str_Value) { - // convert string to lower-case to make it easier - $p_str_Value = strtolower($p_str_Value); - // check if string seems to contain a "true" value - switch ($p_str_Value) { - case "checked": - case "yes": - case "true": - case "on": - case "1": - return true; - } - // nothing found that says "true", so we return false - return false; - } - - /** - * Get a html Array short code depending on Arrow-Array key index. - * - * @author Stefan Herndler - * @since 1.3.2 - * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. - * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. - */ - public static function getArrow($p_int_Index = -1) { - // define all possible arrows - $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); - // convert index to an integer - if (!is_int($p_int_Index)) { - $p_int_Index = intval($p_int_Index); - } - // return the whole arrow array - if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { - return $l_arr_Arrows; - } - // return a single arrow - return $l_arr_Arrows[$p_int_Index]; - } - - /** - * Displays a Variable. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param mixed $p_mixed_Value - */ - public static function debug($p_mixed_Value) { - if (empty($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else if (is_array($p_mixed_Value)) { - printf("
                                                                                    ");
                                                                                    -			print_r($p_mixed_Value);
                                                                                    -			printf("
                                                                                    "); - - } else if (is_object($p_mixed_Value)) { - printf("
                                                                                    ");
                                                                                    -			print_r($p_mixed_Value);
                                                                                    -			printf("
                                                                                    "); - - } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else if (is_date($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else { - var_dump($p_mixed_Value); - } - echo "
                                                                                    "; - } -} + 26) { + // increase offset and reduce counter + $l_int_Offset++; + $p_int_Value -= 26; + } + // if offset set (more then Z), then add a new letter in front + if ($l_int_Offset > 0) { + $l_str_Return = chr($l_int_Offset + 64); + } + // add the origin letter + $l_str_Return .= chr($p_int_Value + 64); + // return the latin character representing the integer + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); + } + return strtolower($l_str_Return); + } + + /** + * Converts an integer to a leading-0 integer. + * + * @author Stefan Herndler + * @since 1.0-gamma + * @param int $p_int_Value Value/Index to be converted. + * @return string Value with a leading zero. + */ + private static function toArabicLeading($p_int_Value) { + // add a leading 0 if number lower then 10 + if ($p_int_Value < 10) { + return "0" . $p_int_Value; + } + return $p_int_Value; + } + + /** + * Converts an integer to a romanic letter. + * + * @author Stefan Herndler + * @since 1.0-gamma + * @param int $p_int_Value Value/Index to be converted. + * @return string + * + * Edited: + * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 + */ + private static function toRomanic($p_int_Value, $p_bool_UpperCase) { + // table containing all necessary romanic letters + $l_arr_RomanicLetters = array( + 'M' => 1000, + 'CM' => 900, + 'D' => 500, + 'CD' => 400, + 'C' => 100, + 'XC' => 90, + 'L' => 50, + 'XL' => 40, + 'X' => 10, + 'IX' => 9, + 'V' => 5, + 'IV' => 4, + 'I' => 1 + ); + // return value + $l_str_Return = ''; + // iterate through integer value until it is reduced to 0 + while ($p_int_Value > 0) { + foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { + if ($p_int_Value >= $l_int_Arabic) { + $p_int_Value -= $l_int_Arabic; + $l_str_Return .= $l_str_Romanic; + break; + } + } + } + // return romanic letters as string + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); + } + return strtolower($l_str_Return); + } + + /** + * Converts a string depending on its value to a boolean. + * + * @author Stefan Herndler + * @since 1.0-beta + * @param string $p_str_Value String to be converted to boolean. + * @return bool Boolean representing the string. + */ + public static function toBool($p_str_Value) { + // convert string to lower-case to make it easier + $p_str_Value = strtolower($p_str_Value); + // check if string seems to contain a "true" value + switch ($p_str_Value) { + case "checked": + case "yes": + case "true": + case "on": + case "1": + return true; + } + // nothing found that says "true", so we return false + return false; + } + + /** + * Get a html Array short code depending on Arrow-Array key index. + * + * @author Stefan Herndler + * @since 1.3.2 + * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. + * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. + */ + public static function getArrow($p_int_Index = -1) { + // define all possible arrows + $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); + // convert index to an integer + if (!is_int($p_int_Index)) { + $p_int_Index = intval($p_int_Index); + } + // return the whole arrow array + if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { + return $l_arr_Arrows; + } + // return a single arrow + return $l_arr_Arrows[$p_int_Index]; + } + + /** + * Displays a Variable. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param mixed $p_mixed_Value + */ + public static function debug($p_mixed_Value) { + if (empty($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else if (is_array($p_mixed_Value)) { + printf("
                                                                                    ");
                                                                                    +			print_r($p_mixed_Value);
                                                                                    +			printf("
                                                                                    "); + + } else if (is_object($p_mixed_Value)) { + printf("
                                                                                    ");
                                                                                    +			print_r($p_mixed_Value);
                                                                                    +			printf("
                                                                                    "); + + } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else if (is_date($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else { + var_dump($p_mixed_Value); + } + echo "
                                                                                    "; + } +} diff --git a/class/dashboard/init.php b/class/dashboard/init.php index 2adbbbf..b18e77c 100644 --- a/class/dashboard/init.php +++ b/class/dashboard/init.php @@ -1,212 +1,212 @@ -a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; - } - } - ksort($this->a_arr_SubPageClasses); - - // register hooks/actions - add_action('admin_init', array($this, 'initializeSettings')); - add_action('admin_menu', array($this, 'registerMainMenu')); - // register AJAX callbacks for Plugin information - add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function initializeSettings() { - MCI_Footnotes_Settings::instance()->RegisterSettings(); - // iterate though each sub class of the layout engine and register their sections - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @author Stefan Herndler - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function registerMainMenu() { - global $menu; - // iterate through each main menu - foreach($menu as $l_arr_MainMenu) { - // iterate through each main menu attribute - foreach($l_arr_MainMenu as $l_str_Attribute) { - // main menu already added, append sub pages and stop - if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { - $this->registerSubPages(); - return; - } - } - } - - // add a new main menu page to the WordPress dashboard - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title - self::C_STR_MAIN_MENU_TITLE, // menu title - 'manage_options', // capability - self::C_STR_MAIN_MENU_SLUG, // menu slug - array($this, "displayOtherPlugins"), // function - plugins_url('footnotes/img/main-menu.png'), // icon url - null // position - ); - $this->registerSubPages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function registerSubPages() { - // first registered sub menu page MUST NOT contain a unique slug suffix - // iterate though each sub class of the layout engine and register their sub page - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSubPage(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayOtherPlugins() { - printf("

                                                                                    "); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); - echo $l_obj_Template->getContent(); - - printf('visit Mark Cheret'); - printf("

                                                                                    "); - - printf(''); - } - - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function getPluginMetaInformation() { - // get plugin internal name from POST data - $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; - if (empty($l_str_PluginName)) { - echo json_encode(array("error" => "Plugin name invalid.")); - exit; - } - $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; - // call URL and collect data - $l_arr_Response = wp_remote_get($l_str_Url); - // check if response is valid - if (is_wp_error($l_arr_Response)) { - echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); - exit; - } - if (!array_key_exists("body", $l_arr_Response)) { - echo json_encode(array("error" => "Error reading WordPress API response message.")); - exit; - } - // get the body of the response - $l_str_Response = $l_arr_Response["body"]; - // get plugin object - $l_arr_Plugin = json_decode($l_str_Response, true); - if (empty($l_arr_Plugin)) { - echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                    URL: " . $l_str_Url . "
                                                                                    Response: " . $l_str_Response)); - exit; - } - - $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; - $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; - $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); - - // return Plugin information as JSON encoded string - echo json_encode( - array( - "error" => "", - "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", - "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", - "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", - "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", - "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", - "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", - "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", - "PluginRating" => $l_int_NumRatings, - "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", - "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" - ) - ); - exit; - } -} +a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; + } + } + ksort($this->a_arr_SubPageClasses); + + // register hooks/actions + add_action('admin_init', array($this, 'initializeSettings')); + add_action('admin_menu', array($this, 'registerMainMenu')); + // register AJAX callbacks for Plugin information + add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function initializeSettings() { + MCI_Footnotes_Settings::instance()->RegisterSettings(); + // iterate though each sub class of the layout engine and register their sections + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @author Stefan Herndler + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function registerMainMenu() { + global $menu; + // iterate through each main menu + foreach($menu as $l_arr_MainMenu) { + // iterate through each main menu attribute + foreach($l_arr_MainMenu as $l_str_Attribute) { + // main menu already added, append sub pages and stop + if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { + $this->registerSubPages(); + return; + } + } + } + + // add a new main menu page to the WordPress dashboard + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // page title + self::C_STR_MAIN_MENU_TITLE, // menu title + 'manage_options', // capability + self::C_STR_MAIN_MENU_SLUG, // menu slug + array($this, "displayOtherPlugins"), // function + plugins_url('footnotes/img/main-menu.png'), // icon url + null // position + ); + $this->registerSubPages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function registerSubPages() { + // first registered sub menu page MUST NOT contain a unique slug suffix + // iterate though each sub class of the layout engine and register their sub page + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSubPage(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayOtherPlugins() { + printf("

                                                                                    "); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); + echo $l_obj_Template->getContent(); + + printf('visit Mark Cheret'); + printf("

                                                                                    "); + + printf(''); + } + + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function getPluginMetaInformation() { + // get plugin internal name from POST data + $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; + if (empty($l_str_PluginName)) { + echo json_encode(array("error" => "Plugin name invalid.")); + exit; + } + $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; + // call URL and collect data + $l_arr_Response = wp_remote_get($l_str_Url); + // check if response is valid + if (is_wp_error($l_arr_Response)) { + echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); + exit; + } + if (!array_key_exists("body", $l_arr_Response)) { + echo json_encode(array("error" => "Error reading WordPress API response message.")); + exit; + } + // get the body of the response + $l_str_Response = $l_arr_Response["body"]; + // get plugin object + $l_arr_Plugin = json_decode($l_str_Response, true); + if (empty($l_arr_Plugin)) { + echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                    URL: " . $l_str_Url . "
                                                                                    Response: " . $l_str_Response)); + exit; + } + + $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; + $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; + $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); + + // return Plugin information as JSON encoded string + echo json_encode( + array( + "error" => "", + "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", + "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", + "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", + "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", + "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", + "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", + "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", + "PluginRating" => $l_int_NumRatings, + "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", + "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" + ) + ); + exit; + } +} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 57b63c9..d16ad8b 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -1,552 +1,552 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); - } - - /** - * Returns an array describing a meta box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SectionID Parent Section ID. - * @param string $p_str_ID Unique ID suffix. - * @param string $p_str_Title Title for the meta box. - * @param string $p_str_CallbackFunctionName Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { - return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, - "callback" => $p_str_CallbackFunctionName - ); - } - - /** - * Registers a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSubPage() { - global $submenu; - // any sub menu for our main menu exists - if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { - // iterate through all sub menu entries of the ManFisher main menu - foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { - if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { - // remove that sub menu and add it again to move it to the bottom - remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); - } - } - } - - $this->a_str_SubPageHook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug - $this->getSubPageTitle(), // page title - $this->getSubPageTitle(), // menu title - 'manage_options', // capability - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug - array($this, 'displayContent') // function - ); - } - - /** - * Registers all sections for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSections() { - // iterate through each section - foreach($this->getSections() as $l_arr_Section) { - // append tab to the tab-array - $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; - add_settings_section( - $l_arr_Section["id"], // unique id - "", //$l_arr_Section["title"], // title - array($this, 'Description'), // callback function for the description - $l_arr_Section["id"] // parent sub page slug - ); - $this->registerMetaBoxes($l_arr_Section["id"]); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_ParentID Parent section unique id. - */ - private function registerMetaBoxes($p_str_ParentID) { - // iterate through each meta box - foreach($this->getMetaBoxes() as $l_arr_MetaBox) { - if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { - continue; - } - add_meta_box( - $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id - $l_arr_MetaBox["title"], // meta box title - array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content - $p_str_ParentID, // post type = parent section id - 'main' // context - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function appendScripts() { - // enable meta boxes layout and close functionality - wp_enqueue_script('postbox'); - // add WordPress color picker layout - wp_enqueue_style('wp-color-picker'); - // add WordPress color picker function - wp_enqueue_script('wp-color-picker'); - - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style('mci-footnotes-admin'); - } - - /** - * Displays the content of specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayContent() { - // register and enqueue scripts and styling - $this->appendScripts(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - // store settings - $l_bool_SettingsUpdated = false; - if (array_key_exists("save-settings", $_POST)) { - if ($_POST["save-settings"] == "save") { - unset($_POST["save-settings"]); - unset($_POST["submit"]); - $l_bool_SettingsUpdated = $this->saveSettings(); - } - } - - // display all sections and highlight the active section - echo '
                                                                                    '; - echo '
                                                                                    '; - - if ($l_bool_SettingsUpdated) { - echo sprintf('
                                                                                    %s
                                                                                    ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - } - - // form to submit the active section - echo '
                                                                                    '; - //settings_fields($l_arr_ActiveSection["container"]); - echo ''; - // outputs the settings field of the active section - do_settings_sections($l_arr_ActiveSection["id"]); - do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); - - // add submit button to active section if defined - if ($l_arr_ActiveSection["submit"]) { - submit_button(); - } - // close the form to submit data - echo '
                                                                                    '; - // close container for the settings page - echo '
                                                                                    '; - // output special javascript for the expand/collapse function of the meta boxes - echo ''; - } - - /** - * Save all Plugin settings. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return bool - */ - private function saveSettings() { - $l_arr_newSettings = array(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - - // iterate through each value that has to be in the specific container - foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { - // setting is available in the POST array, use it - if (array_key_exists($l_str_Key, $_POST)) { - $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; - } else { - // setting is not defined in the POST array, define it to avoid the Default value - $l_arr_newSettings[$l_str_Key] = ""; - } - } - // update settings - return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); - } - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Description() { - // default no description will be displayed - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingKeyName Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function LoadSetting($p_str_SettingKeyName) { - // get current section - reset($this->a_arr_Sections); - $p_arr_Return = array(); - $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); - return $p_arr_Return; - } - - /** - * Returns a line break to start a new line. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addNewline() { - return '
                                                                                    '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addLineSpace() { - return '

                                                                                    '; - } - - /** - * Returns a simple text inside html text. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function addText($p_str_Text) { - return sprintf('%s', $p_str_Text); - } - - /** - * Returns the html tag for an input/select label. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_Caption Label caption. - * @return string - * - * Edited 2020-12-01T0159+0100.. - * @since 2.1.6 no colon - */ - protected function addLabel($p_str_SettingName, $p_str_Caption) { - if (empty($p_str_Caption)) { - return ""; - } - // remove the colon causing localization issues with French, - // and with languages not using punctuation at all, - // and with languages using other punctuation marks instead of colon, - // e.g. Greek using a raised dot. - // In French, colon is preceded by a space, forcibly non-breaking, - // and narrow per new school. - // Add colon to label strings for inclusion in localization. - // Colon after label is widely preferred best practice, mandatory per style guides. - // - return sprintf('', $p_str_SettingName, $p_str_Caption); - // ^ here deleted colon 2020-12-08T1546+0100 - } - - /** - * Returns the html tag for an input [type = text]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. - * @param bool $p_bool_Readonly Set the input to be read only, default false. - * @param bool $p_bool_Hidden Set the input to be hidden, default false. - * @return string - */ - protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { - $l_str_Style = ""; - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - if ($p_bool_Hidden) { - $l_str_Style .= 'display:none;'; - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, - $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addCheckbox($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], - MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); - } - - /** - * Returns the html tag for a select box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre select the current value. - * @param array $p_arr_Options Possible options to be selected. - * @return string - */ - protected function addSelectBox($p_str_SettingName, $p_arr_Options) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - $l_str_Options = ""; - - /* loop through all array keys */ - foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { - $l_str_Options .= sprintf('', - $l_str_Value, - $l_arr_Data["value"] == $l_str_Value ? "selected" : "", - $l_str_Caption); - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); - } - - /** - * Returns the html tag for a text area. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. - * @return string - */ - protected function addTextArea($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addColorSelection($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_in_Min Minimum value. - * @param int $p_int_Max Maximum value. - * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - - if ($p_bool_Deci) { - $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); - } else { - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); - } - } - -} // end of class + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); + } + + /** + * Returns an array describing a meta box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SectionID Parent Section ID. + * @param string $p_str_ID Unique ID suffix. + * @param string $p_str_Title Title for the meta box. + * @param string $p_str_CallbackFunctionName Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { + return array( + "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, + "id" => $p_str_ID, + "title" => $p_str_Title, + "callback" => $p_str_CallbackFunctionName + ); + } + + /** + * Registers a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSubPage() { + global $submenu; + // any sub menu for our main menu exists + if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { + // iterate through all sub menu entries of the ManFisher main menu + foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { + if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { + // remove that sub menu and add it again to move it to the bottom + remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); + } + } + } + + $this->a_str_SubPageHook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug + $this->getSubPageTitle(), // page title + $this->getSubPageTitle(), // menu title + 'manage_options', // capability + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug + array($this, 'displayContent') // function + ); + } + + /** + * Registers all sections for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSections() { + // iterate through each section + foreach($this->getSections() as $l_arr_Section) { + // append tab to the tab-array + $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; + add_settings_section( + $l_arr_Section["id"], // unique id + "", //$l_arr_Section["title"], // title + array($this, 'Description'), // callback function for the description + $l_arr_Section["id"] // parent sub page slug + ); + $this->registerMetaBoxes($l_arr_Section["id"]); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_ParentID Parent section unique id. + */ + private function registerMetaBoxes($p_str_ParentID) { + // iterate through each meta box + foreach($this->getMetaBoxes() as $l_arr_MetaBox) { + if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { + continue; + } + add_meta_box( + $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id + $l_arr_MetaBox["title"], // meta box title + array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content + $p_str_ParentID, // post type = parent section id + 'main' // context + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function appendScripts() { + // enable meta boxes layout and close functionality + wp_enqueue_script('postbox'); + // add WordPress color picker layout + wp_enqueue_style('wp-color-picker'); + // add WordPress color picker function + wp_enqueue_script('wp-color-picker'); + + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style('mci-footnotes-admin'); + } + + /** + * Displays the content of specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayContent() { + // register and enqueue scripts and styling + $this->appendScripts(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + // store settings + $l_bool_SettingsUpdated = false; + if (array_key_exists("save-settings", $_POST)) { + if ($_POST["save-settings"] == "save") { + unset($_POST["save-settings"]); + unset($_POST["submit"]); + $l_bool_SettingsUpdated = $this->saveSettings(); + } + } + + // display all sections and highlight the active section + echo '
                                                                                    '; + echo '
                                                                                    '; + + if ($l_bool_SettingsUpdated) { + echo sprintf('
                                                                                    %s
                                                                                    ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + } + + // form to submit the active section + echo '
                                                                                    '; + //settings_fields($l_arr_ActiveSection["container"]); + echo ''; + // outputs the settings field of the active section + do_settings_sections($l_arr_ActiveSection["id"]); + do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); + + // add submit button to active section if defined + if ($l_arr_ActiveSection["submit"]) { + submit_button(); + } + // close the form to submit data + echo '
                                                                                    '; + // close container for the settings page + echo '
                                                                                    '; + // output special javascript for the expand/collapse function of the meta boxes + echo ''; + } + + /** + * Save all Plugin settings. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return bool + */ + private function saveSettings() { + $l_arr_newSettings = array(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + + // iterate through each value that has to be in the specific container + foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { + // setting is available in the POST array, use it + if (array_key_exists($l_str_Key, $_POST)) { + $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; + } else { + // setting is not defined in the POST array, define it to avoid the Default value + $l_arr_newSettings[$l_str_Key] = ""; + } + } + // update settings + return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); + } + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Description() { + // default no description will be displayed + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingKeyName Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function LoadSetting($p_str_SettingKeyName) { + // get current section + reset($this->a_arr_Sections); + $p_arr_Return = array(); + $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); + return $p_arr_Return; + } + + /** + * Returns a line break to start a new line. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addNewline() { + return '
                                                                                    '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addLineSpace() { + return '

                                                                                    '; + } + + /** + * Returns a simple text inside html text. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function addText($p_str_Text) { + return sprintf('%s', $p_str_Text); + } + + /** + * Returns the html tag for an input/select label. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_Caption Label caption. + * @return string + * + * Edited 2020-12-01T0159+0100.. + * @since 2.1.6 no colon + */ + protected function addLabel($p_str_SettingName, $p_str_Caption) { + if (empty($p_str_Caption)) { + return ""; + } + // remove the colon causing localization issues with French, + // and with languages not using punctuation at all, + // and with languages using other punctuation marks instead of colon, + // e.g. Greek using a raised dot. + // In French, colon is preceded by a space, forcibly non-breaking, + // and narrow per new school. + // Add colon to label strings for inclusion in localization. + // Colon after label is widely preferred best practice, mandatory per style guides. + // + return sprintf('', $p_str_SettingName, $p_str_Caption); + // ^ here deleted colon 2020-12-08T1546+0100 + } + + /** + * Returns the html tag for an input [type = text]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. + * @param bool $p_bool_Readonly Set the input to be read only, default false. + * @param bool $p_bool_Hidden Set the input to be hidden, default false. + * @return string + */ + protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { + $l_str_Style = ""; + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + if ($p_bool_Hidden) { + $l_str_Style .= 'display:none;'; + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, + $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addCheckbox($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], + MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); + } + + /** + * Returns the html tag for a select box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre select the current value. + * @param array $p_arr_Options Possible options to be selected. + * @return string + */ + protected function addSelectBox($p_str_SettingName, $p_arr_Options) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + $l_str_Options = ""; + + /* loop through all array keys */ + foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { + $l_str_Options .= sprintf('', + $l_str_Value, + $l_arr_Data["value"] == $l_str_Value ? "selected" : "", + $l_str_Caption); + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); + } + + /** + * Returns the html tag for a text area. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. + * @return string + */ + protected function addTextArea($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addColorSelection($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_in_Min Minimum value. + * @param int $p_int_Max Maximum value. + * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + + if ($p_bool_Deci) { + $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); + } else { + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); + } + } + +} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php index 5a1fd49..33f327a 100644 --- a/class/dashboard/subpage-diagnostics.php +++ b/class/dashboard/subpage-diagnostics.php @@ -1,140 +1,140 @@ -addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - */ - protected function getMetaBoxes() { - return array( - $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_PhpExtensions = ""; - // iterate through each PHP extension - foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { - if ($l_int_Index > 0) { - $l_str_PhpExtensions .= ' | '; - } - $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); - } - - /** @var WP_Theme $l_obj_CurrentTheme */ - $l_obj_CurrentTheme = wp_get_theme(); - - $l_str_WordPressPlugins = ""; - // iterate through each installed WordPress Plugin - foreach (get_plugins() as $l_arr_Plugin) { - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Name"] . ''; - $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . ''; - $l_str_WordPressPlugins .= ''; - } - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "server" => $_SERVER["SERVER_NAME"], - - "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php" => phpversion(), - - "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "user-agent" => $_SERVER["HTTP_USER_AGENT"], - - "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "memory-limit" => ini_get('memory_limit'), - - "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php-extensions" => $l_str_PhpExtensions, - - "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "wordpress" => $wp_version, - - "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", - - "plugins" => $l_str_WordPressPlugins - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } +addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + */ + protected function getMetaBoxes() { + return array( + $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_PhpExtensions = ""; + // iterate through each PHP extension + foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { + if ($l_int_Index > 0) { + $l_str_PhpExtensions .= ' | '; + } + $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); + } + + /** @var WP_Theme $l_obj_CurrentTheme */ + $l_obj_CurrentTheme = wp_get_theme(); + + $l_str_WordPressPlugins = ""; + // iterate through each installed WordPress Plugin + foreach (get_plugins() as $l_arr_Plugin) { + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Name"] . ''; + $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . ''; + $l_str_WordPressPlugins .= ''; + } + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "server" => $_SERVER["SERVER_NAME"], + + "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php" => phpversion(), + + "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "user-agent" => $_SERVER["HTTP_USER_AGENT"], + + "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "memory-limit" => ini_get('memory_limit'), + + "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php-extensions" => $l_str_PhpExtensions, + + "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "wordpress" => $wp_version, + + "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", + + "plugins" => $l_str_WordPressPlugins + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } } \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index f4098ad..940a22b 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -1,1182 +1,1182 @@ -addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); - - // sync tab name with mirror in public function CustomCSSMigration(): - $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); - - $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); - $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); - $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); - - return $l_arr_Tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * HyperlinkArrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function getMetaBoxes() { - $l_arr_MetaBoxes = array(); - - // sync box name with mirror in task.php: - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); - } - - $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); - } - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); - - return $l_arr_MetaBoxes; - } - - /** - * Displays all settings for the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function ReferenceContainer() { - - // options for the label element: - $l_arr_LabelElement = array( - "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the positioning of the reference container - $l_arr_Positions = array( - "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), - "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // basic responsive page layout options: - $l_arr_PageLayoutOptions = array( - "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the separating punctuation between backlinks: - $l_arr_Separators = array( - // Unicode character names are conventionally uppercase. - "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because - // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_Terminators = array( - "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): - "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the first column width (per cent is a ratio, not a unit): - $l_arr_WidthUnits = array( - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for reference container script mode: - $l_arr_ScriptMode = array( - "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), - - "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), - - "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), - - "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), - - "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), - "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), - "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), - - "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), - "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-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), - - "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), - "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), - "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), - "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), - "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), - - "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), - "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), - "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), - "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), - "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), - "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), - "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), - "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), - "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), - "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), - "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), - "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), - "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), - "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all options for the footnotes start and end tag short codes - * Displays all options for the footnotes numbering - * Displays all options for the scrolling behavior - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function StartEnd() { - // footnotes start tag short code options: - $l_arr_ShortCodeStart = array( - "((" => "((", - "(((" => "(((", - "{{" => "{{", - "{{{" => "{{{", - "[n]" => "[n]", - "[fn]" => "[fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[ref]" => "[ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // footnotes end tag short code options: - $l_arr_ShortCodeEnd = array( - "))" => "))", - ")))" => ")))", - "}}" => "}}", - "}}}" => "}}}", - "[/n]" => "[/n]", - "[/fn]" => "[/fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[/ref]" => "[/ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the syntax validation: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), - "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), - - "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), - "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), - - // for script showing/hiding user defined text boxes: - "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // option to enable syntax validation, label mirrored in task.php: - "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), - "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Numbering() { - // define some space for the output - $l_str_Space = "     "; - // options for the combination of identical footnotes - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the numbering style of the footnotes: - $l_arr_CounterStyle = array( - "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", - "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", - "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", - "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", - "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", - "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), - - // algorithmically combine identicals: - "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), - "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Support for Ibid. notation added thanks to @meglio in . - "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Scrolling() { - - // options for enabling hard links for AMP compat: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), - "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), - "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable hard links for AMP compat: - "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), - "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), - "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), - "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), - "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable backlink tooltips: - "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), - "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), - "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function Love() { - // options for the acknowledgment display in the footer: - $l_arr_Love = array( - // logo only: - "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // logo followed by heart symbol: - "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // logo preceded by heart symbol: - "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. - "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // "This website uses Footnotes." - "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the Footnotes plugin." - "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the awesome Footnotes plugin." - "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // "No display of any “Footnotes love” mention in the footer" - "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), - - "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the excerpt setting - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function Excerpts() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), - "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. - "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnote referrers - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function Superscript() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for superscript normalize scope: - $l_arr_NormalizeSuperscript = array( - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), - - "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - - "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), - "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnotes mouse-over box. - * - * @author Stefan Herndler - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function MouseOverBox() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), - "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), - "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the name of the plugin as logogram “footnotes”. - "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxPosition() { - - // options for the Mouse-over box position - $l_arr_Position = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the alternative Mouse-over box position - $l_arr_AlternativePosition = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), - "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), - "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxDimensions() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), - "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), - "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTiming() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), - "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), - "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), - "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), - "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTruncation() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), - - "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), - // The feature trims back until the last full word. - "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxText() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), - "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), - "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), - "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxAppearance() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the font size unit: - $l_arr_FontSizeUnits = array( - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), - "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), - "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), - "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), - // To use default: Clear or leave empty. - "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), - // To use default: Clear or leave empty. - "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), - "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), - // To use default: Clear or leave empty. - "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), - "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), - // To use default: Clear or leave empty. - "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the prepended symbol - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function HyperlinkArrow() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), - "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), - "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the custom css box. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function CustomCSS() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text", - // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-2" => ".footnote_tooltip", - // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-3" => ".footnote_plugin_index", - // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-4" => ".footnote_plugin_text", - // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSMigration() { - - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), - "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), - "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the “Referrers and tooltips” settings tab name. - "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSNew() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); - // replace all placeholders - $l_obj_Template->replace( - array( - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), - - "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @author Stefan Herndler - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function LookupHooks() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); - - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), - "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), - "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), - "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", - - "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), - "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), - "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", - - "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), - "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), - "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", - - "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), - "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), - "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", - - "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), - "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), - "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays a short introduction of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Help() { - global $g_obj_MCI_Footnotes; - // load footnotes starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - - if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { - // load user defined starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". - " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". - " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". - " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". - " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - . $l_arr_Footnote_EndingTag["value"] . " World!"; - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "start" => $l_arr_Footnote_StartingTag["value"], - - "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "end" => $l_arr_Footnote_EndingTag["value"], - - "example-code" => $l_str_Example, - "example-string" => "
                                                                                    " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), - - "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') - ) - ); - // call wp_head function to get the Styling of the mouse-over box - $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all Donate button to support the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Donate() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); - // replace all placeholders - $l_obj_Template->replace( - array( - "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} +addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); + + // sync tab name with mirror in public function CustomCSSMigration(): + $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); + + $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); + $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); + $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); + + return $l_arr_Tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * HyperlinkArrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function getMetaBoxes() { + $l_arr_MetaBoxes = array(); + + // sync box name with mirror in task.php: + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); + } + + $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); + } + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); + + return $l_arr_MetaBoxes; + } + + /** + * Displays all settings for the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function ReferenceContainer() { + + // options for the label element: + $l_arr_LabelElement = array( + "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the positioning of the reference container + $l_arr_Positions = array( + "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), + "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // basic responsive page layout options: + $l_arr_PageLayoutOptions = array( + "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the separating punctuation between backlinks: + $l_arr_Separators = array( + // Unicode character names are conventionally uppercase. + "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the terminating punctuation after backlinks: + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because + // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_Terminators = array( + "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): + "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the first column width (per cent is a ratio, not a unit): + $l_arr_WidthUnits = array( + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for reference container script mode: + $l_arr_ScriptMode = array( + "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), + + "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), + + "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + + "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), + + "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), + "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), + "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), + + "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), + "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-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), + + "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), + "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), + "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), + "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), + "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), + "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), + + "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), + "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), + "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), + "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), + "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), + "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), + "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), + "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), + "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), + "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), + "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), + "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), + "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), + "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all options for the footnotes start and end tag short codes + * Displays all options for the footnotes numbering + * Displays all options for the scrolling behavior + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function StartEnd() { + // footnotes start tag short code options: + $l_arr_ShortCodeStart = array( + "((" => "((", + "(((" => "(((", + "{{" => "{{", + "{{{" => "{{{", + "[n]" => "[n]", + "[fn]" => "[fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[ref]" => "[ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // footnotes end tag short code options: + $l_arr_ShortCodeEnd = array( + "))" => "))", + ")))" => ")))", + "}}" => "}}", + "}}}" => "}}}", + "[/n]" => "[/n]", + "[/fn]" => "[/fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[/ref]" => "[/ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the syntax validation: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), + "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), + + "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), + "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), + + // for script showing/hiding user defined text boxes: + "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // option to enable syntax validation, label mirrored in task.php: + "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), + "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Numbering() { + // define some space for the output + $l_str_Space = "     "; + // options for the combination of identical footnotes + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the numbering style of the footnotes: + $l_arr_CounterStyle = array( + "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", + "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", + "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", + "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", + "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", + "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), + + // algorithmically combine identicals: + "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), + "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Support for Ibid. notation added thanks to @meglio in . + "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Scrolling() { + + // options for enabling hard links for AMP compat: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), + "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), + "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable hard links for AMP compat: + "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), + "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), + "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), + "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), + "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable backlink tooltips: + "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), + "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), + "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function Love() { + // options for the acknowledgment display in the footer: + $l_arr_Love = array( + // logo only: + "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // logo followed by heart symbol: + "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // logo preceded by heart symbol: + "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. + "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // "This website uses Footnotes." + "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the Footnotes plugin." + "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the awesome Footnotes plugin." + "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // "No display of any “Footnotes love” mention in the footer" + "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), + + "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the excerpt setting + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function Excerpts() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), + "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. + "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnote referrers + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function Superscript() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for superscript normalize scope: + $l_arr_NormalizeSuperscript = array( + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), + + "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + + "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), + "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnotes mouse-over box. + * + * @author Stefan Herndler + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function MouseOverBox() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), + "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), + "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the name of the plugin as logogram “footnotes”. + "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxPosition() { + + // options for the Mouse-over box position + $l_arr_Position = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the alternative Mouse-over box position + $l_arr_AlternativePosition = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), + "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), + "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxDimensions() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), + "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), + "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTiming() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), + "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), + "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), + "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), + "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTruncation() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), + + "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), + // The feature trims back until the last full word. + "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxText() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), + "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), + "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), + "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxAppearance() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the font size unit: + $l_arr_FontSizeUnits = array( + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), + "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), + "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), + "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), + // To use default: Clear or leave empty. + "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), + // To use default: Clear or leave empty. + "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), + "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), + // To use default: Clear or leave empty. + "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), + "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), + // To use default: Clear or leave empty. + "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the prepended symbol + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function HyperlinkArrow() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), + "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), + "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the custom css box. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function CustomCSS() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text", + // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-2" => ".footnote_tooltip", + // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-3" => ".footnote_plugin_index", + // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-4" => ".footnote_plugin_text", + // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSMigration() { + + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), + "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), + "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the “Referrers and tooltips” settings tab name. + "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSNew() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); + // replace all placeholders + $l_obj_Template->replace( + array( + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), + + "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @author Stefan Herndler + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function LookupHooks() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); + + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), + "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), + "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), + "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), + "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", + + "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), + "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), + "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", + + "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), + "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), + "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", + + "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), + "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), + "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", + + "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), + "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), + "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays a short introduction of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Help() { + global $g_obj_MCI_Footnotes; + // load footnotes starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + + if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { + // load user defined starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". + " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". + " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". + " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". + " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + . $l_arr_Footnote_EndingTag["value"] . " World!"; + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "start" => $l_arr_Footnote_StartingTag["value"], + + "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "end" => $l_arr_Footnote_EndingTag["value"], + + "example-code" => $l_str_Example, + "example-string" => "
                                                                                    " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), + + "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') + ) + ); + // call wp_head function to get the Styling of the mouse-over box + $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all Donate button to support the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Donate() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); + // replace all placeholders + $l_obj_Template->replace( + array( + "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} diff --git a/class/hooks.php b/class/hooks.php index ceb7147..e86d106 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,94 +1,94 @@ -ClearAll(); - } - - /** - * Add Links to the Plugin in the "installed Plugins" page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Links Current Links. - * @param string $p_str_PluginFileName Plugins init file name. - * @return array - */ - public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { - // append link to the WordPress Plugin page - $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the Settings page - $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the PlayPal Donate function - $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // return new links - return $p_arr_Links; - } -} +ClearAll(); + } + + /** + * Add Links to the Plugin in the "installed Plugins" page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Links Current Links. + * @param string $p_str_PluginFileName Plugins init file name. + * @return array + */ + public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { + // append link to the WordPress Plugin page + $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the Settings page + $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the PlayPal Donate function + $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // return new links + return $p_arr_Links; + } +} diff --git a/class/init.php b/class/init.php index 2eb6ff4..e1001a3 100644 --- a/class/init.php +++ b/class/init.php @@ -1,373 +1,373 @@ -initializeDashboard(); - // initialize the Plugin Task - $this->initializeTask(); - - // Register all Public Stylesheets and Scripts - add_action('init', array($this, 'registerPublic')); - // Enqueue all Public Stylesheets and Scripts - add_action('wp_enqueue_scripts', array($this, 'registerPublic')); - // Register all Widgets of the Plugin. - add_action('widgets_init', array($this, 'initializeWidgets')); - } - - /** - * Initializes all Widgets of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution - * - * @since 1.6.5 - * - * @contributor @felipelavinz - * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 - * - * @reporter @psykonevro - * @link https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ - * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/ - * - * @reporter @daliasued - * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853 - * - * create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0. - * @link https://www.php.net/manual/en/function.create-function.php - * - * The fix is to move add_action() above into run(), - * and use the bare register_widget() here. - * @see self::run() - * - * Also, the visibility of initializeWidgets() is not private any longer. - */ - public function initializeWidgets() { - register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); - } - - /** - * Initializes the Dashboard of the Plugin and loads them. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function initializeDashboard() { - new MCI_Footnotes_Layout_Init(); - } - - /** - * Initializes the Plugin Task and registers the Task hooks. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function initializeTask() { - $this->a_obj_Task = new MCI_Footnotes_Task(); - $this->a_obj_Task->registerHooks(); - } - - /** - * Registers and enqueues scripts and stylesheets to the public pages. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 - */ - public function registerPublic() { - - /** - * Enqueues external scripts. - * - * - Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * The condition about tooltips was missing, only the not-alternative-tooltips part was present. - */ - // set conditions re-used for stylesheet enqueuing: - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - /** - * Enqueues the jQuery library registered by WordPress. - * - * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - * - * @since 2.5.6 - * - * @reporter @hopper87it - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * - * jQuery is also used for animated scrolling, so it was loaded by default. - * The function wp_enqueue_script() avoids loading the same library multiple times. - * After adding the alternative reference container, jQuery has become optional, - * but still enabled by default. - */ - if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { - - wp_enqueue_script( 'jquery' ); - - } - - if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { - - /** - * Enqueues the jQuery Tools library shipped with the plugin. - * - * redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js - * 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.7.redacted.2' - ); - - /** - * Registers jQuery UI from the JavaScript Content Delivery Network. - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * Used to add jQuery UI following @vonpiernik: - * : - * - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. - * - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * This was enabled in Footnotes v2.0.0 through v2.0.3. - * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 - */ - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 - //wp_enqueue_script( 'jQueryUI' ); - /** - * This is then needed instead of the above first instance: - * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 - */ - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - - /** - * Enqueues some jQuery UI libraries registered by WordPress. - * - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * If alternative tooltips are enabled, these libraries are not needed. - */ - wp_enqueue_script( 'jquery-ui-core' ); - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-position' ); - wp_enqueue_script( 'jquery-ui-tooltip' ); - - } - - /** - * Enables enqueuing a new-scheme stylesheet. - * - * @since 2.5.5 - * @date 2021-02-14T1512+0100 - * - * Enables enqueuing the formatted individual stylesheets if false. - * WARNING: This facility is designed for development and must NOT be used in production. - * - * The Boolean may be set at the bottom of the plugin’s main PHP file. - * @see footnotes.php - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - /** - * Enqueues a minified united external stylesheet in production. - * - * - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1543+0100 - * - * @contributor @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * The dashboard stylesheet is minified as-is. - * @see class/dashboard/layout.php - * - * @since 2.0.3 add versioning of public.css for cache busting. - * @date 2020-10-29T1413+0100 - * Plugin version number is needed for busting browser caches after each plugin update. - * @since 2.1.4 automate passing version number for cache busting. - * @date 2020-11-30T0646+0100 - * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. - * - * The media scope argument 'all' is the default. - * No need to use '-css' in the handle, as this is appended automatically. - */ - // set tooltip mode for use in stylesheet name: - if ( self::$a_bool_TooltipsEnabled ) { - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - $l_str_TooltipMode = 'al'; - $l_str_TComplement = 'ternative-tooltips'; - } else { - $l_str_TooltipMode = 'jq'; - $l_str_TComplement = 'uery-tooltips'; - } - } else { - $l_str_TooltipMode = 'no'; - $l_str_TComplement = '-tooltips'; - } - - // set basic responsive page layout mode for use in stylesheet name: - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - switch ( $l_str_PageLayoutOption ) { - case "reference-container": $l_str_LayoutMode = '1'; break; - case "entry-content" : $l_str_LayoutMode = '2'; break; - case "main-content" : $l_str_LayoutMode = '3'; break; - case "none": default: $l_str_LayoutMode = '0'; break; - } - - // enqueue the tailored united minified stylesheet: - wp_enqueue_style( - 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, - plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' - ), - array(), - C_STR_FOOTNOTES_VERSION, - 'all' - ); - - } else { - - /** - * Enqueues external stylesheets, ONLY in development now. - * - * @since 2.1.4 optionally enqueue an extra stylesheet. - * @date 2020-12-04T2231+0100 - * - * This optional layout fix is useful by lack of layout support. - */ - wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_PageLayoutOption != 'none') { - wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_PageLayoutOption, - plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' - ), - array(), - C_STR_FOOTNOTES_VERSION, - 'all' - ); - } - } - } -} +initializeDashboard(); + // initialize the Plugin Task + $this->initializeTask(); + + // Register all Public Stylesheets and Scripts + add_action('init', array($this, 'registerPublic')); + // Enqueue all Public Stylesheets and Scripts + add_action('wp_enqueue_scripts', array($this, 'registerPublic')); + // Register all Widgets of the Plugin. + add_action('widgets_init', array($this, 'initializeWidgets')); + } + + /** + * Initializes all Widgets of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * + * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution + * + * @since 1.6.5 + * + * @contributor @felipelavinz + * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + * + * @reporter @psykonevro + * @link https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/ + * + * @reporter @daliasued + * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853 + * + * create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0. + * @link https://www.php.net/manual/en/function.create-function.php + * + * The fix is to move add_action() above into run(), + * and use the bare register_widget() here. + * @see self::run() + * + * Also, the visibility of initializeWidgets() is not private any longer. + */ + public function initializeWidgets() { + register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); + } + + /** + * Initializes the Dashboard of the Plugin and loads them. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function initializeDashboard() { + new MCI_Footnotes_Layout_Init(); + } + + /** + * Initializes the Plugin Task and registers the Task hooks. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function initializeTask() { + $this->a_obj_Task = new MCI_Footnotes_Task(); + $this->a_obj_Task->registerHooks(); + } + + /** + * Registers and enqueues scripts and stylesheets to the public pages. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 + * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 + */ + public function registerPublic() { + + /** + * Enqueues external scripts. + * + * - Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The condition about tooltips was missing, only the not-alternative-tooltips part was present. + */ + // set conditions re-used for stylesheet enqueuing: + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + + /** + * Enqueues the jQuery library registered by WordPress. + * + * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. + * + * @since 2.5.6 + * + * @reporter @hopper87it + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ + * + * jQuery is also used for animated scrolling, so it was loaded by default. + * The function wp_enqueue_script() avoids loading the same library multiple times. + * After adding the alternative reference container, jQuery has become optional, + * but still enabled by default. + */ + if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { + + wp_enqueue_script( 'jquery' ); + + } + + if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { + + /** + * Enqueues the jQuery Tools library shipped with the plugin. + * + * redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js + * 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.7.redacted.2' + ); + + /** + * Registers jQuery UI from the JavaScript Content Delivery Network. + * + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: + * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + * Used to add jQuery UI following @vonpiernik: + * : + * + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. + * + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: + * + * See + * + * This was enabled in Footnotes v2.0.0 through v2.0.3. + * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + */ + //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 + //wp_enqueue_script( 'jQueryUI' ); + /** + * This is then needed instead of the above first instance: + * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + */ + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + + /** + * Enqueues some jQuery UI libraries registered by WordPress. + * + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * If alternative tooltips are enabled, these libraries are not needed. + */ + wp_enqueue_script( 'jquery-ui-core' ); + wp_enqueue_script( 'jquery-ui-widget' ); + wp_enqueue_script( 'jquery-ui-position' ); + wp_enqueue_script( 'jquery-ui-tooltip' ); + + } + + /** + * Enables enqueuing a new-scheme stylesheet. + * + * @since 2.5.5 + * @date 2021-02-14T1512+0100 + * + * Enables enqueuing the formatted individual stylesheets if false. + * WARNING: This facility is designed for development and must NOT be used in production. + * + * The Boolean may be set at the bottom of the plugin’s main PHP file. + * @see footnotes.php + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + /** + * Enqueues a minified united external stylesheet in production. + * + * - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1543+0100 + * + * @contributor @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The dashboard stylesheet is minified as-is. + * @see class/dashboard/layout.php + * + * @since 2.0.3 add versioning of public.css for cache busting. + * @date 2020-10-29T1413+0100 + * Plugin version number is needed for busting browser caches after each plugin update. + * @since 2.1.4 automate passing version number for cache busting. + * @date 2020-11-30T0646+0100 + * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. + * + * The media scope argument 'all' is the default. + * No need to use '-css' in the handle, as this is appended automatically. + */ + // set tooltip mode for use in stylesheet name: + if ( self::$a_bool_TooltipsEnabled ) { + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + $l_str_TooltipMode = 'al'; + $l_str_TComplement = 'ternative-tooltips'; + } else { + $l_str_TooltipMode = 'jq'; + $l_str_TComplement = 'uery-tooltips'; + } + } else { + $l_str_TooltipMode = 'no'; + $l_str_TComplement = '-tooltips'; + } + + // set basic responsive page layout mode for use in stylesheet name: + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + switch ( $l_str_PageLayoutOption ) { + case "reference-container": $l_str_LayoutMode = '1'; break; + case "entry-content" : $l_str_LayoutMode = '2'; break; + case "main-content" : $l_str_LayoutMode = '3'; break; + case "none": default: $l_str_LayoutMode = '0'; break; + } + + // enqueue the tailored united minified stylesheet: + wp_enqueue_style( + 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, + plugins_url( + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' + ), + array(), + C_STR_FOOTNOTES_VERSION, + 'all' + ); + + } else { + + /** + * Enqueues external stylesheets, ONLY in development now. + * + * @since 2.1.4 optionally enqueue an extra stylesheet. + * @date 2020-12-04T2231+0100 + * + * This optional layout fix is useful by lack of layout support. + */ + wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + if ($l_str_PageLayoutOption != 'none') { + wp_enqueue_style( + 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + plugins_url( + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + ), + array(), + C_STR_FOOTNOTES_VERSION, + 'all' + ); + } + } + } +} diff --git a/class/language.php b/class/language.php index 6172cdf..fccf143 100644 --- a/class/language.php +++ b/class/language.php @@ -1,108 +1,108 @@ - array( - - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', - - self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - - self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - - // 2.5.4 fast-tracked: - self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - - - self::C_STR_REFERENCE_CONTAINER_NAME => 'References', - self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', - self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - - // whether to enqueue additional stylesheet: - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - - // top and bottom margins: - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - - // table cell borders: - self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - - // backlink symbol: - self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - - // backlink separators and terminators are often not preferred. - // but a choice must be provided along with the ability to customize: - self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', - self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', - - // set backlinks column width: - self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - - // set backlinks column max. width: - self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', - - // whether a
                                                                                    tag is inserted: - self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - - // whether to enable URL line wrapping: - self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - - // whether to use link elements: - self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', - - // excerpt should be disabled: - self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', - - self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', - - self::C_STR_FOOTNOTES_LOVE => 'no', - - ), - - "footnotes_storage_custom" => array( - - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - - self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - - // 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: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - - // 2.5.4 fast-tracked: - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', - self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - - - // 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: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - - // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: - self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - - // tooltip display durations: - // called mouse over box not tooltip for consistency - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - - // tooltip font size reset to legacy by default since 2.1.4; - // was set to inherit since 2.1.1 as it overrode custom CSS, - // is moved to settings since 2.1.4 2020-12-04T1023+0100 - self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', - self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', - - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - - // Custom CSS migrates to a dedicated tab: - self::C_STR_CUSTOM_CSS => '', - - ), - - "footnotes_storage_expert" => array( - - // These are checkboxes; keyword 'checked' is converted to Boolean true, - // empty string to false (default): - - // Titles should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. - // See - // Yet in titles, footnotes are still buggy, because WordPress - // uses the title string in menus and in the title element. - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', - - self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', - - // And the_excerpt is disabled by default following @nikelaos in - // - // - self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', - - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', - - // 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. - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', - - // initially hard-coded default - // shows "9223372036854780000" instead of 9223372036854775807 in the numbox - // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: - // - // interpret -1 as PHP_INT_MAX instead - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - - // 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. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, - - ), - - "footnotes_storage_custom_css" => array( - - self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', - - ), - - ); - - /** - * Contains all Settings from each Settings container as soon as this class is initialized. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var array - */ - private $a_arr_Settings = array(); - - /** - * Class Constructor. Loads all Settings from each WordPress Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function __construct() { - $this->loadAll(); - } - - /** - * Returns a singleton of this class. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return MCI_Footnotes_Settings - */ - public static function instance() { - // no instance defined yet, load it - if (self::$a_obj_Instance === null) { - self::$a_obj_Instance = new self(); - } - // return a singleton of this class - return self::$a_obj_Instance; - } - - /** - * Returns the name of a specified Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. - * @return str Settings Container name. - */ - public function getContainer($p_int_Index) { - return $this->a_arr_Container[$p_int_Index]; - } - - /** - * Returns the default values of a specific Settings Container. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param int $p_int_Index Settings Container Aray Key Index. - * @return array - */ - public function getDefaults($p_int_Index) { - return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; - } - - /** - * Loads all Settings from each Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function loadAll() { - // clear current settings - $this->a_arr_Settings = array(); - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // load settings - $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); - } - } - - /** - * Loads all Settings from specified Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. - * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). - * - * @since ditched trimming whitespace from text box content in response to user request. - * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 - */ - private function Load($p_int_Index) { - // load all settings from container - $l_arr_Options = get_option($this->getContainer($p_int_Index)); - // load all default settings - $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; - - // no settings found, set them to their default value - if (empty($l_arr_Options)) { - return $l_arr_Default; - } - // 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; - } - } - // iterate through each setting in the container - foreach($l_arr_Options as $l_str_Key => $l_str_Value) { - // remove all whitespace at the beginning and end of a setting - // trimming whitespace is ditched: - //$l_str_Value = trim($l_str_Value); - // write the sanitized value back to the setting container - $l_arr_Options[$l_str_Key] = $l_str_Value; - } - // return settings loaded from Container - return $l_arr_Options; - } - - /** - * Updates a whole Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Index of the Settings container. - * @param array $p_arr_newValues new Settings. - * @return bool - */ - public function saveOptions($p_int_Index, $p_arr_newValues) { - if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { - $this->loadAll(); - return true; - } - return false; - } - - /** - * Returns the value of specified Settings name. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Key Settings Array Key name. - * @return mixed Value of the Setting on Success or Null in Settings name is invalid. - */ - 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; - } - - /** - * Deletes each Settings Container and loads the default values for each Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edit: This didn’t actually work. - * @since 2.2.0 this function is not called any longer when deleting the plugin, - * 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 - */ - public function ClearAll() { - // iterate through each Settings Container - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // delete the settings container - delete_option($this->getContainer($i)); - } - // set settings back to the default values - $this->a_arr_Settings = $this->a_arr_Default; - } - - /** - * Register all Settings Container for the Plugin Settings Page in the Dashboard. - * Settings Container Label will be the same as the Settings Container Name. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function RegisterSettings() { - // register all settings - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - register_setting($this->getContainer($i), $this->getContainer($i)); - } - } -} + array( + + self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', + self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', + self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', + self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + + + self::C_STR_REFERENCE_CONTAINER_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + + // whether a
                                                                                    tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + + self::C_STR_FOOTNOTES_LOVE => 'no', + + ), + + "footnotes_storage_custom" => array( + + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + + + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', + + ), + + "footnotes_storage_expert" => array( + + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): + + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See + // Yet in titles, footnotes are still buggy, because WordPress + // uses the title string in menus and in the title element. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + + // And the_excerpt is disabled by default following @nikelaos in + // + // + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + + ), + + "footnotes_storage_custom_css" => array( + + self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', + + ), + + ); + + /** + * Contains all Settings from each Settings container as soon as this class is initialized. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var array + */ + private $a_arr_Settings = array(); + + /** + * Class Constructor. Loads all Settings from each WordPress Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function __construct() { + $this->loadAll(); + } + + /** + * Returns a singleton of this class. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return MCI_Footnotes_Settings + */ + public static function instance() { + // no instance defined yet, load it + if (self::$a_obj_Instance === null) { + self::$a_obj_Instance = new self(); + } + // return a singleton of this class + return self::$a_obj_Instance; + } + + /** + * Returns the name of a specified Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Settings Container Array Key Index. + * @return str Settings Container name. + */ + public function getContainer($p_int_Index) { + return $this->a_arr_Container[$p_int_Index]; + } + + /** + * Returns the default values of a specific Settings Container. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param int $p_int_Index Settings Container Aray Key Index. + * @return array + */ + public function getDefaults($p_int_Index) { + return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; + } + + /** + * Loads all Settings from each Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function loadAll() { + // clear current settings + $this->a_arr_Settings = array(); + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // load settings + $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); + } + } + + /** + * Loads all Settings from specified Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Settings Container Array Key Index. + * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). + * + * @since ditched trimming whitespace from text box content in response to user request. + * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 + */ + private function Load($p_int_Index) { + // load all settings from container + $l_arr_Options = get_option($this->getContainer($p_int_Index)); + // load all default settings + $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; + + // no settings found, set them to their default value + if (empty($l_arr_Options)) { + return $l_arr_Default; + } + // 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; + } + } + // iterate through each setting in the container + foreach($l_arr_Options as $l_str_Key => $l_str_Value) { + // remove all whitespace at the beginning and end of a setting + // trimming whitespace is ditched: + //$l_str_Value = trim($l_str_Value); + // write the sanitized value back to the setting container + $l_arr_Options[$l_str_Key] = $l_str_Value; + } + // return settings loaded from Container + return $l_arr_Options; + } + + /** + * Updates a whole Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Index of the Settings container. + * @param array $p_arr_newValues new Settings. + * @return bool + */ + public function saveOptions($p_int_Index, $p_arr_newValues) { + if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { + $this->loadAll(); + return true; + } + return false; + } + + /** + * Returns the value of specified Settings name. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Key Settings Array Key name. + * @return mixed Value of the Setting on Success or Null in Settings name is invalid. + */ + 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; + } + + /** + * Deletes each Settings Container and loads the default values for each Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edit: This didn’t actually work. + * @since 2.2.0 this function is not called any longer when deleting the plugin, + * 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 + */ + public function ClearAll() { + // iterate through each Settings Container + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // delete the settings container + delete_option($this->getContainer($i)); + } + // set settings back to the default values + $this->a_arr_Settings = $this->a_arr_Default; + } + + /** + * Register all Settings Container for the Plugin Settings Page in the Dashboard. + * Settings Container Label will be the same as the Settings Container Name. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function RegisterSettings() { + // register all settings + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + register_setting($this->getContainer($i), $this->getContainer($i)); + } + } +} diff --git a/class/task.php b/class/task.php index 4fae34f..249636c 100644 --- a/class/task.php +++ b/class/task.php @@ -1,2333 +1,2333 @@ -get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); - $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); - $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); - $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); - $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); - - // PHP_INT_MAX can be set by -1: - $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; - $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; - $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; - $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; - $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; - - - // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); - - // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); - } - - // configurable priority level for reference container relative positioning; default 98: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); - - /** - * Hook for category pages - * - * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. - * - * @since 2.5.0 - * @date 2021-01-05T1402+0100 - * - * @contributor @misfist - * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 - * - * @reporter @vitaefit - * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ - * - * Category pages can have rich HTML content in a term description with article status. - * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. - * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ - */ - add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); - - /** - * Hook for popup maker popups - * - * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. - * - * @since 2.5.1 - * @date 2021-01-18T2038+0100 - * - * @reporter @squatcher - * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ - */ - add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); - } - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); - } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); - } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); - } - - - /** - * The the_post hook - * - * - Adding: Hooks: support 'the_post' in response to user request for custom post types. - * - * @since 1.5.4 - * @accountable @aricura - * @link https://wordpress.org/support/topic/doesnt-work-in-custon-post-types/#post-5339110 - * - * - * - Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. - * - * @since 2.0.5 - * @accountable @pewgeuges - * - * - * - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. - * - * @since 2.0.7 - * @accountable @pewgeuges - * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799 - * @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/#post-13612697 - * - * @reporter @markcheret on behalf of W. Beinert - * @link https://wordpress.org/support/topic/footnotes-now-appear-in-summaries-even-though-this-is-marked-no/ - * - * @reporter @nyamachi - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/ - * - * @reporter @whichgodsaves - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13622694 - * - * @reporter @spiralofhope2 - * @link https://wordpress.org/support/topic/2-0-5-broken/ - * - * @reporter @mmallett - * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13623208 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13624091 - * - * @reporter @widecast - * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13626222 - * - * @reporter @ymorin007 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13627050 - * - * @reporter @markcheret on behalf of L. Smith - * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/ - * - * @reporter @tashi1es - * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/#post-13630495 - * - * - * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - * - * @since 2.1.0 - * @date 2020-11-08T1839+0100 - * @accountable @pewgeuges - */ - - // reset stored footnotes when displaying the header - self::$a_arr_Footnotes = array(); - self::$a_bool_AllowLoveMe = true; - } - - /** - * Outputs the custom css to the header of the public page. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. - * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. - * @since 2.1.3 raise settings priority to override theme stylesheets - * @since 2.1.4 Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. - * @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings. - * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. - * @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. - * @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. - * @since 2.5.4 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. - */ - public function wp_head() { - - // insert start tag without switching out of PHP: - echo "\r\n\r\n"; - - /** - * Alternative tooltip implementation relying on plain JS and CSS transitions. - * - * - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. - * - * @since 2.1.1 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 - * - * The script for alternative tooltips is printed formatted, not minified: - */ - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - ?> - -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { - echo $this->ReferenceContainer(); - } - // get setting for love and share this plugin - $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); - // check if the admin allows to add a link to the footer - if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { - return; - } - // set a hyperlink to the word "footnotes" in the Love slug - $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); - // get random love me text - if (strtolower($l_str_LoveMeIndex) == "random") { - $l_str_LoveMeIndex = "text-" . rand(1,7); - } - switch ($l_str_LoveMeIndex) { - // options named wrt backcompat, simplest is default: - case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; - case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; - } - echo sprintf('
                                                                                    %s
                                                                                    ', $l_str_LoveMeText); - } - - /** - * Replaces footnotes in the post/page title. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function the_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); - } - - /** - * Replaces footnotes in the content of the current page/post. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Page/Post content. - * @return string Content with replaced footnotes. - */ - public function the_content($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); - } - - /** - * Replaces footnotes in the excerpt of the current page/post. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Page/Post content. - * @return string Content with replaced footnotes. - */ - public function the_excerpt($p_str_Content) { - return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); - } - - /** - * Replaces footnotes in the widget title. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function widget_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); - } - - /** - * Replaces footnotes in the content of the current widget. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function widget_text($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); - } - - /** - * Replaces footnotes in each Content var of the current Post object. - * - * @author Stefan Herndler - * @since 1.5.4 - * @param array|WP_Post $p_mixed_Posts - */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); - return; - } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); - } - } - - /** - * Replace all Footnotes in a WP_Post object. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param WP_Post $p_obj_Post - * @return WP_Post - */ - private function replacePostObject($p_obj_Post) { - //MCI_Footnotes_Convert::debug($p_obj_Post); - $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); - $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); - $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); - return $p_obj_Post; - } - - /** - * Replaces all footnotes that occur in the given content. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. - * @return string - * - * - * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. - * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. - */ - public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { - - // replace all footnotes in the content, settings are converted to html characters - $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); - // replace all footnotes in the content, settings are NOT converted to html characters - $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); - - /** - * Reference container customized positioning through shortcode - * - * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. - * - * @since 2.2.0 - * @date 2020-12-13T2057+0100 - * - * @reporter @hamshe - * @link https://wordpress.org/support/topic/reference-container-in-elementor/ - * - * - * - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. - * - * @since 2.2.5 - * @date 2020-12-18T1434+0100 - * - * @reporter @hamshe - * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 - * - */ - // append the reference container or insert at shortcode: - $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); - if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { - $l_str_ReferenceContainerPositionShortcode = '[[references]]'; - } - - if ( $p_bool_OutputReferences ) { - - if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { - - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); - - } else { - - $p_str_Content .= $this->ReferenceContainer(); - - } - - // increment the container ID: - self::$a_int_ReferenceContainerId++; - } - - // delete position shortcode should any remain: - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); - - // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found - if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { - self::$a_bool_AllowLoveMe = false; - $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); - } - // return the content with replaced footnotes and optional reference container appended: - return $p_str_Content; - } - - /** - * Replaces all footnotes in the given content and appends them to the static property. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Content to be searched for footnotes. - * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. - * @return string - * - * @since 2.0.0 various. - * @since 2.4.0 Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. - */ - public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { - - // post ID to make everything unique wrt infinite scroll and archive view - self::$a_int_PostId = get_the_id(); - - // contains the index for the next footnote on this page - $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; - - // contains the starting position for the lookup of a footnote - $l_int_PosStart = 0; - - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - // decode html special chars - if ($p_bool_ConvertHtmlChars) { - $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); - $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); - } - - // if footnotes short code is empty, return the content without changes - if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { - return $p_str_Content; - } - - /** - * Footnote delimiter syntax validation - * - * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. - * - * @since 2.4.0 - * - * - * - Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. - * - Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. - * - Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. - * - * @since 2.5.0 - * @date 2021-01-07T0824+0100 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - * - * - * If footnotes short codes are unbalanced, and syntax validation is not disabled, - * prepend a warning to the content; displays de facto beneath the post title. - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { - - // make shortcodes conform to regex syntax: - $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); - $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); - - // apply different regex depending on whether start shortcode is double/triple opening parenthesis: - if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { - - // this prevents from catching a script containing e.g. a double opening parenthesis: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; - - } else { - - // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; - } - - // check syntax and get error locations: - preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); - if ( empty( $p_arr_ErrorLocation ) ) { - self::$a_bool_SyntaxErrorFlag = false; - } - - // prevent generating and inserting the warning multiple times: - if ( self::$a_bool_SyntaxErrorFlag ) { - - // get plain text string for error location: - $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); - - // limit string length to 300 characters: - if ( strlen( $l_str_ErrorSpotString ) > 300 ) { - $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; - } - - // compose warning box: - $l_str_SyntaxErrorWarning = '

                                                                                    '; - $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                    '; - - // syntax validation setting in the dashboard under the General settings tab: - $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); - - $l_str_SyntaxErrorWarning .= '

                                                                                    '; - $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                    “'; - $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; - $l_str_SyntaxErrorWarning .= '”

                                                                                    '; - - // prepend the warning box to the content: - $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; - - // checked, set flag to false to prevent duplicate warning: - self::$a_bool_SyntaxErrorFlag = false; - - return $p_str_Content; - } - } - - - // load referrer templates if footnotes text not hidden: - if (!$p_bool_HideFootnotesText) { - - // load footnote referrer template file: - if (self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); - } else { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); - } - - /** - * Call Boolean again for robustness when priority levels don’t match any longer. - * - * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. - * - * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) - */ - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); - - // load tooltip inline script if jQuery tooltips are enabled: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); - } - - } else { - $l_obj_Template = null; - $l_obj_TemplateTooltip = null; - } - - // search footnotes short codes in the content - do { - // get first occurrence of the footnote start tag short code: - $i_int_LenContent = strlen($p_str_Content); - if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; - $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosStart === false) { - break; - } - // get first occurrence of the footnote end tag short code: - $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosEnd === false) { - break; - } - // calculate the length of the footnote - $l_int_Length = $l_int_PosEnd - $l_int_PosStart; - - // get footnote text - $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); - - // get tooltip text if present: - self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); - self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - } else { - $l_str_TooltipText = ''; - } - - /** - * URL line wrapping for Unicode non conformant browsers - * - * @since 2.1.1 (CSS) - * @since 2.1.4 (PHP) - * - * Despite Unicode recommends to line-wrap URLs at slashes, and Firefox follows - * the Unicode standard, Chrome does not, making long URLs hang out of tooltips - * or extend reference containers, so that the end is hidden outside the window - * and may eventually be viewed after we scroll horizontally or zoom out. It is - * up to the web page to make URLs breaking anywhere by wrapping them in a span - * that is assigned appropriate CSS properties and values. - * @see css/public.css - * - * - Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. - * - * @since 2.1.1 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/3/#post-13657398 - * - * - * - Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. - * - * @since 2.1.3 - * @date 2020-11-23 - * - * @reporter @karolszakiel - * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/ - * - * - * - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. - * - * @since 2.1.4 - * @date 2020-11-25T0837+0100 - * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 - * - * - * - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - * - * @since 2.1.5 - * - * @reporter @bjrnet21 - * @link https://wordpress.org/support/topic/2-1-4-breaks-on-my-site-images-dont-show/ - * - * - * - Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. - * - * @since 2.1.6 - * @date 2020-12-09T1921+0100 - * - * @reporter @a223123131 - * @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/ - * - * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 - * - * - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. - * - * @since 2.1.6 - * @date 2020-12-09T1606+0100 - * - * - * - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - * - * @since 2.2.6 - * @date 2020-12-23T0409+0100 - * - * @reporter @spiralofhope2 - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ - * - * - * - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - * - * @since 2.2.7 - * @date 2020-12-23T1046+0100 - * - * @reporter @rjl20 - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825479 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825532 - * - * @reporter @lukashuggenberg - * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/ - * - * @reporter @klusik - * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13825885 - * - * @reporter @friedrichnorth - * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/ - * - * @reporter @bernardzit - * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 - * - * - * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - * @date 2020-12-23T1107+0100 - * - * Correct is duplicating the negative lookbehind w/o quotes: '(?get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - - $l_str_FootnoteText = preg_replace( - '#(?$1
                                                                                    ', - $l_str_FootnoteText - ); - } - - // Text to be displayed instead of the footnote - $l_str_FootnoteReplaceText = ""; - - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { - - // get the configurable parts: - self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); - self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); - self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); - - // streamline ID concatenation: - self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - - } - - // display the footnote referrers and the tooltips: - if (!$p_bool_HideFootnotesText) { - $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - // display only a truncated footnote text if option enabled: - $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); - $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); - - // define excerpt text as footnote text by default: - $l_str_ExcerptText = $l_str_FootnoteText; - - /** - * Tooltip truncation - * - * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. - * - * @since 2.1.0 - * @date 2020-11-08T2146+0100 - * - * @reporter @rovanov - * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ - * - * If the tooltip truncation option is enabled, it’s done based on character count, - * and a trailing incomplete word is cropped. - * This is equivalent to the WordPress default excerpt generation, i.e. without a - * custom excerpt and without a delimiter. But WordPress does word count, usually 55. - */ - if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { - $l_str_DummyText = strip_tags($l_str_FootnoteText); - if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { - $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); - $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - $l_str_ExcerptText .= ' … <'; - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; - $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; - $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= "_$l_int_Index');\""; - - // if enabled, add the hard link fragment ID: - if (self::$a_bool_HardLinksEnable) { - - $l_str_ExcerptText .= ' href="#'; - $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; - $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; - $l_str_ExcerptText .= $l_int_Index; - $l_str_ExcerptText .= '"'; - } - - $l_str_ExcerptText .= '>'; - - /** - * Configurable read-on button label - * - * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. - * - * @since 2.1.0 - * @date 2020-11-08T2146+0100 - * - * @reporter @rovanov - * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ - */ - $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); - - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : '
                                                                                    '; - } - } - - /** - * Referrers element superscript or baseline - * - * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report - * @since 2.1.1 - * - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * define the HTML element to use for the referrers: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { - - $l_str_SupSpan = 'sup'; - - } else { - - $l_str_SupSpan = 'span'; - } - - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { - - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkCloseTag = ''; - // self::$a_str_LinkOpenTag will be defined as needed - - // compose hyperlink address (leading space is in template): - $l_str_FootnoteLinkArgument = 'href="#'; - $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; - $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteLinkArgument .= $l_int_Index; - $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; - - /** - * Compose fragment ID anchor with offset, for use in reference container. - * Empty span, child of empty span, to avoid tall dotted rectangles in browser. - */ - $l_str_ReferrerAnchorElement = ''; - - } else { - - /** - * Initialize hard link variables when hard links are disabled. - * - * - Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. - * - * @since 2.4.0 - * @date 2021-01-04T1622+0100 - * - * @reporter @a223123131 - * @link https://wordpress.org/support/topic/wp_debug-php-notice/ - * - * If no hyperlink nor offset anchor is needed, initialize as empty. - */ - $l_str_FootnoteLinkArgument = ''; - $l_str_ReferrerAnchorElement = ''; - - // The link element is set independently as it may be needed for styling: - if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { - - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkOpenTag = ''; - self::$a_str_LinkCloseTag = ''; - - } - } - - // determine tooltip content: - if ( self::$a_bool_TooltipsEnabled ) { - $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; - } else { - $l_str_TooltipContent = ''; - } - - /** - * Determine shrink width if alternative tooltips are enabled. - * - * @since 2.5.6 - */ - $l_str_TooltipStyle = ''; - if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { - $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); - if ( $l_int_TooltipLength < 70 ) { - $l_str_TooltipStyle = ' style="width: '; - $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); - $l_str_TooltipStyle .= 'em;"'; - } - } - - // fill in 'templates/public/footnote.html': - $l_obj_Template->replace( - array( - "link-span" => self::$a_str_LinkSpan, - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "hard-link" => $l_str_FootnoteLinkArgument, - "sup-span" => $l_str_SupSpan, - "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - "index" => $l_int_Index, - "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - "anchor-element" => $l_str_ReferrerAnchorElement, - "style" => $l_str_TooltipStyle, - "text" => $l_str_TooltipContent, - ) - ); - $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); - - // reset the template - $l_obj_Template->reload(); - - // if standard tooltips are enabled but alternative are not: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); - $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); - $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); - $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); - $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); - - // fill in 'templates/public/tooltip.html': - $l_obj_TemplateTooltip->replace( - array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), - "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, - "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, - "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, - "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, - "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, - "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, - ) - ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); - $l_obj_TemplateTooltip->reload(); - } - } - // replace the footnote with the template - $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); - - // add footnote only if not empty - if (!empty($l_str_FootnoteText)) { - // set footnote to the output box at the end - self::$a_arr_Footnotes[] = $l_str_FootnoteText; - // increase footnote index - $l_int_FootnoteIndex++; - } - - /** - * Fixes a footnotes numbering bug (happening under de facto rare circumstances). - * - * - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - * - * @since 1.6.4 - * @date 2016-06-29T0054+0000 - * @committer @dartiss - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1445718 @dartiss’ class/task.php - * @link https://plugins.trac.wordpress.org/log/footnotes/trunk/class/task.php?rev=1445718 @dartiss re-added class/task.php - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class?rev=1445711 class/ w/o task.php - * @link https://plugins.trac.wordpress.org/changeset/1445711/footnotes/trunk/class @dartiss deleted class/task.php - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1026210 @aricura’s latest class/task.php - * - * - * - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. - * - * @since 2.5.5 - * - * @contributor @lolzim - * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032 - * - * @reporter @rumperuu - * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/ - * - * This assignment was overridden by another one, causing the algorithm to jump back - * near the post start to a position calculated as the sum of the length of the last - * footnote and the length of the last footnote replace text. - * A bug disturbing the order of the footnotes depending on the text before the first - * footnote, the length of the first footnote and the length of the templates for the - * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. - */ - // add offset to the new starting position - $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); - - } while (true); - - // return content - return $p_str_Content; - } - - /** - * Generates the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - * - * @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container - * @since 2.0.3 Bugfix: prepend an arrow on user request - * @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters. - * @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings - * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. - * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. - */ - public function ReferenceContainer() { - - // no footnotes have been replaced on this page: - if (empty(self::$a_arr_Footnotes)) { - return ""; - } - - - /** - * Footnote index backlink symbol - * - * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. - * - * @since 2.1.1 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 - * - * If the backlink symbol is enabled: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { - - // get html arrow - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); - // set html arrow to the first one if invalid index defined - if (is_array($l_str_Arrow)) { - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); - } - // get user defined arrow - $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); - if (!empty($l_str_ArrowUserDefined)) { - $l_str_Arrow = $l_str_ArrowUserDefined; - } - - // wrap the arrow in a @media print { display:hidden } span: - $l_str_FootnoteArrow = ''; - $l_str_FootnoteArrow .= $l_str_Arrow . ''; - - } else { - - // If the backlink symbol isn’t enabled, set it to empty: - $l_str_Arrow = ''; - $l_str_FootnoteArrow = ''; - - } - - - /** - * Backlink separator - * - * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. - * - * @since 2.1.4 - * @date 2020-11-28T1048+0100 - * - * @contributor @docteurfitness - * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/update-2-1-3/ - * - * Initially a comma was appended in this algorithm for enumerations. - * The comma in enumerations is not generally preferred. - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { - - // check if it is input-configured: - $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); - - if (empty($l_str_Separator)) { - - // if it is not, check which option is on: - $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); - switch ($l_str_SeparatorOption) { - case 'comma' : $l_str_Separator = ','; break; - case 'semicolon': $l_str_Separator = ';'; break; - case 'en_dash' : $l_str_Separator = ' –'; break; - } - } - - } else { - - $l_str_Separator = ''; - } - - /** - * Backlink terminator - * - * Initially a dot was appended in the table row template. - * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; - * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { - - // check if it is input-configured: - $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); - - if (empty($l_str_Terminator)) { - - // if it is not, check which option is on: - $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); - switch ($l_str_TerminatorOption) { - case 'period' : $l_str_Terminator = '.'; break; - case 'parenthesis': $l_str_Terminator = ')'; break; - case 'colon' : $l_str_Terminator = ':'; break; - } - } - - } else { - - $l_str_Terminator = ''; - } - - - /** - * Line breaks - * - * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. - * - * @since 2.1.4 - * @date 2020-11-28T1049+0100 - * - * The backlinks of combined footnotes are generally preferred in an enumeration. - * But when few footnotes are identical, stacking the items in list form is better. - * Variable number length and proportional character width require explicit line breaks. - * Otherwise, an ordinary space character offering a line break opportunity is inserted. - */ - $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                    ' : ' '; - - /** - * For maintenance and support, table rows in the reference container should be - * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below): - */ - $l_str_Body = "\r\n\r\n"; - - - /** - * Reference container table row template load - * - * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. - * - * @since 2.1.1 - * @date 2020-11-16T2024+0100 - */ - - // when combining identical footnotes is turned on, another template is needed: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // the combining template allows for backlink clusters and supports cell clicking for single notes: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); - - } else { - - // when 3-column layout is turned on (only available if combining is turned off): - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); - - } else { - - // when switch symbol and index is turned on, and combining and 3-columns are off: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); - - } else { - - // default is the standard template: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); - - } - } - } - - /** - * Switch backlink symbol and footnote number - * - * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. - * - * @since 2.1.1 - * @date 2020-11-16T2024+0100 - * - * @contributor @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 - * - * - * - Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. - * - * @since 2.1.4 - * @date 2020-11-26T1633+0100 - */ - $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); - - // loop through all footnotes found in the page - for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { - - // get footnote text - $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; - - // if footnote is empty, go to the next one; - // With combine identicals turned on, identicals will be deleted and are skipped: - if (empty($l_str_FootnoteText)) { - continue; - } - - // generate content of footnote index cell - $l_int_FirstFootnoteIndex = ($l_int_Index + 1); - - // get the footnote index string and - // keep supporting legacy index placeholder: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - /** - * Case of only one backlink per table row - * - * If enabled, and for the case the footnote is single, compose hard link: - */ - // define anyway: - $l_str_HardLinkAddress = ''; - - if (self::$a_bool_HardLinksEnable) { - - /** - * Use-Backbutton-Hint tooltip, optional and configurable. - * - * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. - * - * @since 2.5.4 - * - * @reporter @theroninjedi47 - * @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ - * - * When hard links are enabled, clicks on the backlinks are logged in the browsing history. - * 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 - */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_UseBackbuttonHint = ' title="'; - $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); - $l_str_UseBackbuttonHint .= '"'; - } else { - $l_str_UseBackbuttonHint = ''; - } - - /** - * Compose fragment ID anchor with offset, for use in reference container. - * Empty span, child of empty span, to avoid tall dotted rectangles in browser. - */ - $l_str_FootnoteAnchorElement = ''; - - // compose optional hard link address: - $l_str_HardLinkAddress = ' href="#'; - $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; - $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; - $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; - $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; - - // compose optional opening link tag with optional hard link, mandatory for instance: - self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - - // ID, optional hard link address, and class: - $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; - $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= self::$a_int_PostId; - $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= ' href="#'; - $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; - $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; - } - $l_str_FootnoteReference .= ' class="footnote_backlink"'; - - // the click event goes in the table cell if footnote remains single: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; - - - // the dedicated template enumerating backlinks uses another variable: - $l_str_FootnoteBacklinks = $l_str_FootnoteReference; - - // append the click event right to the backlink item for enumerations; - // else it goes in the table cell: - $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; - $l_str_FootnoteReference .= '>'; - - // append the optional offset anchor for hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; - $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; - } - - // continue both single note and notes cluster, depending on switch option status: - if ($l_bool_SymbolSwitch) { - - $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - - } else { - - $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - - } - - // If that is the only footnote with this text, we’re almost done. - - // check if it isn't the last footnote in the array: - if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { - - // get all footnotes that haven't passed yet: - for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { - - // check if a further footnote is the same as the actual one: - if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { - - // if so, set the further footnote as empty so it won't be displayed later: - self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; - - // set the flag to true for the combined status: - $l_bool_FlagCombined = true; - - // update the footnote ID: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - // resume composing the backlinks enumeration: - $l_str_FootnoteBacklinks .= "$l_str_Separator'; - $l_str_FootnoteBacklinks .= $l_str_LineBreak; - $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; - $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; - - // insert the optional hard link address: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ' href="#'; - $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; - $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; - } - - $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; - $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; - - // append the offset anchor for optional hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ''; - } - - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId; - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; - - } - } - } - - // append terminator and end tag: - $l_str_FootnoteReference .= $l_str_Terminator . ''; - $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; - - } - - // line wrapping of URLs already fixed, see above - - // get reference container item text if tooltip text goes separate: - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); - self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_MirrorTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); - $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; - } else { - $l_str_ReferenceText = $l_str_NotTooltipText; - } - } else { - $l_str_ReferenceText = $l_str_FootnoteText; - } - - // replace all placeholders in table row template: - $l_obj_Template->replace( - array( - - // placeholder used in all templates: - "text" => $l_str_ReferenceText, - - // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => self::$a_str_LinkOpenTag, - "link-end" => self::$a_str_LinkCloseTag, - "link-span" => self::$a_str_LinkSpan, - "terminator" => $l_str_Terminator, - "anchor-element" => $l_str_FootnoteAnchorElement, - "hard-link" => $l_str_HardLinkAddress, - - // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => $l_bool_FlagCombined ? '' : ' pointer', - "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, - "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, - - // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteId, - ) - ); - - $l_str_Body .= $l_obj_Template->getContent(); - - // extra line breaks for page source readability: - $l_str_Body .= "\r\n\r\n"; - - $l_obj_Template->reload(); - - } - - // call again for robustness when priority levels don’t match any longer: - self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); - - // streamline: - $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); - - /** - * Reference container label - * - * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. - * - * @since 2.4.0 - * @date 2021-01-04T0504+0100 - * - * @reporter @lukashuggenberg - * - * Themes may drop-cap a first letter of initial paragraphs, like this label. - * In case of empty label that would apply to the left half button character. - * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. - */ - $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); - - /** - * Select the reference container template according to the script mode. - * - * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - * - * @since 2.5.6 - * - * @reporter @hopper87it - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * - * @reporter @pkverma99 - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 - */ - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - if ( $l_str_ScriptMode == 'jquery' ) { - - // load 'templates/public/reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); - - } else { - - // load 'templates/public/js-reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); - } - - $l_obj_TemplateContainer->replace( - array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), - "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, - "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', - "style" => $l_bool_CollapseDefault ? 'display: none;' : '', - "content" => $l_str_Body, - "scroll-offset" => (self::$a_int_ScrollOffset / 100), - "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), - ) - ); - - // free all found footnotes if reference container will be displayed - self::$a_arr_Footnotes = array(); - - return $l_obj_TemplateContainer->getContent(); - } -} +get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); + $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); + $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); + $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); + $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); + + // PHP_INT_MAX can be set by -1: + $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; + $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; + $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; + $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; + $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; + + + // append custom css to the header + add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + + // append the love and share me slug to the footer + add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { + add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); + } + + // configurable priority level for reference container relative positioning; default 98: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { + add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); + + /** + * Hook for category pages + * + * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. + * + * @since 2.5.0 + * @date 2021-01-05T1402+0100 + * + * @contributor @misfist + * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 + * + * @reporter @vitaefit + * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ + * + * Category pages can have rich HTML content in a term description with article status. + * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. + * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ + */ + add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); + + /** + * Hook for popup maker popups + * + * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. + * + * @since 2.5.1 + * @date 2021-01-18T2038+0100 + * + * @reporter @squatcher + * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ + */ + add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); + } + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { + add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); + } + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { + add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); + } + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { + add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); + } + + + /** + * The the_post hook + * + * - Adding: Hooks: support 'the_post' in response to user request for custom post types. + * + * @since 1.5.4 + * @accountable @aricura + * @link https://wordpress.org/support/topic/doesnt-work-in-custon-post-types/#post-5339110 + * + * + * - Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. + * + * @since 2.0.5 + * @accountable @pewgeuges + * + * + * - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. + * + * @since 2.0.7 + * @accountable @pewgeuges + * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799 + * @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/#post-13612697 + * + * @reporter @markcheret on behalf of W. Beinert + * @link https://wordpress.org/support/topic/footnotes-now-appear-in-summaries-even-though-this-is-marked-no/ + * + * @reporter @nyamachi + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/ + * + * @reporter @whichgodsaves + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13622694 + * + * @reporter @spiralofhope2 + * @link https://wordpress.org/support/topic/2-0-5-broken/ + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13623208 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13624091 + * + * @reporter @widecast + * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13626222 + * + * @reporter @ymorin007 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13627050 + * + * @reporter @markcheret on behalf of L. Smith + * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/ + * + * @reporter @tashi1es + * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/#post-13630495 + * + * + * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + * + * @since 2.1.0 + * @date 2020-11-08T1839+0100 + * @accountable @pewgeuges + */ + + // reset stored footnotes when displaying the header + self::$a_arr_Footnotes = array(); + self::$a_bool_AllowLoveMe = true; + } + + /** + * Outputs the custom css to the header of the public page. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * + * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. + * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. + * @since 2.1.3 raise settings priority to override theme stylesheets + * @since 2.1.4 Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. + * @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings. + * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. + * @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. + * @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. + * @since 2.5.4 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. + */ + public function wp_head() { + + // insert start tag without switching out of PHP: + echo "\r\n\r\n"; + + /** + * Alternative tooltip implementation relying on plain JS and CSS transitions. + * + * - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. + * + * @since 2.1.1 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 + * + * The script for alternative tooltips is printed formatted, not minified: + */ + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + ?> + +get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { + echo $this->ReferenceContainer(); + } + // get setting for love and share this plugin + $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); + // check if the admin allows to add a link to the footer + if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { + return; + } + // set a hyperlink to the word "footnotes" in the Love slug + $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); + // get random love me text + if (strtolower($l_str_LoveMeIndex) == "random") { + $l_str_LoveMeIndex = "text-" . rand(1,7); + } + switch ($l_str_LoveMeIndex) { + // options named wrt backcompat, simplest is default: + case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; + case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; + } + echo sprintf('
                                                                                    %s
                                                                                    ', $l_str_LoveMeText); + } + + /** + * Replaces footnotes in the post/page title. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function the_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); + } + + /** + * Replaces footnotes in the content of the current page/post. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Page/Post content. + * @return string Content with replaced footnotes. + */ + public function the_content($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + } + + /** + * Replaces footnotes in the excerpt of the current page/post. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Page/Post content. + * @return string Content with replaced footnotes. + */ + public function the_excerpt($p_str_Content) { + return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); + } + + /** + * Replaces footnotes in the widget title. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function widget_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); + } + + /** + * Replaces footnotes in the content of the current widget. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function widget_text($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + } + + /** + * Replaces footnotes in each Content var of the current Post object. + * + * @author Stefan Herndler + * @since 1.5.4 + * @param array|WP_Post $p_mixed_Posts + */ + public function the_post(&$p_mixed_Posts) { + // single WP_Post object received + if (!is_array($p_mixed_Posts)) { + $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + return; + } + // array of WP_Post objects received + for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { + $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + } + } + + /** + * Replace all Footnotes in a WP_Post object. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param WP_Post $p_obj_Post + * @return WP_Post + */ + private function replacePostObject($p_obj_Post) { + //MCI_Footnotes_Convert::debug($p_obj_Post); + $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); + $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); + $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); + return $p_obj_Post; + } + + /** + * Replaces all footnotes that occur in the given content. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @return string + * + * + * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. + * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. + */ + public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + + // replace all footnotes in the content, settings are converted to html characters + $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); + // replace all footnotes in the content, settings are NOT converted to html characters + $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); + + /** + * Reference container customized positioning through shortcode + * + * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. + * + * @since 2.2.0 + * @date 2020-12-13T2057+0100 + * + * @reporter @hamshe + * @link https://wordpress.org/support/topic/reference-container-in-elementor/ + * + * + * - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. + * + * @since 2.2.5 + * @date 2020-12-18T1434+0100 + * + * @reporter @hamshe + * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 + * + */ + // append the reference container or insert at shortcode: + $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); + if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { + $l_str_ReferenceContainerPositionShortcode = '[[references]]'; + } + + if ( $p_bool_OutputReferences ) { + + if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { + + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); + + } else { + + $p_str_Content .= $this->ReferenceContainer(); + + } + + // increment the container ID: + self::$a_int_ReferenceContainerId++; + } + + // delete position shortcode should any remain: + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); + + // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found + if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { + self::$a_bool_AllowLoveMe = false; + $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); + } + // return the content with replaced footnotes and optional reference container appended: + return $p_str_Content; + } + + /** + * Replaces all footnotes in the given content and appends them to the static property. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Content to be searched for footnotes. + * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @return string + * + * @since 2.0.0 various. + * @since 2.4.0 Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. + */ + public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { + + // post ID to make everything unique wrt infinite scroll and archive view + self::$a_int_PostId = get_the_id(); + + // contains the index for the next footnote on this page + $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; + + // contains the starting position for the lookup of a footnote + $l_int_PosStart = 0; + + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + // decode html special chars + if ($p_bool_ConvertHtmlChars) { + $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); + $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); + } + + // if footnotes short code is empty, return the content without changes + if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { + return $p_str_Content; + } + + /** + * Footnote delimiter syntax validation + * + * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. + * + * @since 2.4.0 + * + * + * - Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. + * - Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. + * - Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. + * + * @since 2.5.0 + * @date 2021-01-07T0824+0100 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + * + * + * If footnotes short codes are unbalanced, and syntax validation is not disabled, + * prepend a warning to the content; displays de facto beneath the post title. + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { + + // make shortcodes conform to regex syntax: + $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); + $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); + + // apply different regex depending on whether start shortcode is double/triple opening parenthesis: + if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { + + // this prevents from catching a script containing e.g. a double opening parenthesis: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; + + } else { + + // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; + } + + // check syntax and get error locations: + preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); + if ( empty( $p_arr_ErrorLocation ) ) { + self::$a_bool_SyntaxErrorFlag = false; + } + + // prevent generating and inserting the warning multiple times: + if ( self::$a_bool_SyntaxErrorFlag ) { + + // get plain text string for error location: + $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); + + // limit string length to 300 characters: + if ( strlen( $l_str_ErrorSpotString ) > 300 ) { + $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; + } + + // compose warning box: + $l_str_SyntaxErrorWarning = '

                                                                                    '; + $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                    '; + + // syntax validation setting in the dashboard under the General settings tab: + $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); + + $l_str_SyntaxErrorWarning .= '

                                                                                    '; + $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                    “'; + $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; + $l_str_SyntaxErrorWarning .= '”

                                                                                    '; + + // prepend the warning box to the content: + $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; + + // checked, set flag to false to prevent duplicate warning: + self::$a_bool_SyntaxErrorFlag = false; + + return $p_str_Content; + } + } + + + // load referrer templates if footnotes text not hidden: + if (!$p_bool_HideFootnotesText) { + + // load footnote referrer template file: + if (self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + } else { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + } + + /** + * Call Boolean again for robustness when priority levels don’t match any longer. + * + * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. + * + * @since 2.5.4 + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) + */ + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); + + // load tooltip inline script if jQuery tooltips are enabled: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); + } + + } else { + $l_obj_Template = null; + $l_obj_TemplateTooltip = null; + } + + // search footnotes short codes in the content + do { + // get first occurrence of the footnote start tag short code: + $i_int_LenContent = strlen($p_str_Content); + if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; + $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosStart === false) { + break; + } + // get first occurrence of the footnote end tag short code: + $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosEnd === false) { + break; + } + // calculate the length of the footnote + $l_int_Length = $l_int_PosEnd - $l_int_PosStart; + + // get footnote text + $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); + + // get tooltip text if present: + self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); + self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + } else { + $l_str_TooltipText = ''; + } + + /** + * URL line wrapping for Unicode non conformant browsers + * + * @since 2.1.1 (CSS) + * @since 2.1.4 (PHP) + * + * Despite Unicode recommends to line-wrap URLs at slashes, and Firefox follows + * the Unicode standard, Chrome does not, making long URLs hang out of tooltips + * or extend reference containers, so that the end is hidden outside the window + * and may eventually be viewed after we scroll horizontally or zoom out. It is + * up to the web page to make URLs breaking anywhere by wrapping them in a span + * that is assigned appropriate CSS properties and values. + * @see css/public.css + * + * - Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. + * + * @since 2.1.1 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/3/#post-13657398 + * + * + * - Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. + * + * @since 2.1.3 + * @date 2020-11-23 + * + * @reporter @karolszakiel + * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/ + * + * + * - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. + * + * @since 2.1.4 + * @date 2020-11-25T0837+0100 + * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 + * + * + * - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + * + * @since 2.1.5 + * + * @reporter @bjrnet21 + * @link https://wordpress.org/support/topic/2-1-4-breaks-on-my-site-images-dont-show/ + * + * + * - Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. + * + * @since 2.1.6 + * @date 2020-12-09T1921+0100 + * + * @reporter @a223123131 + * @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/ + * + * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 + * + * - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. + * + * @since 2.1.6 + * @date 2020-12-09T1606+0100 + * + * + * - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + * + * @since 2.2.6 + * @date 2020-12-23T0409+0100 + * + * @reporter @spiralofhope2 + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ + * + * + * - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + * + * @since 2.2.7 + * @date 2020-12-23T1046+0100 + * + * @reporter @rjl20 + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825479 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825532 + * + * @reporter @lukashuggenberg + * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/ + * + * @reporter @klusik + * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13825885 + * + * @reporter @friedrichnorth + * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/ + * + * @reporter @bernardzit + * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 + * + * + * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + * @date 2020-12-23T1107+0100 + * + * Correct is duplicating the negative lookbehind w/o quotes: '(?get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + + $l_str_FootnoteText = preg_replace( + '#(?$1', + $l_str_FootnoteText + ); + } + + // Text to be displayed instead of the footnote + $l_str_FootnoteReplaceText = ""; + + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { + + // get the configurable parts: + self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); + self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); + self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); + + // streamline ID concatenation: + self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + + } + + // display the footnote referrers and the tooltips: + if (!$p_bool_HideFootnotesText) { + $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + // display only a truncated footnote text if option enabled: + $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); + $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); + + // define excerpt text as footnote text by default: + $l_str_ExcerptText = $l_str_FootnoteText; + + /** + * Tooltip truncation + * + * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. + * + * @since 2.1.0 + * @date 2020-11-08T2146+0100 + * + * @reporter @rovanov + * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + * + * If the tooltip truncation option is enabled, it’s done based on character count, + * and a trailing incomplete word is cropped. + * This is equivalent to the WordPress default excerpt generation, i.e. without a + * custom excerpt and without a delimiter. But WordPress does word count, usually 55. + */ + if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { + $l_str_DummyText = strip_tags($l_str_FootnoteText); + if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { + $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); + $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); + $l_str_ExcerptText .= ' … <'; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; + $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; + $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= "_$l_int_Index');\""; + + // if enabled, add the hard link fragment ID: + if (self::$a_bool_HardLinksEnable) { + + $l_str_ExcerptText .= ' href="#'; + $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; + $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; + $l_str_ExcerptText .= $l_int_Index; + $l_str_ExcerptText .= '"'; + } + + $l_str_ExcerptText .= '>'; + + /** + * Configurable read-on button label + * + * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. + * + * @since 2.1.0 + * @date 2020-11-08T2146+0100 + * + * @reporter @rovanov + * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + */ + $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); + + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; + } + } + + /** + * Referrers element superscript or baseline + * + * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report + * @since 2.1.1 + * + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * define the HTML element to use for the referrers: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { + + $l_str_SupSpan = 'sup'; + + } else { + + $l_str_SupSpan = 'span'; + } + + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { + + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkCloseTag = ''; + // self::$a_str_LinkOpenTag will be defined as needed + + // compose hyperlink address (leading space is in template): + $l_str_FootnoteLinkArgument = 'href="#'; + $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; + $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteLinkArgument .= $l_int_Index; + $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; + + /** + * Compose fragment ID anchor with offset, for use in reference container. + * Empty span, child of empty span, to avoid tall dotted rectangles in browser. + */ + $l_str_ReferrerAnchorElement = ''; + + } else { + + /** + * Initialize hard link variables when hard links are disabled. + * + * - Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. + * + * @since 2.4.0 + * @date 2021-01-04T1622+0100 + * + * @reporter @a223123131 + * @link https://wordpress.org/support/topic/wp_debug-php-notice/ + * + * If no hyperlink nor offset anchor is needed, initialize as empty. + */ + $l_str_FootnoteLinkArgument = ''; + $l_str_ReferrerAnchorElement = ''; + + // The link element is set independently as it may be needed for styling: + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { + + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkOpenTag = ''; + self::$a_str_LinkCloseTag = ''; + + } + } + + // determine tooltip content: + if ( self::$a_bool_TooltipsEnabled ) { + $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; + } else { + $l_str_TooltipContent = ''; + } + + /** + * Determine shrink width if alternative tooltips are enabled. + * + * @since 2.5.6 + */ + $l_str_TooltipStyle = ''; + if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { + $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); + if ( $l_int_TooltipLength < 70 ) { + $l_str_TooltipStyle = ' style="width: '; + $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); + $l_str_TooltipStyle .= 'em;"'; + } + } + + // fill in 'templates/public/footnote.html': + $l_obj_Template->replace( + array( + "link-span" => self::$a_str_LinkSpan, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "hard-link" => $l_str_FootnoteLinkArgument, + "sup-span" => $l_str_SupSpan, + "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + "index" => $l_int_Index, + "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + "anchor-element" => $l_str_ReferrerAnchorElement, + "style" => $l_str_TooltipStyle, + "text" => $l_str_TooltipContent, + ) + ); + $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); + + // reset the template + $l_obj_Template->reload(); + + // if standard tooltips are enabled but alternative are not: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + + $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); + $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); + $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); + $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); + $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); + $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); + + // fill in 'templates/public/tooltip.html': + $l_obj_TemplateTooltip->replace( + array( + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), + "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, + "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, + "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, + "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, + "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, + "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, + ) + ); + $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + $l_obj_TemplateTooltip->reload(); + } + } + // replace the footnote with the template + $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); + + // add footnote only if not empty + if (!empty($l_str_FootnoteText)) { + // set footnote to the output box at the end + self::$a_arr_Footnotes[] = $l_str_FootnoteText; + // increase footnote index + $l_int_FootnoteIndex++; + } + + /** + * Fixes a footnotes numbering bug (happening under de facto rare circumstances). + * + * - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + * + * @since 1.6.4 + * @date 2016-06-29T0054+0000 + * @committer @dartiss + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1445718 @dartiss’ class/task.php + * @link https://plugins.trac.wordpress.org/log/footnotes/trunk/class/task.php?rev=1445718 @dartiss re-added class/task.php + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class?rev=1445711 class/ w/o task.php + * @link https://plugins.trac.wordpress.org/changeset/1445711/footnotes/trunk/class @dartiss deleted class/task.php + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1026210 @aricura’s latest class/task.php + * + * + * - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. + * + * @since 2.5.5 + * + * @contributor @lolzim + * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032 + * + * @reporter @rumperuu + * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/ + * + * This assignment was overridden by another one, causing the algorithm to jump back + * near the post start to a position calculated as the sum of the length of the last + * footnote and the length of the last footnote replace text. + * A bug disturbing the order of the footnotes depending on the text before the first + * footnote, the length of the first footnote and the length of the templates for the + * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. + */ + // add offset to the new starting position + $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); + + } while (true); + + // return content + return $p_str_Content; + } + + /** + * Generates the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + * + * @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container + * @since 2.0.3 Bugfix: prepend an arrow on user request + * @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters. + * @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings + * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. + * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. + */ + public function ReferenceContainer() { + + // no footnotes have been replaced on this page: + if (empty(self::$a_arr_Footnotes)) { + return ""; + } + + + /** + * Footnote index backlink symbol + * + * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. + * + * @since 2.1.1 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 + * + * If the backlink symbol is enabled: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { + + // get html arrow + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); + // set html arrow to the first one if invalid index defined + if (is_array($l_str_Arrow)) { + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); + } + // get user defined arrow + $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); + if (!empty($l_str_ArrowUserDefined)) { + $l_str_Arrow = $l_str_ArrowUserDefined; + } + + // wrap the arrow in a @media print { display:hidden } span: + $l_str_FootnoteArrow = ''; + $l_str_FootnoteArrow .= $l_str_Arrow . ''; + + } else { + + // If the backlink symbol isn’t enabled, set it to empty: + $l_str_Arrow = ''; + $l_str_FootnoteArrow = ''; + + } + + + /** + * Backlink separator + * + * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. + * + * @since 2.1.4 + * @date 2020-11-28T1048+0100 + * + * @contributor @docteurfitness + * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/update-2-1-3/ + * + * Initially a comma was appended in this algorithm for enumerations. + * The comma in enumerations is not generally preferred. + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { + + // check if it is input-configured: + $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + + if (empty($l_str_Separator)) { + + // if it is not, check which option is on: + $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); + switch ($l_str_SeparatorOption) { + case 'comma' : $l_str_Separator = ','; break; + case 'semicolon': $l_str_Separator = ';'; break; + case 'en_dash' : $l_str_Separator = ' –'; break; + } + } + + } else { + + $l_str_Separator = ''; + } + + /** + * Backlink terminator + * + * Initially a dot was appended in the table row template. + * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; + * making it optional was envisaged. + * @since 2.1.4 the terminator is optional, has options, and is configurable: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { + + // check if it is input-configured: + $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + + if (empty($l_str_Terminator)) { + + // if it is not, check which option is on: + $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); + switch ($l_str_TerminatorOption) { + case 'period' : $l_str_Terminator = '.'; break; + case 'parenthesis': $l_str_Terminator = ')'; break; + case 'colon' : $l_str_Terminator = ':'; break; + } + } + + } else { + + $l_str_Terminator = ''; + } + + + /** + * Line breaks + * + * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. + * + * @since 2.1.4 + * @date 2020-11-28T1049+0100 + * + * The backlinks of combined footnotes are generally preferred in an enumeration. + * But when few footnotes are identical, stacking the items in list form is better. + * Variable number length and proportional character width require explicit line breaks. + * Otherwise, an ordinary space character offering a line break opportunity is inserted. + */ + $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                    ' : ' '; + + /** + * For maintenance and support, table rows in the reference container should be + * separated by an empty line. So we add these line breaks for source readability. + * Before the first table row (breaks between rows are ~200 lines below): + */ + $l_str_Body = "\r\n\r\n"; + + + /** + * Reference container table row template load + * + * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. + * + * @since 2.1.1 + * @date 2020-11-16T2024+0100 + */ + + // when combining identical footnotes is turned on, another template is needed: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + // the combining template allows for backlink clusters and supports cell clicking for single notes: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); + + } else { + + // when 3-column layout is turned on (only available if combining is turned off): + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); + + } else { + + // when switch symbol and index is turned on, and combining and 3-columns are off: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); + + } else { + + // default is the standard template: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); + + } + } + } + + /** + * Switch backlink symbol and footnote number + * + * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. + * + * @since 2.1.1 + * @date 2020-11-16T2024+0100 + * + * @contributor @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 + * + * + * - Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. + * + * @since 2.1.4 + * @date 2020-11-26T1633+0100 + */ + $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); + + // loop through all footnotes found in the page + for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { + + // get footnote text + $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; + + // if footnote is empty, go to the next one; + // With combine identicals turned on, identicals will be deleted and are skipped: + if (empty($l_str_FootnoteText)) { + continue; + } + + // generate content of footnote index cell + $l_int_FirstFootnoteIndex = ($l_int_Index + 1); + + // get the footnote index string and + // keep supporting legacy index placeholder: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + /** + * Case of only one backlink per table row + * + * If enabled, and for the case the footnote is single, compose hard link: + */ + // define anyway: + $l_str_HardLinkAddress = ''; + + if (self::$a_bool_HardLinksEnable) { + + /** + * Use-Backbutton-Hint tooltip, optional and configurable. + * + * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. + * + * @since 2.5.4 + * + * @reporter @theroninjedi47 + * @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ + * + * When hard links are enabled, clicks on the backlinks are logged in the browsing history. + * 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 + */ + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_UseBackbuttonHint = ' title="'; + $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); + $l_str_UseBackbuttonHint .= '"'; + } else { + $l_str_UseBackbuttonHint = ''; + } + + /** + * Compose fragment ID anchor with offset, for use in reference container. + * Empty span, child of empty span, to avoid tall dotted rectangles in browser. + */ + $l_str_FootnoteAnchorElement = ''; + + // compose optional hard link address: + $l_str_HardLinkAddress = ' href="#'; + $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; + $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; + $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; + $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; + + // compose optional opening link tag with optional hard link, mandatory for instance: + self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + + // ID, optional hard link address, and class: + $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; + $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteReference .= self::$a_int_PostId; + $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= ' href="#'; + $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; + $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; + } + $l_str_FootnoteReference .= ' class="footnote_backlink"'; + + // the click event goes in the table cell if footnote remains single: + $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; + + + // the dedicated template enumerating backlinks uses another variable: + $l_str_FootnoteBacklinks = $l_str_FootnoteReference; + + // append the click event right to the backlink item for enumerations; + // else it goes in the table cell: + $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; + $l_str_FootnoteReference .= '>'; + + // append the optional offset anchor for hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; + $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; + } + + // continue both single note and notes cluster, depending on switch option status: + if ($l_bool_SymbolSwitch) { + + $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + + } else { + + $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + + } + + // If that is the only footnote with this text, we’re almost done. + + // check if it isn't the last footnote in the array: + if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { + + // get all footnotes that haven't passed yet: + for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { + + // check if a further footnote is the same as the actual one: + if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { + + // if so, set the further footnote as empty so it won't be displayed later: + self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; + + // set the flag to true for the combined status: + $l_bool_FlagCombined = true; + + // update the footnote ID: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + // resume composing the backlinks enumeration: + $l_str_FootnoteBacklinks .= "$l_str_Separator'; + $l_str_FootnoteBacklinks .= $l_str_LineBreak; + $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; + $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; + + // insert the optional hard link address: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ' href="#'; + $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; + $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; + } + + $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; + $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; + + // append the offset anchor for optional hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ''; + } + + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; + + } + } + } + + // append terminator and end tag: + $l_str_FootnoteReference .= $l_str_Terminator . ''; + $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; + + } + + // line wrapping of URLs already fixed, see above + + // get reference container item text if tooltip text goes separate: + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); + self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_MirrorTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); + $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; + } else { + $l_str_ReferenceText = $l_str_NotTooltipText; + } + } else { + $l_str_ReferenceText = $l_str_FootnoteText; + } + + // replace all placeholders in table row template: + $l_obj_Template->replace( + array( + + // placeholder used in all templates: + "text" => $l_str_ReferenceText, + + // used in standard layout W/O COMBINED FOOTNOTES: + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "link-start" => self::$a_str_LinkOpenTag, + "link-end" => self::$a_str_LinkCloseTag, + "link-span" => self::$a_str_LinkSpan, + "terminator" => $l_str_Terminator, + "anchor-element" => $l_str_FootnoteAnchorElement, + "hard-link" => $l_str_HardLinkAddress, + + // used in standard layout WITH COMBINED IDENTICALS TURNED ON: + "pointer" => $l_bool_FlagCombined ? '' : ' pointer', + "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, + "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + + // Legacy placeholders for use in legacy layout templates: + "arrow" => $l_str_FootnoteArrow, + "index" => $l_str_FootnoteId, + ) + ); + + $l_str_Body .= $l_obj_Template->getContent(); + + // extra line breaks for page source readability: + $l_str_Body .= "\r\n\r\n"; + + $l_obj_Template->reload(); + + } + + // call again for robustness when priority levels don’t match any longer: + self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); + + // streamline: + $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); + + /** + * Reference container label + * + * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. + * + * @since 2.4.0 + * @date 2021-01-04T0504+0100 + * + * @reporter @lukashuggenberg + * + * Themes may drop-cap a first letter of initial paragraphs, like this label. + * In case of empty label that would apply to the left half button character. + * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. + */ + $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); + + /** + * Select the reference container template according to the script mode. + * + * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. + * + * @since 2.5.6 + * + * @reporter @hopper87it + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ + * + * @reporter @pkverma99 + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 + */ + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + + if ( $l_str_ScriptMode == 'jquery' ) { + + // load 'templates/public/reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); + + } else { + + // load 'templates/public/js-reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); + } + + $l_obj_TemplateContainer->replace( + array( + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), + "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, + "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', + "style" => $l_bool_CollapseDefault ? 'display: none;' : '', + "content" => $l_str_Body, + "scroll-offset" => (self::$a_int_ScrollOffset / 100), + "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), + ) + ); + + // free all found footnotes if reference container will be displayed + self::$a_arr_Footnotes = array(); + + return $l_obj_TemplateContainer->getContent(); + } +} diff --git a/class/template.php b/class/template.php index d8c19b9..2c0b8d4 100644 --- a/class/template.php +++ b/class/template.php @@ -1,261 +1,261 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); - - /** - * Modularize functions - * - * @since 2.4.0d3 - * - * @author Patrizia Lutz @misfist - */ - if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { - $this->process_template( $template ); - } else { - return; - } - - } - - /** - * Replace all placeholders specified in array. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). - * @return bool True on Success, False if Placeholders invalid. - */ - public function replace($p_arr_Placeholders) { - // no placeholders set - if (empty($p_arr_Placeholders)) { - return false; - } - // template content is empty - if (empty($this->a_str_ReplacedContent)) { - return false; - } - // iterate through each placeholder and replace it with its value - foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { - $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); - } - // success - return true; - } - - /** - * Reloads the original content of the template file. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function reload() { - $this->a_str_ReplacedContent = $this->a_str_OriginalContent; - } - - /** - * Returns the content of the template file with replaced placeholders. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string Template content with replaced placeholders. - */ - public function getContent() { - return $this->a_str_ReplacedContent; - } - - /** - * Process template file - * - * @author Patrizia Lutz @misfist - * - * @since 2.4.0d3 - * - * @param string $template - * @return void - * - * - * @since 2.0.3 replace tab with a space - * @since 2.0.3 replace 2 spaces with 1 - * @since 2.0.4 collapse multiple spaces - * @since 2.2.6 delete a space before a closing pointy bracket - * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) - */ - public function process_template( $template ) { - $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); - $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); - $this->reload(); - } - - /** - * Get the template - * - * @author Patrizia Lutz @misfist - * - * @since 2.4.0d3 - * - * @param string $p_str_FileType - * @param string $p_str_FileName - * @param string $p_str_Extension - * @return mixed false | template path - */ - public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { - $located = false; - - /** - * The directory change be modified - * @usage to change location of templates to `template_parts/footnotes/': - * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/; - * } ); - */ - $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; - - /** - * Look in active (child) theme - */ - if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { - $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - - /** - * Look in parent theme - */ - } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { - $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - - /** - * Look in custom directory - */ - } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { - $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - - /** - * Look in plugin - */ - } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { - $located = $this->plugin_directory . 'templates/' . $template_name; - } - - return $located; - } - -} // end of class +plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); + + /** + * Modularize functions + * + * @since 2.4.0d3 + * + * @author Patrizia Lutz @misfist + */ + if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { + $this->process_template( $template ); + } else { + return; + } + + } + + /** + * Replace all placeholders specified in array. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). + * @return bool True on Success, False if Placeholders invalid. + */ + public function replace($p_arr_Placeholders) { + // no placeholders set + if (empty($p_arr_Placeholders)) { + return false; + } + // template content is empty + if (empty($this->a_str_ReplacedContent)) { + return false; + } + // iterate through each placeholder and replace it with its value + foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { + $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); + } + // success + return true; + } + + /** + * Reloads the original content of the template file. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function reload() { + $this->a_str_ReplacedContent = $this->a_str_OriginalContent; + } + + /** + * Returns the content of the template file with replaced placeholders. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string Template content with replaced placeholders. + */ + public function getContent() { + return $this->a_str_ReplacedContent; + } + + /** + * Process template file + * + * @author Patrizia Lutz @misfist + * + * @since 2.4.0d3 + * + * @param string $template + * @return void + * + * + * @since 2.0.3 replace tab with a space + * @since 2.0.3 replace 2 spaces with 1 + * @since 2.0.4 collapse multiple spaces + * @since 2.2.6 delete a space before a closing pointy bracket + * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) + */ + public function process_template( $template ) { + $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); + $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); + $this->reload(); + } + + /** + * Get the template + * + * @author Patrizia Lutz @misfist + * + * @since 2.4.0d3 + * + * @param string $p_str_FileType + * @param string $p_str_FileName + * @param string $p_str_Extension + * @return mixed false | template path + */ + public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { + $located = false; + + /** + * The directory change be modified + * @usage to change location of templates to `template_parts/footnotes/': + * add_filter( 'mci_footnotes_template_directory', function( $directory ) { + * return 'template_parts/footnotes/; + * } ); + */ + $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; + + /** + * Look in active (child) theme + */ + if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { + $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; + + /** + * Look in parent theme + */ + } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { + $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; + + /** + * Look in custom directory + */ + } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { + $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; + + /** + * Look in plugin + */ + } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { + $located = $this->plugin_directory . 'templates/' . $template_name; + } + + return $located; + } + +} // end of class diff --git a/class/widgets/base.php b/class/widgets/base.php index 7e8ece1..ad41077 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,88 +1,88 @@ - echo the Widget Content - * **public function form($instance)** -> echo the Settings of the Widget - * - * @author Stefan Herndler - * @since 1.5.0 - */ -abstract class MCI_Footnotes_WidgetBase extends WP_Widget { - - /** - * Returns an unique ID as string used for the Widget Base ID. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getID(); - - /** - * Returns the Public name of child Widget to be displayed in the Configuration page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getName(); - - /** - * Returns the Description of the child widget. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getDescription(); - - /** - * Returns the width of the Widget. Default width is 250 pixel. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return int - */ - protected function getWidgetWidth() { - return 250; - } - - /** - * Class Constructor. Registers the child Widget to WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. - * - * @since 1.6.4 - * @contributor @dartiss - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720 - * “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.” - */ - public function __construct() { - $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); - $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); - // registers the Widget - parent::__construct( - strtolower($this->getID()), // unique ID for the widget, has to be lowercase - $this->getName(), // Plugin name to be displayed - $l_arr_WidgetOptions, // Optional Widget Options - $l_arr_ControlOptions // Optional Widget Control Options - ); - } -} + echo the Widget Content + * **public function form($instance)** -> echo the Settings of the Widget + * + * @author Stefan Herndler + * @since 1.5.0 + */ +abstract class MCI_Footnotes_WidgetBase extends WP_Widget { + + /** + * Returns an unique ID as string used for the Widget Base ID. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getID(); + + /** + * Returns the Public name of child Widget to be displayed in the Configuration page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getName(); + + /** + * Returns the Description of the child widget. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getDescription(); + + /** + * Returns the width of the Widget. Default width is 250 pixel. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return int + */ + protected function getWidgetWidth() { + return 250; + } + + /** + * Class Constructor. Registers the child Widget to WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. + * + * @since 1.6.4 + * @contributor @dartiss + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720 + * “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.” + */ + public function __construct() { + $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); + $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); + // registers the Widget + parent::__construct( + strtolower($this->getID()), // unique ID for the widget, has to be lowercase + $this->getName(), // Plugin name to be displayed + $l_arr_WidgetOptions, // Optional Widget Options + $l_arr_ControlOptions // Optional Widget Control Options + ); + } +} diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 693ef58..2e322ec 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,85 +1,85 @@ -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { - echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); - } - } -} +get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { + echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); + } + } +} diff --git a/class/wysiwyg.php b/class/wysiwyg.php index d8b558b..3a27477 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,83 +1,83 @@ -getContent(); - } - - /** - * Includes the Plugins WYSIWYG editor script. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Plugins Scripts to be included to the editor. - * @return array - */ - public static function includeScripts($p_arr_Plugins) { - $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); - return $p_arr_Plugins; - } - - /** - * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. - * Returns an JSON encoded array with the Footnotes start and end short code. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public static function ajaxCallback() { - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); - exit; - } +getContent(); + } + + /** + * Includes the Plugins WYSIWYG editor script. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Plugins Scripts to be included to the editor. + * @return array + */ + public static function includeScripts($p_arr_Plugins) { + $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); + return $p_arr_Plugins; + } + + /** + * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. + * Returns an JSON encoded array with the Footnotes start and end short code. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public static function ajaxCallback() { + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); + exit; + } } \ No newline at end of file diff --git a/css/dev-common.css b/css/dev-common.css index a450c96..2b8e657 100644 --- a/css/dev-common.css +++ b/css/dev-common.css @@ -1,591 +1,591 @@ -/* - * .footnote_plugin_tooltip_text = inner - * .footnote_tooltip = inner - */ - -.footnote_referrer, -.footnote_referrer:link, -.footnote_referrer:hover, -.footnote_referrer > a, -.footnote_referrer > a:link, -.footnote_referrer > a:hover, -.footnote_plugin_tooltip_text, -.footnote_plugin_tooltip_text:hover, -.main-content .footnote_referrer, -.main-content .footnote_referrer:link, -.main-content .footnote_referrer:hover, -.main-content .footnote_referrer > a, -.main-content .footnote_referrer > a:link, -.main-content .footnote_referrer > a:hover, -.main-content .footnote_plugin_tooltip_text, -.main-content .footnote_plugin_tooltip_text:hover { - text-decoration: none !important; - border-bottom: none !important; - box-shadow: none !important; -} - -/** - * Footnote referrer (not “tooltip text”) - * - * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. - * - * @since 2.1.1 - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. - * - * @since 2.5.4 - * @reporter @wisenilesh - * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ - */ - -.footnote_plugin_tooltip_text { - line-height: 0; - position: relative !important; - cursor: pointer; -} - -/** - * Tooltips - * - * - Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. - * - * @since 2.1.6 - * @reporter @russianicons - * @link https://wordpress.org/support/topic/counter-styles-not-working/#post-13767299 - */ - -.footnote_tooltip { - display: none; - z-index: 2147483647 !important; - cursor: auto; - text-align: left; - padding: 12px; - line-height: 1.2; - font-weight: normal; - font-style: normal; -} - -/** - * Alternative tooltips - * - * These default position values may be overridden by internal CSS. - */ - -.footnote_referrer.relative { - position: relative; -} - -.footnote_tooltip.position { - display: unset; - position: absolute; - bottom: 24px; - left: -50px; - width: 400px; -} - -/* -fade-in parameters -*/ - -.footnote_tooltip.shown { - visibility: visible; - opacity: 1; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 0ms; - transition-duration: 200ms; -*/ -} - -/* -fade-out parameters -*/ - -.footnote_tooltip.hidden { - visibility: hidden; - opacity: 0; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 400ms; - transition-duration: 200ms; -*/ -} - -/* -Read-on button -*/ - -.footnote_tooltip_continue { - font-style: italic; - color: green; - text-decoration: none !important; - cursor: pointer; - white-space: nowrap; -} - -.footnote_tooltip_continue:hover { - color: blue; - text-decoration: underline !important; -} - - -/***************************************************** -Footnote reference container - -Templates: -templates/public/reference-container.html -templates/public/reference-container-body.html -templates/public/reference-container-combi.html -templates/public/reference-container-switch.html -templates/public/reference-container-3column.html - -Optional responsive basic page layout support -stylesheets: -css/layout-reference-container.css -css/layout-main-content.css -css/layout-page-content.css - -Classes: -.footnotes_reference_container = enclosing
                                                                                    -.footnote_container_prepare = label
                                                                                    -.footnote_reference_container_label = -.footnote_reference_container_collapse_button = sibling -.footnote-reference-container = misleading and inconsistent; alias: -.footnotes_table = -.footnotes_plugin_reference_row = -.footnote_plugin_index_combi = first '; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; + $l_str_wordpress_plugins = ''; + // Iterate through each installed WordPress Plugin. + foreach ( get_plugins() as $l_arr_plugin ) { + $l_str_wordpress_plugins .= ''; + $l_str_wordpress_plugins .= ''; + // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found + $l_str_wordpress_plugins .= ''; + // phpcs:enable + $l_str_wordpress_plugins .= ''; } - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' ); + + if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { + die; + } else { + $l_str_server_name = wp_kses_post( wp_unslash( $_SERVER['SERVER_NAME'] ) ); + } + if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + die; + } else { + $l_str_http_user_agent = wp_kses_post( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + } + + // Replace all placeholders. + $l_obj_template->replace( array( - "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "server" => $_SERVER["SERVER_NAME"], + 'label-server' => __( 'Server name', 'footnotes' ), + 'server' => $l_str_server_name, - "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php" => phpversion(), + 'label-php' => __( 'PHP version', 'footnotes' ), + 'php' => phpversion(), - "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "user-agent" => $_SERVER["HTTP_USER_AGENT"], + 'label-user-agent' => __( 'User agent', 'footnotes' ), + 'user-agent' => $l_str_http_user_agent, - "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-max-execution-time' => __( 'Max execution time', 'footnotes' ), + 'max-execution-time' => ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'footnotes' ), - "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "memory-limit" => ini_get('memory_limit'), + 'label-memory-limit' => __( 'Memory limit', 'footnotes' ), + 'memory-limit' => ini_get( 'memory_limit' ), - "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php-extensions" => $l_str_PhpExtensions, + 'label-php-extensions' => __( 'PHP extensions', 'footnotes' ), + 'php-extensions' => $l_str_php_extensions, - "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "wordpress" => $wp_version, + 'label-wordpress' => __( 'WordPress version', 'footnotes' ), + 'wordpress' => $wp_version, - "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", + 'label-theme' => __( 'Active Theme', 'footnotes' ), + 'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']', - "plugins" => $l_str_WordPressPlugins + 'plugins' => $l_str_wordpress_plugins, ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } -} \ No newline at end of file +} diff --git a/class/layout/init.php b/class/layout/init.php index b18e77c..59f1c3c 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -1,17 +1,15 @@ -a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; + foreach ( get_declared_classes() as $l_str_class_name ) { + if ( is_subclass_of( $l_str_class_name, 'MCI_Footnotes_Layout_Engine' ) ) { + $l_obj_class = new $l_str_class_name(); + // Append new instance of the layout engine sub class. + $this->a_arr_sub_page_classes[ $l_obj_class->get_priority() ] = $l_obj_class; } } - ksort($this->a_arr_SubPageClasses); + ksort( $this->a_arr_sub_page_classes ); - // register hooks/actions - add_action('admin_init', array($this, 'initializeSettings')); - add_action('admin_menu', array($this, 'registerMainMenu')); - // register AJAX callbacks for Plugin information - add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + // Register hooks/actions. + add_action( 'admin_init', array( $this, 'initialize_settings' ) ); + add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); + // register AJAX callbacks for Plugin information. + add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); + add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); } /** * Initializes all sub pages and registers the settings. * - * @author Stefan Herndler * @since 1.5.0 */ - public function initializeSettings() { - MCI_Footnotes_Settings::instance()->RegisterSettings(); - // iterate though each sub class of the layout engine and register their sections - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSections(); + public function initialize_settings() { + MCI_Footnotes_Settings::instance()->register_settings(); + // iterate though each sub class of the layout engine and register their sections. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sections(); } } @@ -88,123 +78,123 @@ class MCI_Footnotes_Layout_Init { * Registers the new main menu for the WordPress dashboard. * Registers all sub menu pages for the new main menu. * - * @author Stefan Herndler * @since 1.5.0 * @see http://codex.wordpress.org/Function_Reference/add_menu_page */ - public function registerMainMenu() { + public function register_main_menu() { global $menu; - // iterate through each main menu - foreach($menu as $l_arr_MainMenu) { - // iterate through each main menu attribute - foreach($l_arr_MainMenu as $l_str_Attribute) { - // main menu already added, append sub pages and stop - if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { - $this->registerSubPages(); + // iterate through each main menu. + foreach ( $menu as $l_arr_main_menu ) { + // iterate through each main menu attribute. + foreach ( $l_arr_main_menu as $l_str_attribute ) { + // main menu already added, append sub pages and stop. + if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { + $this->register_sub_pages(); return; } } } - // add a new main menu page to the WordPress dashboard + // add a new main menu page to the WordPress dashboard. add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title - self::C_STR_MAIN_MENU_TITLE, // menu title - 'manage_options', // capability - self::C_STR_MAIN_MENU_SLUG, // menu slug - array($this, "displayOtherPlugins"), // function - plugins_url('footnotes/img/main-menu.png'), // icon url - null // position + self::C_STR_MAIN_MENU_TITLE, // page title. + self::C_STR_MAIN_MENU_TITLE, // menu title. + 'manage_options', // capability. + self::C_STR_MAIN_MENU_SLUG, // menu slug. + array( $this, 'display_other_plugins' ), // function. + plugins_url( 'footnotes/img/main-menu.png' ), // icon url. + null // position. ); - $this->registerSubPages(); + $this->register_sub_pages(); } /** * Registers all SubPages for this Plugin. * - * @author Stefan Herndler * @since 1.5.0 */ - private function registerSubPages() { - // first registered sub menu page MUST NOT contain a unique slug suffix - // iterate though each sub class of the layout engine and register their sub page - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSubPage(); + private function register_sub_pages() { + // first registered sub menu page MUST NOT contain a unique slug suffix. + // iterate though each sub class of the layout engine and register their sub page. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sub_page(); } } /** * Displays other Plugins from the developers. * - * @author Stefan Herndler * @since 1.5.0 */ - public function displayOtherPlugins() { - printf("

                                                                                    "); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); - echo $l_obj_Template->getContent(); + public function display_other_plugins() { + printf( '

                                                                                    ' ); + // load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); + echo wp_kses_post( $l_obj_template->get_content() ); - printf('visit Mark Cheret'); - printf("

                                                                                    "); + printf( 'visit Mark Cheret' ); + printf( '

                                                                                    ' ); - printf(''); + printf( '' ); } /** * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. * - * @author Stefan Herndler * @since 1.5.0 */ - public function getPluginMetaInformation() { - // get plugin internal name from POST data - $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; - if (empty($l_str_PluginName)) { - echo json_encode(array("error" => "Plugin name invalid.")); + public function get_plugin_meta_information() { + // TODO: add nonce verification. + + // get plugin internal name from POST data. + if ( isset( $_POST['plugin'] ) && 'true' === $_POST['plugin'] ) { + $l_str_plugin_name = santitize_option( wp_unslash( $_POST['plugin'] ) ); + } + + if ( empty( $l_str_plugin_name ) ) { + echo wp_json_encode( array( 'error' => 'Plugin name invalid.' ) ); exit; } - $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; - // call URL and collect data - $l_arr_Response = wp_remote_get($l_str_Url); - // check if response is valid - if (is_wp_error($l_arr_Response)) { - echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); + $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; + // call URL and collect data. + $l_arr_response = wp_remote_get( $l_str_url ); + // check if response is valid. + if ( is_wp_error( $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); exit; } - if (!array_key_exists("body", $l_arr_Response)) { - echo json_encode(array("error" => "Error reading WordPress API response message.")); + if ( ! array_key_exists( 'body', $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); exit; } - // get the body of the response - $l_str_Response = $l_arr_Response["body"]; - // get plugin object - $l_arr_Plugin = json_decode($l_str_Response, true); - if (empty($l_arr_Plugin)) { - echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                    URL: " . $l_str_Url . "
                                                                                    Response: " . $l_str_Response)); + // get the body of the response. + $l_str_response = $l_arr_response['body']; + // get plugin object. + $l_arr_plugin = json_decode( $l_str_response, true ); + if ( empty( $l_arr_plugin ) ) { + echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                    URL: ' . $l_str_url . '
                                                                                    Response: ' . $l_str_response ) ); exit; } - $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; - $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; - $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); + $l_int_num_ratings = array_key_exists( 'num_ratings', $l_arr_plugin ) ? intval( $l_arr_plugin['num_ratings'] ) : 0; + $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; + $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); - // return Plugin information as JSON encoded string - echo json_encode( + // return Plugin information as JSON encoded string. + echo wp_json_encode( array( - "error" => "", - "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", - "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", - "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", - "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", - "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", - "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", - "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", - "PluginRating" => $l_int_NumRatings, - "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", - "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" + 'error' => '', + 'PluginDescription' => array_key_exists( 'short_description', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['short_description'] ) : 'Error reading Plugin information', + 'PluginAuthor' => array_key_exists( 'author', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['author'] ) : 'unknown', + 'PluginRatingText' => $l_int_stars . ' ' . __( 'rating based on', 'footnotes' ) . ' ' . $l_int_num_ratings . ' ' . __( 'ratings', 'footnotes' ), + 'PluginRating1' => $l_int_stars >= 0.5 ? 'star-full' : 'star-empty', + 'PluginRating2' => $l_int_stars >= 1.5 ? 'star-full' : 'star-empty', + 'PluginRating3' => $l_int_stars >= 2.5 ? 'star-full' : 'star-empty', + 'PluginRating4' => $l_int_stars >= 3.5 ? 'star-full' : 'star-empty', + 'PluginRating5' => $l_int_stars >= 4.5 ? 'star-full' : 'star-empty', + 'PluginRating' => $l_int_num_ratings, + 'PluginLastUpdated' => array_key_exists( 'last_updated', $l_arr_plugin ) ? $l_arr_plugin['last_updated'] : 'unknown', + 'PluginDownloads' => array_key_exists( 'downloaded', $l_arr_plugin ) ? $l_arr_plugin['downloaded'] : '---', ) ); exit; diff --git a/class/layout/settings.php b/class/layout/settings.php index 940a22b..9c49ae1 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -1,12 +1,10 @@ -addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); + // Sync tab name with mirror in task.php. + $l_arr_tabs[] = $this->add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true ); - // sync tab name with mirror in public function CustomCSSMigration(): - $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); + // Sync tab name with mirror in public function custom_css_migration(). + $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true ); - $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); - $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); - $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); + $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true ); + $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true ); + $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false ); - return $l_arr_Tabs; + return $l_arr_tabs; } /** * Returns an array of all registered meta boxes for each section of the sub page. * - * @author Stefan Herndler * @since 1.5.0 * @return array * * Edited for 2.0.0 and later. * - * HyperlinkArrow meta box: + * hyperlink_arrow meta box: * @since 2.0.0 discontinued * @since 2.0.4 restored to meet user demand for arrow symbol semantics * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol @@ -136,47 +128,46 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * * @since 2.1.6 / 2.2.0 tabs reordered and renamed */ - protected function getMetaBoxes() { - $l_arr_MetaBoxes = array(); + protected function get_meta_boxes() { + $l_arr_meta_boxes = array(); - // sync box name with mirror in task.php: - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + // Sync box name with mirror in task.php. + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' ); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' ); } - $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); + $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' ); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' ); } - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' ); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction in how to use the plugin', 'footnotes' ), 'help' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' ); - return $l_arr_MetaBoxes; + return $l_arr_meta_boxes; } /** * Displays all settings for the reference container. * - * @author Stefan Herndler * @since 1.5.0 * * Completed: @@ -184,164 +175,165 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ */ - public function ReferenceContainer() { + public function reference_container() { - // options for the label element: - $l_arr_LabelElement = array( - "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for the label element. + $l_arr_label_element = array( + 'p' => __( 'paragraph', 'footnotes' ), + 'h2' => __( 'heading 2', 'footnotes' ), + 'h3' => __( 'heading 3', 'footnotes' ), + 'h4' => __( 'heading 4', 'footnotes' ), + 'h5' => __( 'heading 5', 'footnotes' ), + 'h6' => __( 'heading 6', 'footnotes' ), ); - // options for the positioning of the reference container - $l_arr_Positions = array( - "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), - "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for the positioning of the reference container. + $l_arr_positions = array( + 'post_end' => __( 'at the end of the post', 'footnotes' ), + 'widget' => __( 'in the widget area', 'footnotes' ), + 'footer' => __( 'in the footer', 'footnotes' ), ); - // basic responsive page layout options: - $l_arr_PageLayoutOptions = array( - "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Basic responsive page layout options. + $l_arr_page_layout_options = array( + 'none' => __( 'No', 'footnotes' ), + 'reference-container' => __( 'to the reference container exclusively', 'footnotes' ), + 'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ), + 'main-content' => __( 'to the main element including the post title', 'footnotes' ), ); - // options for the separating punctuation between backlinks: - $l_arr_Separators = array( - // Unicode character names are conventionally uppercase. - "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because - // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_Terminators = array( - "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): - "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the first column width (per cent is a ratio, not a unit): - $l_arr_WidthUnits = array( - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for reference container script mode: - $l_arr_ScriptMode = array( - "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), + // Options for the separating punctuation between backlinks. + $l_arr_separators = array( + // Unicode character names are conventionally uppercase. + 'comma' => __( 'COMMA', 'footnotes' ), + 'semicolon' => __( 'SEMICOLON', 'footnotes' ), + 'en_dash' => __( 'EN DASH', 'footnotes' ), + ); + // Options for the terminating punctuation after backlinks. + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. + // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_terminators = array( + 'period' => __( 'FULL STOP', 'footnotes' ), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts). + 'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ), + 'colon' => __( 'COLON', 'footnotes' ), + ); + // Options for the first column width (per cent is a ratio, not a unit). + $l_arr_width_units = array( + '%' => __( 'per cent', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'rem' => __( 'root em', 'footnotes' ), + 'em' => __( 'em', 'footnotes' ), + 'vw' => __( 'viewport width', 'footnotes' ), + ); + // Options for reference container script mode. + $l_arr_script_mode = array( + 'jquery' => __( 'jQuery', 'footnotes' ), + 'js' => __( 'plain JavaScript', 'footnotes' ), + ); + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); - "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), + 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), - "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), + 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), - "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), + 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), + 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ), - "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), - "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ), + 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ), - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), - "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), + 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), + 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), + 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), - "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), - "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), + // translators: %s: at the end of the post. + 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), - "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), + 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), + 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ), + 'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ), - "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), - "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ), + 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ), - "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), - "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ), + 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ), + 'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ), - "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), - "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ), + 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ), + 'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ), - "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), - "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), + 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), + 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), + 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), + 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), - "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), + 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), + 'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ), - "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), - "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ), + 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ), - "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ), + '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ), + 'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ), - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), - "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), - "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), - "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ), + 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ), - "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), - "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), - "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), - "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ), + 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ), + 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ), + 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ), + 'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ), - "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), - "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), - "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ), + 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ), + 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ), + 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ), + 'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ), - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), - "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), - "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ), + 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), + 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), + 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), + 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), - "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), + 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), + 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), + 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), + 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), - "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), + 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), + 'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ), + + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), + 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** @@ -349,7 +341,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * Displays all options for the footnotes numbering * Displays all options for the scrolling behavior * - * @author Stefan Herndler * @since 1.5.0 * * Edited heading 2020-12-12T1412+0100 @@ -363,221 +354,226 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ - public function StartEnd() { - // footnotes start tag short code options: - $l_arr_ShortCodeStart = array( - "((" => "((", - "(((" => "(((", - "{{" => "{{", - "{{{" => "{{{", - "[n]" => "[n]", - "[fn]" => "[fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[ref]" => "[ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + public function start_end() { + // Footnotes start tag short code options. + $l_arr_shortcode_start = array( + '((' => '((', + '(((' => '(((', + '{{' => '{{', + '{{{' => '{{{', + '[n]' => '[n]', + '[fn]' => '[fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[ref]' => '[ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), ); - // footnotes end tag short code options: - $l_arr_ShortCodeEnd = array( - "))" => "))", - ")))" => ")))", - "}}" => "}}", - "}}}" => "}}}", - "[/n]" => "[/n]", - "[/fn]" => "[/fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[/ref]" => "[/ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + // Footnotes end tag short code options. + $l_arr_shortcode_end = array( + '))' => '))', + ')))' => ')))', + '}}' => '}}', + '}}}' => '}}}', + '[/n]' => '[/n]', + '[/fn]' => '[/fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[/ref]' => '[/ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), ); - // options for the syntax validation: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + // Options for the syntax validation. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), - "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), - "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), + 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), + 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), + 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ), - "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), - "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), + 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ), + 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ), + 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), - // for script showing/hiding user defined text boxes: - "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + // For script showing/hiding user defined text boxes. + 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ), - // option to enable syntax validation, label mirrored in task.php: - "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), - "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Option to enable syntax validation, label mirrored in task.php. + 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ), + 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), + 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), - "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function Numbering() { - // define some space for the output - $l_str_Space = "     "; - // options for the combination of identical footnotes - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + /** + * TODO: what does this do? + */ + public function numbering() { + // Define some space for the output. + $l_str_space = '     '; + // Options for the combination of identical footnotes. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // options for the numbering style of the footnotes: - $l_arr_CounterStyle = array( - "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", - "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", - "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", - "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", - "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", - "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", + // Options for the numbering style of the footnotes. + $l_arr_counter_style = array( + 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', + 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', + 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', + 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', + 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', + 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), + 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ), + 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ), - // algorithmically combine identicals: - "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), - "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Algorithmically combine identicals. + 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ), + 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ), + 'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ), // Support for Ibid. notation added thanks to @meglio in . - "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function Scrolling() { + /** + * TODO: what does this do? + */ + public function scrolling() { - // options for enabling hard links for AMP compat: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + // Options for enabling hard links for AMP compat. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), - "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), + 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), + 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), - "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), - "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), + 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), + 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), - // enable hard links for AMP compat: - "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), - "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Enable hard links for AMP compat. + 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), + 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), + 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), - "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), - "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), + 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), + 'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ), - "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), - "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ), + 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ), + 'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ), - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), - "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ), + 'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ), - // enable backlink tooltips: - "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), - "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Enable backlink tooltips. + 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ), + 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ), + 'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead.', 'footnotes' ), - "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), - "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), + 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), + 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays all settings for 'I love Footnotes'. * - * @author Stefan Herndler * @since 1.5.0 * * Edited: * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 * @since 2.2.0 more options 2020-12-11T0432+0100 */ - public function Love() { - // options for the acknowledgment display in the footer: - $l_arr_Love = array( - // logo only: - "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // logo followed by heart symbol: - "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // logo preceded by heart symbol: - "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. - "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // "This website uses Footnotes." - "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the Footnotes plugin." - "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the awesome Footnotes plugin." - "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // "No display of any “Footnotes love” mention in the footer" - "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) + public function love() { + // Options for the acknowledgment display in the footer. + $l_arr_love = array( + // Logo only. + 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Logo followed by heart symbol. + 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // Logo preceded by heart symbol. + 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // translators: 2: heart symbol 1: footnotes logogram. + 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // translators: %s: Plugin logo. + 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // translators: %s: Plugin logo. + 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // translators: %s: Plugin logo. + 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + 'random' => __( 'randomly determined display of either mention', 'footnotes' ), + // translators: 1: Plugin logo.2: heart symbol. + 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), - - "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) + // translators: %s: Plugin logo. + 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), + // translators: %s: Plugin logo. + 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays the excerpt setting * - * @author Stefan Herndler * @since 1.5.0 * * Edited heading 2020-12-12T1453+0100 @@ -586,346 +582,360 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @link https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879 * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 */ - public function Excerpts() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + public function excerpts() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), - "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. - "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), + 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), + 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), + 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), + // translators: %s: link to the Advanced Excerpt Plugin. + 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays all settings for the footnote referrers * - * @author Stefan Herndler * @since 1.5.0 * * Edited heading 2020-12-12T1513+0100 * @since 2.1.1 option for superscript (optionally baseline referrers) * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 */ - public function Superscript() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + public function superscript() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // options for superscript normalize scope: - $l_arr_NormalizeSuperscript = array( - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for superscript normalize scope. + $l_arr_normalize_superscript = array( + 'no' => __( 'No', 'footnotes' ), + 'referrers' => __( 'Footnote referrers', 'footnotes' ), + 'all' => __( 'All superscript elements', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), + 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), + 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), - "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), + 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), - "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ), + 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), - "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), - "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), + 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), + 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays all settings for the footnotes mouse-over box. * - * @author Stefan Herndler * @since 1.5.2 * * Edited: * @since 2.2.0 5 parts to address increased settings number * @since 2.2.5 position settings for alternative tooltips */ - public function MouseOverBox() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + public function mouseover_box() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), - "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ), + 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ), + 'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ), - "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), - "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the name of the plugin as logogram “footnotes”. - "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), + 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), + 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), + // translators: %s: Plugin logo. + 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxPosition() { + /** + * TODO: what does this do? + */ + public function mouseover_box_position() { - // options for the Mouse-over box position - $l_arr_Position = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for the Mouse-over box position. + $l_arr_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top center' => __( 'top center', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'center right' => __( 'center right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom center' => __( 'bottom center', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), + 'center left' => __( 'center left', 'footnotes' ), ); - // options for the alternative Mouse-over box position - $l_arr_AlternativePosition = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for the alternative Mouse-over box position. + $l_arr_alternative_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), - "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), - "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ), + 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ), + 'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ), - "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ), + 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ), - "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ), + 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxDimensions() { + /** + * TODO: what does this do? + */ + public function mouseover_box_dimensions() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), - "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), - "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ), + 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ), + 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ), + 'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxTiming() { + /** + * TODO: what does this do? + */ + public function mouseover_box_timing() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), - "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ), + 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ), + 'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ), - "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), - "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ), + 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ), + 'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ), - "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), - "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ), + 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ), + 'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ), - "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), - "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ), + 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ), + 'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxTruncation() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + /** + * TODO: what does this do? + */ + public function mouseover_box_truncation() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), + 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ), + 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ), - "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), + 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ), + 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ), // The feature trims back until the last full word. - "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), - "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), + 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxText() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + /** + * TODO: what does this do? + */ + public function mouseover_box_text() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'description-delimiter' => __( '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.', 'footnotes' ), - "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), - "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ), + 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ), + 'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ), - "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), - "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ), + 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ), + 'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ), - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), - "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ), + 'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ), + 'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function MouseOverBoxAppearance() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + /** + * TODO: what does this do? + */ + public function mouseover_box_appearance() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // options for the font size unit: - $l_arr_FontSizeUnits = array( - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Options for the font size unit. + $l_arr_font_size_units = array( + 'em' => __( 'em', 'footnotes' ), + 'rem' => __( 'rem', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'pt' => __( 'points', 'footnotes' ), + 'pc' => __( 'picas', 'footnotes' ), + 'mm' => __( 'millimeters', 'footnotes' ), + '%' => __( 'per cent', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), - "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), - "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), - "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ), + 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ), + 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ), + 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ), + 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), - "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), - // To use default: Clear or leave empty. - "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), + 'color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), + // translators: %s: Clear or leave empty. + 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), - // To use default: Clear or leave empty. - "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), + 'background' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), + // translators: %s: Clear or leave empty. + 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), - "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), + 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), + 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), - "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), - // To use default: Clear or leave empty. - "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), + 'border-color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), + // translators: %s: Clear or leave empty. + 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), - "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), + 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), + 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), - "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), - // To use default: Clear or leave empty. - "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), + 'box-shadow-color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), + // translators: %s: Clear or leave empty. + 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays all settings for the prepended symbol * - * @author Stefan Herndler * @since 1.5.0 * * Edited heading for v2.0.4 @@ -937,27 +947,26 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol * @since 2.2.1 and 2.2.4 back here */ - public function HyperlinkArrow() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); - // replace all placeholders - $l_obj_Template->replace( + public function hyperlink_arrow() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), - "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), - "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), + 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow() ), + 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), + 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), + 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays the custom css box. * - * @author Stefan Herndler * @since 1.5.0 * * Edited: @@ -970,85 +979,92 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report */ - public function CustomCSS() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); - // replace all placeholders - $l_obj_Template->replace( + public function custom_css() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ), + // phpcs:disable Squiz.PHP.CommentedOutCode.Found // CSS classes are listed in the template. // Localized notices are dropped to ease translators’ task. - // "label-class-1" => ".footnote_plugin_tooltip_text", - // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + // "label-class-1" => ".footnote_plugin_tooltip_text",. + // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - // "label-class-2" => ".footnote_tooltip", - // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + // "label-class-2" => ".footnote_tooltip",. + // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - // "label-class-3" => ".footnote_plugin_index", - // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + // "label-class-3" => ".footnote_plugin_index",. + // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - // "label-class-4" => ".footnote_plugin_text", - // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) + // "label-class-4" => ".footnote_plugin_text",. + // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)). + // phpcs:enable ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function CustomCSSMigration() { + /** + * TODO: what does this do? + */ + public function custom_css_migration() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ), - "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), - "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), - "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the “Referrers and tooltips” settings tab name. - "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), + 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), + 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), + // translators: %s: Referres and tooltips. + 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } - public function CustomCSSNew() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); - // replace all placeholders - $l_obj_Template->replace( + /** + * TODO: what does this do? + */ + public function custom_css_new() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ), - "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + 'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays available Hooks to look for Footnote short codes. * - * @author Stefan Herndler * @since 1.5.5 * * Edited: @@ -1064,119 +1080,123 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 */ - public function LookupHooks() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); + public function lookup_hooks() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' ); - // replace all placeholders - $l_obj_Template->replace( + // Replace all placeholders. + $l_obj_template->replace( array( + 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), + // translators: 1: 99 2: 1200. + 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), + // translators: 1: PHP_INT_MAX 2: 0 3: -1 4: 'PHP_INT_MAX'. + 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), + 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), - "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), - "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'head-hook' => __( 'WordPress hook function name', 'footnotes' ), + 'head-checkbox' => __( 'Activate', 'footnotes' ), + 'head-numbox' => __( 'Priority level', 'footnotes' ), + 'head-url' => __( 'WordPress documentation', 'footnotes' ), - "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), + 'the-title' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), + 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', - "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), - "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), - "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", + 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), + 'the-content' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), + 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', - "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), - "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), - "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", + 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), + 'the-excerpt' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), + 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', - "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), - "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), - "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", + 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), + 'widget-title' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), + 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', - "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), - "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), - "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", - - "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), - "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), - "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", + 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), + 'widget-text' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), + 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays a short introduction of the Plugin. * - * @author Stefan Herndler * @since 1.5.0 */ public function Help() { - global $g_obj_MCI_Footnotes; - // load footnotes starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + global $g_obj_mci_footnotes; + // Load footnotes starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { - // load user defined starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) { + // Load user defined starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". - " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". - " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". - " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". - " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - . $l_arr_Footnote_EndingTag["value"] . " World!"; + $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo dolores ' . + 'et ea rebum. Stet clita kasd gubergren, no sea ' . + 'takimata sanctus est Lorem ipsum dolor sit amet. ' . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo ' . + 'dolores et ea rebum. Stet clita kasd gubergren, no ' . + 'sea takimata sanctus est Lorem ipsum dolor sit amet.' . + $l_arr_footnote_ending_tag['value'] . ' World!'; - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); - // replace all placeholders - $l_obj_Template->replace( + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "start" => $l_arr_Footnote_StartingTag["value"], - - "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "end" => $l_arr_Footnote_EndingTag["value"], - - "example-code" => $l_str_Example, - "example-string" => "
                                                                                    " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), - - "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') + 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), + 'start' => $l_arr_footnote_starting_tag['value'], + 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), + 'end' => $l_arr_footnote_ending_tag['value'], + 'example-code' => $l_str_example, + 'example-string' => '
                                                                                    ' . __( 'will be displayed as:', 'footnotes' ), + 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), + // translators: 1: 2: . + 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), ) ); - // call wp_head function to get the Styling of the mouse-over box - $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Call wp_head function to get the Styling of the mouse-over box. + $g_obj_mci_footnotes->a_obj_task->wp_head(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Displays all Donate button to support the developers. * - * @author Stefan Herndler * @since 1.5.0 */ - public function Donate() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); - // replace all placeholders - $l_obj_Template->replace( + public function donate() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' ); + // Replace all placeholders. + $l_obj_template->replace( array( - "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + 'caption' => __( 'Donate now', 'footnotes' ), ) ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); + // Display template with replaced placeholders. + echo wp_kses_post( $l_obj_template->get_content() ); } } From 078781b000d2ad82fad9989c6fca1c62f85a0ad8 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:15:58 +0000 Subject: [PATCH 025/144] Explictly pass `false` argument to `wp_enqueue_script()`. Not doing so will result in a `WordPress.WP.EnqueuedResourceParameters.NotInFooter` warning from PHPCS. --- class/init.php | 1 + 1 file changed, 1 insertion(+) diff --git a/class/init.php b/class/init.php index d21ca5a..51b3bc1 100644 --- a/class/init.php +++ b/class/init.php @@ -222,6 +222,7 @@ class MCI_Footnotes { plugins_url( 'footnotes/js/jquery.tools.min.js' ), array(), '1.2.7.redacted.2', + false ); /** From a7b4d965d791a1fb2f9448966c1eb8c51b462d53 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:16:15 +0000 Subject: [PATCH 026/144] Commit composer lockfile --- composer.lock | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..9e0ee7c --- /dev/null +++ b/composer.lock @@ -0,0 +1,196 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3a147d50695956de52f7cbf827b47830", + "packages": [], + "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "time": "2020-05-13T23:57:56+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} From 5411e4b279cf58853b84f8f5edabbb4185a631e0 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:17:14 +0000 Subject: [PATCH 027/144] Replace `wp_remote_get()` with PHPCS disable. --- class/template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/class/template.php b/class/template.php index d438748..4a6bff1 100644 --- a/class/template.php +++ b/class/template.php @@ -162,7 +162,9 @@ class MCI_Footnotes_Template { * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). */ public function process_template( $template ) { - $this->a_str_original_content = preg_replace( '##s', '', wp_remote_get( $template ) ); + // phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + $this->a_str_original_content = preg_replace( '##s', '', file_get_contents( $template ) ); + // phpcs:enable $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); From 716b213fb8129a3fa5887971ad5f7d2420e89562 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:44:27 +0000 Subject: [PATCH 028/144] Replace incorrect option sanitisation function --- class/layout/abstract-engine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index 065f563..813bf61 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -235,7 +235,7 @@ abstract class MCI_Footnotes_Layout_Engine { // Get the current section. reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_option( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; // Store settings. From fa8fb3f2072a7ca42649f78a1ce53eb20eee28be Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:45:33 +0000 Subject: [PATCH 029/144] Remove output escaping functions --- class/layout/settings.php | 104 ++++++++++++++++++++++++++------------ 1 file changed, 73 insertions(+), 31 deletions(-) diff --git a/class/layout/settings.php b/class/layout/settings.php index 9c49ae1..0b7ddac 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -333,7 +333,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -422,7 +424,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -463,7 +467,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -520,7 +526,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -568,7 +576,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -602,7 +612,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -649,7 +661,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -687,7 +701,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -738,7 +754,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -760,7 +778,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -793,7 +813,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -826,7 +848,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -864,7 +888,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -900,12 +926,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), - 'color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), + 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), // translators: %s: Clear or leave empty. 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), - 'background' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), + 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), // translators: %s: Clear or leave empty. 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), @@ -914,7 +940,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), - 'border-color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), + 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), // translators: %s: Clear or leave empty. 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), @@ -923,14 +949,16 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), - 'box-shadow-color' => $this->addColorSelection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), + 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), // translators: %s: Clear or leave empty. 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -954,14 +982,16 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { $l_obj_template->replace( array( 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), - 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow() ), + 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ), 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1008,7 +1038,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1040,7 +1072,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1059,7 +1093,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1100,33 +1136,35 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'head-url' => __( 'WordPress documentation', 'footnotes' ), 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), - 'the-title' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), + 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), - 'the-content' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), + 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), - 'the-excerpt' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), + 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), - 'widget-title' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), + 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), - 'widget-text' => $this->addCheckbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), + 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1179,7 +1217,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Call wp_head function to get the Styling of the mouse-over box. $g_obj_mci_footnotes->a_obj_task->wp_head(); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** @@ -1197,6 +1237,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } } From 494a116a62e00aaea697d65bc44544d9b18fec65 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:58:26 +0000 Subject: [PATCH 030/144] Clarify double-wildcard instructions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 375cb0c..f55c285 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor - Add the `-n` flag to ignore warnings (i.e., show only errors) - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` + - You may have to enable double-wildcards in your console first (`shopt -s globstar`) ## Updating Documentation From 87f2ed4f5cf4b4dad6a1659d9fc5788ae3947f22 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:59:12 +0000 Subject: [PATCH 031/144] Disable missing nonce errors/warnings for now --- class/layout/abstract-engine.php | 6 ++++++ class/layout/init.php | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index 813bf61..fae5af2 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -223,6 +223,8 @@ abstract class MCI_Footnotes_Layout_Engine { wp_enqueue_style( 'mci-footnotes-admin' ); } + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing /** * Displays the content of specific sub page. * @@ -291,7 +293,10 @@ abstract class MCI_Footnotes_Layout_Engine { echo '});'; echo ''; } + // phpcs:enable + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing /** * Save all Plugin settings. * @@ -319,6 +324,7 @@ abstract class MCI_Footnotes_Layout_Engine { // Update settings. return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); } + // phpcs:enable /** * Output the Description of a section. May be overwritten in any section. diff --git a/class/layout/init.php b/class/layout/init.php index 59f1c3c..c4198df 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -138,6 +138,7 @@ class MCI_Footnotes_Layout_Init { printf( '' ); } + // phpcs:disable WordPress.Security.NonceVerification.Missing /** * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. * @@ -147,8 +148,8 @@ class MCI_Footnotes_Layout_Init { // TODO: add nonce verification. // get plugin internal name from POST data. - if ( isset( $_POST['plugin'] ) && 'true' === $_POST['plugin'] ) { - $l_str_plugin_name = santitize_option( wp_unslash( $_POST['plugin'] ) ); + if ( isset( $_POST['plugin'] ) ) { + $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); } if ( empty( $l_str_plugin_name ) ) { @@ -199,4 +200,5 @@ class MCI_Footnotes_Layout_Init { ); exit; } + // phpcs:enable } From 526b5d096f7113984453246d6aabbf9ada6a381b Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:59:52 +0000 Subject: [PATCH 032/144] Minor whitespace, commenting tweaks --- class/init.php | 1 + class/settings.php | 54 +++++++++++++++++++++++----------------------- class/task.php | 4 +--- class/template.php | 12 +++++------ 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/class/init.php b/class/init.php index 51b3bc1..7d84c99 100644 --- a/class/init.php +++ b/class/init.php @@ -209,6 +209,7 @@ class MCI_Footnotes { * see full header in js/jquery.tools.js. * * Add versioning. + * * @since 2.1.2 * @date 2020-11-18T2150+0100 * diff --git a/class/settings.php b/class/settings.php index 593302e..2dd59ba 100644 --- a/class/settings.php +++ b/class/settings.php @@ -533,26 +533,26 @@ class MCI_Footnotes_Settings { // Backlink typography. const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled'; - const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option'; - const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom'; + const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option'; + const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom'; const C_STR_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled'; - const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option'; - const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom'; + const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option'; + const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom'; // Backlink layout. const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled'; - const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar'; - const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit'; + const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar'; + const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit'; const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_max_width_enabled'; - const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar'; - const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit'; + const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar'; + const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit'; const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled'; // Tooltip font size. // Called mouse over box not tooltip for consistency. const C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled'; - const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar'; - const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit'; + const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar'; + const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit'; // Page layout support. const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support'; @@ -617,7 +617,7 @@ class MCI_Footnotes_Settings { const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y'; const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width'; - const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element'; + const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element'; const C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border'; /** @@ -644,7 +644,7 @@ class MCI_Footnotes_Settings { */ const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin'; const C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin'; - const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable'; + const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable'; const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug'; const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug'; const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator'; @@ -818,9 +818,9 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no', + 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 => '+', @@ -828,14 +828,14 @@ class MCI_Footnotes_Settings { self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, // 2.5.4 fast-tracked. - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', 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_REFERENCE_CONTAINER_COLLAPSE => 'no', self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', @@ -859,15 +859,15 @@ class MCI_Footnotes_Settings { // Backlink separators and terminators are often not preferred.. // But a choice must be provided along with the ability to customize. - self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes', + 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_ENABLED => 'no', self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', // Set backlinks column width. - self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', @@ -877,18 +877,18 @@ class MCI_Footnotes_Settings { self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', // Whether a
                                                                                    tag is inserted. - self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', // Whether to enable URL line wrapping. - self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', // Whether to use link elements. - self::C_STR_LINK_ELEMENT_ENABLED => 'yes', + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', // Excerpt should be disabled. - self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', + self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', - self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', self::C_STR_FOOTNOTES_LOVE => 'no', @@ -906,7 +906,7 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', @@ -954,7 +954,7 @@ class MCI_Footnotes_Settings { // Tooltip font size reset to legacy by default since 2.1.4;. // Was set to inherit since 2.1.1 as it overrode custom CSS,. // Is moved to settings since 2.1.4 2020-12-04T1023+0100. - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + 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', @@ -1024,7 +1024,7 @@ class MCI_Footnotes_Settings { 'footnotes_storage_custom_css' => array( self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_STR_CUSTOM_CSS_NEW => '', ), diff --git a/class/task.php b/class/task.php index 7fc22f1..d24c403 100644 --- a/class/task.php +++ b/class/task.php @@ -908,7 +908,6 @@ class MCI_Footnotes_Task { * @date 2020-12-18T1113+0100 */ if ( ! self::$a_bool_alternative_tooltips_enabled ) { - /* * jQuery tooltips. */ @@ -919,7 +918,6 @@ class MCI_Footnotes_Task { echo "}\r\n"; } else { - /* * Alternative tooltips. */ @@ -954,7 +952,7 @@ class MCI_Footnotes_Task { /** * Alternative tooltip timing. * - * jQuery tooltip timing @see templates/public/tooltip.html. + * For jQuery tooltip timing @see templates/public/tooltip.html. */ echo ' .footnote_tooltip.shown {'; $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); diff --git a/class/template.php b/class/template.php index 4a6bff1..3a81216 100644 --- a/class/template.php +++ b/class/template.php @@ -7,7 +7,7 @@ * @since 1.5.0 14.09.14 10:58 * * @lastmodified 2021-02-22T1416+0100 - * + * * @since 2.2.6 Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * @since 2.5.0 Adding: Templates: Enable template location stack, thanks to @misfist code contribution. */ @@ -68,12 +68,12 @@ class MCI_Footnotes_Template { * @param string $p_str_file_type Template file type (take a look on the Class constants). * @param string $p_str_file_name Template file name inside the Template directory without the file extension. * @param string $p_str_extension Optional Template file extension (default: html). - * + * * - Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - * + * * @since 2.2.6 * @date 2020-12-19T0606+0100 - * + * * @reporter @misfist * @link https://wordpress.org/support/topic/template-override-filter/ */ @@ -176,12 +176,12 @@ class MCI_Footnotes_Template { /** * Get the template. - * + * * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. * * @since 2.4.0d3 Contribution. * @since 2.5.0 Release. - * + * * @contributor @misfist * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 * From b5dc136ffe2906d0d86bb30b8499631070e9e4b0 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 18:13:52 +0000 Subject: [PATCH 033/144] Replace escape output functions --- class/layout/abstract-engine.php | 4 ++-- class/layout/diagnostics.php | 8 +++++--- class/layout/init.php | 4 +++- class/task.php | 6 ++++-- class/widgets/reference-container.php | 4 +++- class/wysiwyg.php | 4 +++- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index fae5af2..e624aaf 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -310,12 +310,12 @@ abstract class MCI_Footnotes_Layout_Engine { // Get current section. reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_option( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { if ( array_key_exists( $l_str_key, $_POST ) ) { - $l_arr_new_settings[ $l_str_key ] = sanitize_option( wp_unslash( $_POST[ $l_str_key ] ) ); + $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); } else { // Setting is not defined in the POST array, define it to avoid the Default value. $l_arr_new_settings[ $l_str_key ] = ''; diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php index 55b37b6..552c4e7 100644 --- a/class/layout/diagnostics.php +++ b/class/layout/diagnostics.php @@ -102,12 +102,12 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine { if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { die; } else { - $l_str_server_name = wp_kses_post( wp_unslash( $_SERVER['SERVER_NAME'] ) ); + $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); } if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { die; } else { - $l_str_http_user_agent = wp_kses_post( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); } // Replace all placeholders. @@ -140,7 +140,9 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine { 'plugins' => $l_str_wordpress_plugins, ) ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped // Display template with replaced placeholders. - echo wp_kses_post( $l_obj_template->get_content() ); + echo $l_obj_template->get_content(); + // phpcs:enable } } diff --git a/class/layout/init.php b/class/layout/init.php index c4198df..975fb5e 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -130,7 +130,9 @@ class MCI_Footnotes_Layout_Init { printf( '

                                                                                    ' ); // load template file. $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable printf( 'visit Mark Cheret' ); printf( '

                                                                                    ' ); diff --git a/class/task.php b/class/task.php index d24c403..e2602cc 100644 --- a/class/task.php +++ b/class/task.php @@ -1032,7 +1032,9 @@ class MCI_Footnotes_Task { */ public function wp_footer() { if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - echo wp_kses_post( $this->reference_container() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $this->reference_container(); + // phpcs:enable } // Get setting for love and share this plugin. $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); @@ -1078,7 +1080,7 @@ class MCI_Footnotes_Task { $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); break; } - echo sprintf( '
                                                                                    %s
                                                                                    ', wp_kses_post( $l_str_love_me_text ) ); + echo sprintf( '
                                                                                    %s
                                                                                    ', esc_html( $l_str_love_me_text ) ); } /** diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index e1fc4be..16c0af2 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -72,7 +72,9 @@ class MCI_Footnotes_Widget_Reference_Container extends MCI_Footnotes_Widget_Base global $g_obj_mci_footnotes; // Reference container positioning is set to "widget area". if ( 'widget' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - echo wp_kses_post( $g_obj_mci_footnotes->a_obj_task->Reference_Container() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $g_obj_mci_footnotes->a_obj_task->Reference_Container(); + // phpcs:enable } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 90fb108..671a2d3 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -49,7 +49,9 @@ class MCI_Footnotes_WYSIWYG { */ public static function new_plain_text_editor_button() { $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'editor-button' ); - echo wp_kses_post( $l_obj_template->get_content() ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** From 63803e147b9ccf657d18e3e58a694c8eabe5cf8a Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 20:13:38 +0100 Subject: [PATCH 034/144] Merge docblock restore attributions class/init.php Merge deleted docblock attributions in remaining docblock. --- class/init.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/class/init.php b/class/init.php index 7d84c99..25be0ce 100644 --- a/class/init.php +++ b/class/init.php @@ -229,7 +229,38 @@ class MCI_Footnotes { /** * Enqueues some jQuery UI libraries registered by WordPress. * - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * + * @reporter @rajinderverma + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/ + * + * @reporter @ericcorbett2 + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 + * + * @reporter @honlapdavid + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 + * + * Fetch jQuery UI from cdnjs.cloudflare.com. + * @since 2.0.0 + * @date 2020-10-26T1907+0100 + * @contributor @vonpiernik + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 + * + * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. + * + * @since 2.0.4 + * @date 2020-11-01T1902+0100 + * @reporter @check2020de + * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ + * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui + * * If alternative tooltips are enabled, these libraries are not needed. */ wp_enqueue_script( 'jquery-ui-core' ); From b44071e8d67be7d846636d091b87f5355e7c5cf0 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 20:33:14 +0100 Subject: [PATCH 035/144] Update readme.txt item reflected in class.init.php Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. Under 2.0.4. --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 766ed9d..72304f3 100755 --- a/readme.txt +++ b/readme.txt @@ -326,7 +326,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.4 = - Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: GDPR: Add jQuery UI from WordPress instead of third party. +- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - Bugfix: Reference container: remove inconvenient left/right cellpadding. - Bugfix: Tooltips: improve layout with inherited font size by lower line height. From 1c2afab4b3abeeba222ee302de753363796879c6 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 20:56:06 +0100 Subject: [PATCH 036/144] Change variable names conventional class/init.php Name variables in an intuitive manner according to coding conventions. --- class/init.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/class/init.php b/class/init.php index 25be0ce..66bb141 100644 --- a/class/init.php +++ b/class/init.php @@ -315,15 +315,15 @@ class MCI_Footnotes { // Set tooltip mode for use in stylesheet name. if ( self::$a_bool_tooltips_enabled ) { if ( self::$a_bool_alternative_tooltips_enabled ) { - $l_str_tooltip_mode = 'al'; - $l_str_tcomplement = 'ternative-tooltips'; + $l_str_tooltip_mode_short = 'al'; + $l_str_tooltip_mode_rest = 'ternative-tooltips'; } else { - $l_str_tooltip_mode = 'jq'; - $l_str_tcomplement = 'uery-tooltips'; + $l_str_tooltip_mode_short = 'jq'; + $l_str_tooltip_mode_rest = 'uery-tooltips'; } } else { - $l_str_tooltip_mode = 'no'; - $l_str_tcomplement = '-tooltips'; + $l_str_tooltip_mode_short = 'no'; + $l_str_tooltip_mode_rest = '-tooltips'; } // Set basic responsive page layout mode for use in stylesheet name. @@ -346,9 +346,9 @@ class MCI_Footnotes { // Enqueue the tailored united minified stylesheet. wp_enqueue_style( - 'mci-footnotes-' . $l_str_tooltip_mode . $l_str_tcomplement . '-pagelayout-' . $l_str_page_layout_option, + 'mci-footnotes-' . $l_str_tooltip_mode_short . $l_str_tooltip_mode_rest . '-pagelayout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode . 'ttbrpl' . $l_str_layout_mode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, From cb43a1f6be20dbac8902d20579d1d81de098a9de Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 21:14:45 +0100 Subject: [PATCH 037/144] Restore compiler keyword in class/language.php --- class/language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/language.php b/class/language.php index cb6b750..e01bf7b 100644 --- a/class/language.php +++ b/class/language.php @@ -44,7 +44,7 @@ class MCI_Footnotes_Language { * @link https://wordpress.org/support/topic/error-missing-parameter-if-using-php-7-1-or-later/ * * Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error. - * “Fatal error: Uncaught Argument_count_error: Too few arguments to function apply_filters()” + * “Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters()” * * Yet get_locale() is defined w/o parameters in wp-includes/l10n.php:30, and * apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugin.php:181. From f1e40bb3e44d75eee3d73bce18947dfe2c764f4f Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 23:01:48 +0100 Subject: [PATCH 038/144] Update header footnotes.php Fix header docblock as discussed in https://github.com/markcheret/footnotes/pull/38#discussion_r581415367 --- footnotes.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/footnotes.php b/footnotes.php index a03d37a..20f0b7a 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,20 +1,18 @@ Date: Tue, 23 Feb 2021 23:05:05 +0100 Subject: [PATCH 039/144] Delete committer tag in footnotes.php --- footnotes.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/footnotes.php b/footnotes.php index 20f0b7a..39c6932 100755 --- a/footnotes.php +++ b/footnotes.php @@ -19,8 +19,7 @@ * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-02-20T1911+0100 - * @committer @pewgeuges + * @lastmodified 2021-02-23T2304+0100 */ define( 'C_STR_FOOTNOTES_VERSION', '2.5.6' ); From d64e75eac99b3809c027ae232b4b2db5140ed883 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Tue, 23 Feb 2021 23:45:01 +0100 Subject: [PATCH 040/144] Fix line comments in class/layout/init.php --- class/layout/init.php | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/class/layout/init.php b/class/layout/init.php index 975fb5e..b5c1e6b 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -56,7 +56,7 @@ class MCI_Footnotes_Layout_Init { // Register hooks/actions. add_action( 'admin_init', array( $this, 'initialize_settings' ) ); add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); - // register AJAX callbacks for Plugin information. + // Register AJAX callbacks for Plugin information. add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); } @@ -68,7 +68,7 @@ class MCI_Footnotes_Layout_Init { */ public function initialize_settings() { MCI_Footnotes_Settings::instance()->register_settings(); - // iterate though each sub class of the layout engine and register their sections. + // Iterate though each sub class of the layout engine and register their sections. foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { $l_obj_layout_engine_sub_class->register_sections(); } @@ -83,11 +83,11 @@ class MCI_Footnotes_Layout_Init { */ public function register_main_menu() { global $menu; - // iterate through each main menu. + // Iterate through each main menu. foreach ( $menu as $l_arr_main_menu ) { - // iterate through each main menu attribute. + // 3terate through each main menu attribute. foreach ( $l_arr_main_menu as $l_str_attribute ) { - // main menu already added, append sub pages and stop. + // Main menu already added, append sub pages and stop. if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { $this->register_sub_pages(); return; @@ -95,15 +95,15 @@ class MCI_Footnotes_Layout_Init { } } - // add a new main menu page to the WordPress dashboard. + // Add a new main menu page to the WordPress dashboard. add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title. - self::C_STR_MAIN_MENU_TITLE, // menu title. - 'manage_options', // capability. - self::C_STR_MAIN_MENU_SLUG, // menu slug. - array( $this, 'display_other_plugins' ), // function. - plugins_url( 'footnotes/img/main-menu.png' ), // icon url. - null // position. + self::C_STR_MAIN_MENU_TITLE, // Page title. + self::C_STR_MAIN_MENU_TITLE, // Menu title. + 'manage_options', // Capability. + self::C_STR_MAIN_MENU_SLUG, // Menu slug. + array( $this, 'display_other_plugins' ), // Function. + plugins_url( 'footnotes/img/main-menu.png' ), // Icon URL. + null // Position. ); $this->register_sub_pages(); } @@ -114,8 +114,8 @@ class MCI_Footnotes_Layout_Init { * @since 1.5.0 */ private function register_sub_pages() { - // first registered sub menu page MUST NOT contain a unique slug suffix. - // iterate though each sub class of the layout engine and register their sub page. + // First registered sub menu page MUST NOT contain a unique slug suffix. + // Iterate though each sub class of the layout engine and register their sub page. foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { $l_obj_layout_engine_sub_class->register_sub_page(); } @@ -128,7 +128,7 @@ class MCI_Footnotes_Layout_Init { */ public function display_other_plugins() { printf( '

                                                                                    ' ); - // load template file. + // Load template file. $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped echo $l_obj_template->get_content(); @@ -149,7 +149,7 @@ class MCI_Footnotes_Layout_Init { public function get_plugin_meta_information() { // TODO: add nonce verification. - // get plugin internal name from POST data. + // Get plugin internal name from POST data. if ( isset( $_POST['plugin'] ) ) { $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); } @@ -159,9 +159,9 @@ class MCI_Footnotes_Layout_Init { exit; } $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; - // call URL and collect data. + // Call URL and collect data. $l_arr_response = wp_remote_get( $l_str_url ); - // check if response is valid. + // Check if response is valid. if ( is_wp_error( $l_arr_response ) ) { echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); exit; @@ -170,9 +170,9 @@ class MCI_Footnotes_Layout_Init { echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); exit; } - // get the body of the response. + // Get the body of the response. $l_str_response = $l_arr_response['body']; - // get plugin object. + // Get plugin object. $l_arr_plugin = json_decode( $l_str_response, true ); if ( empty( $l_arr_plugin ) ) { echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                    URL: ' . $l_str_url . '
                                                                                    Response: ' . $l_str_response ) ); @@ -183,7 +183,7 @@ class MCI_Footnotes_Layout_Init { $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); - // return Plugin information as JSON encoded string. + // Return Plugin information as JSON encoded string. echo wp_json_encode( array( 'error' => '', From b339fd949f3eab27b5851f91df5f104c152dfe14 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 24 Feb 2021 08:51:24 +0000 Subject: [PATCH 041/144] Add @package tag to header --- footnotes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/footnotes.php b/footnotes.php index 39c6932..dfaf104 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,5 +1,4 @@ - Date: Wed, 24 Feb 2021 11:49:08 +0100 Subject: [PATCH 042/144] Fix&dispatch docblock h. class/layout/settings.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix 2 function docblock headings by dispatching them from the originally single metabox function docblock. Also add version tags to the 2 metaboxes split off @since 2.2.0. * Displays all options for the footnotes start and end tag short codes. (Initially called “Footnotes styling”.) * Displays all options for the footnotes numbering. (Newly individualized.) * Displays all options for the scrolling behavior. (Totally new as scroll offset and duration were initially hard-coded in the template.) (This is part of WP coding standard compliance.) --- class/layout/settings.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/class/layout/settings.php b/class/layout/settings.php index 0b7ddac..638b2ce 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -339,9 +339,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays all options for the footnotes start and end tag short codes - * Displays all options for the footnotes numbering - * Displays all options for the scrolling behavior + * Displays all options for the footnotes start and end tag short codes. * * @since 1.5.0 * @@ -430,7 +428,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays all options for the footnotes numbering. + * + * @since 2.2.0 */ public function numbering() { // Define some space for the output. @@ -473,7 +473,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays all options for the scrolling behavior. + * + * @since 2.2.0 */ public function scrolling() { From 0dfe2ad4d0482dc4faccb46704a39472d5c5f41f Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 12:11:32 +0100 Subject: [PATCH 043/144] Fix translator comments class/layout/settings.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Titlecase “Translators:”. Add semicolons. --- class/layout/settings.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/class/layout/settings.php b/class/layout/settings.php index 638b2ce..d933521 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -258,7 +258,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), - // translators: %s: at the end of the post. + // Translators: %s: at the end of the post. 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), @@ -406,7 +406,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), // For script showing/hiding user defined text boxes. - 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, @@ -551,16 +551,16 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), // Logo preceded by heart symbol. 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // translators: 2: heart symbol 1: footnotes logogram. + // Translators: 2: heart symbol 1: footnotes logogram. 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), 'random' => __( 'randomly determined display of either mention', 'footnotes' ), - // translators: 1: Plugin logo.2: heart symbol. + // Translators: 1: Plugin logo.2: heart symbol. 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), ); @@ -569,10 +569,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Replace all placeholders. $l_obj_template->replace( array( - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), ) @@ -609,7 +609,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), - // translators: %s: link to the Advanced Excerpt Plugin. + // Translators: %s: link to the Advanced Excerpt Plugin. 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), ) ); @@ -697,7 +697,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), - // translators: %s: Plugin logo. + // Translators: %s: Plugin logo. 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) @@ -929,12 +929,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), - // translators: %s: Clear or leave empty. + // Translators: %s: Clear or leave empty. 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), - // translators: %s: Clear or leave empty. + // Translators: %s: Clear or leave empty. 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), @@ -943,7 +943,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), - // translators: %s: Clear or leave empty. + // Translators: %s: Clear or leave empty. 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), @@ -952,7 +952,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), - // translators: %s: Clear or leave empty. + // Translators: %s: Clear or leave empty. 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), ) @@ -1068,7 +1068,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), - // translators: %s: Referres and tooltips. + // Translators: %s: Referres and tooltips. 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), ) @@ -1126,9 +1126,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { $l_obj_template->replace( array( 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), - // translators: 1: 99 2: 1200. + // Translators: 1: 99; 2: 1200. 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), - // translators: 1: PHP_INT_MAX 2: 0 3: -1 4: 'PHP_INT_MAX'. + // Translators: 1: PHP_INT_MAX; 2: 0; 3: -1; 4: 'PHP_INT_MAX'. 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), @@ -1212,7 +1212,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'example-code' => $l_str_example, 'example-string' => '
                                                                                    ' . __( 'will be displayed as:', 'footnotes' ), 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), - // translators: 1: 2: . + // Translators: 1: ; 2: . 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), ) ); From 4f666f1300e90bb103982ffd51f4de74a843198f Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 12:26:31 +0100 Subject: [PATCH 044/144] Docblocks for tooltips class/layout/settings.php Headings and version for split-off metaboxes docblocks. Overwrites the todo items. Thanks for starting the docblocks required by WP coding standards. --- class/layout/settings.php | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/class/layout/settings.php b/class/layout/settings.php index d933521..fb25f88 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -584,7 +584,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays the excerpt setting + * Displays the excerpt setting. * * @since 1.5.0 * @@ -620,7 +620,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays all settings for the footnote referrers + * Displays all settings for the footnote referrers. * * @since 1.5.0 * @@ -669,7 +669,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays all settings for the footnotes mouse-over box. + * Displays enabled status for the footnotes mouse-over box. * * @since 1.5.2 * @@ -709,7 +709,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays position settings for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_position() { @@ -762,7 +764,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays dimensions setting for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_dimensions() { @@ -786,7 +790,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays timing settings for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_timing() { @@ -821,7 +827,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays truncation settings for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_truncation() { // Options for Yes/No select box. @@ -856,7 +864,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays dedicated tooltip text settings for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_text() { // Options for Yes/No select box. @@ -896,7 +906,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays style settings for the footnotes mouse-over box. + * + * @since 2.2.0 */ public function mouseover_box_appearance() { // Options for Yes/No select box. From bd00fc348f194213e4860e0124854121202e4fe5 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 12:52:32 +0100 Subject: [PATCH 045/144] Same as previous. class/layout/settings.php --- class/layout/settings.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/class/layout/settings.php b/class/layout/settings.php index fb25f88..c775e22 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -976,7 +976,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays all settings for the prepended symbol + * Displays all settings for the backlink symbol. * * @since 1.5.0 * @@ -1009,7 +1009,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * Displays the custom css box. + * Displays the Custom CSS box. * * @since 1.5.0 * @@ -1058,7 +1058,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays transitional legacy Custom CSS box. + * + * @since 2.2.2 */ public function custom_css_migration() { @@ -1092,7 +1094,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { } /** - * TODO: what does this do? + * Displays the new Custom CSS box. + * + * @since 2.2.2 */ public function custom_css_new() { // Load template file. From 3f3569904758d8a1d6bb6b3e6c751e07540efdbc Mon Sep 17 00:00:00 2001 From: pewgeuges Date: Wed, 24 Feb 2021 14:36:48 +0100 Subject: [PATCH 046/144] Fix function name in docblock --- class/hooks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/class/hooks.php b/class/hooks.php index 8a0a42a..7254d9f 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -51,8 +51,9 @@ class MCI_Footnotes_Hooks { * * @since 1.5.0 * - * Edit: Clear_all didn’t actually work. - * @since 2.2.0 this function is not called any longer when deleting the plugin + * @since 2.2.0 this function is not called any longer when deleting the plugin. + * Note: clear_all() didn’t actually work. + * @see class/settings.php */ public static function uninstall_plugin() { // WordPress User has to be logged in. From c1e5e0b33a631691d858b3eb7f334246fb4837b9 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 16:28:34 +0100 Subject: [PATCH 047/144] Update contribution URL class/init.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The historic repo where @felipelavinz contributed has recently been moved. As a consequence the commit’s URL needs to be updated. But the original URL is maintained below under the commit date. --- class/init.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/class/init.php b/class/init.php index 66bb141..0a2d8c0 100644 --- a/class/init.php +++ b/class/init.php @@ -4,9 +4,10 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:56 + * @since 1.5.0 + * @date 12.09.14 10:56 * - * @lastmodified 2021-02-19T2031+0100 + * @lastmodified 2021-02-24T1617+0100 * * @since 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. * @since 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. @@ -67,13 +68,14 @@ class MCI_Footnotes { * * @since 1.5.0 * - * * - Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. * * @since 1.6.5 * * @contributor @felipelavinz - * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + * @link https://github.com/benleyjyc/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 2021-02-24T1613+0100 + * @date 2020-02-25 + * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 2020-02-25 * * @see self::initialize_widgets() */ @@ -103,7 +105,6 @@ class MCI_Footnotes { * * @since 1.5.0 * - * * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution * * @since 1.6.5 From 3540815ba78a8885aa54ab25eb9a84510268ee00 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 17:11:41 +0100 Subject: [PATCH 048/144] Small edits. --- class/init.php | 4 ++-- class/language.php | 2 +- class/layout/abstract-engine.php | 3 ++- class/task.php | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/class/init.php b/class/init.php index 0a2d8c0..e72ce3f 100644 --- a/class/init.php +++ b/class/init.php @@ -73,9 +73,9 @@ class MCI_Footnotes { * @since 1.6.5 * * @contributor @felipelavinz - * @link https://github.com/benleyjyc/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 2021-02-24T1613+0100 + * @link https://github.com/benleyjyc/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 * @date 2020-02-25 - * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 2020-02-25 + * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 * * @see self::initialize_widgets() */ diff --git a/class/language.php b/class/language.php index e01bf7b..ea56423 100644 --- a/class/language.php +++ b/class/language.php @@ -53,7 +53,7 @@ class MCI_Footnotes_Language { * But apply_filters() is defined with a 3rd parameter (and w/o the first one) in * wp-includes/class-wp-hook.php:264, as public function apply_filters( $value, $args ). * - * Taking it all together, probably the full function definition would be. + * Taking it all together, probably the full function definition would be * public function apply_filters( $tag, $value, $args ). * In the case of get_locale(), $args is empty. * diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index e624aaf..af46961 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -4,7 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:56 + * @since 1.5.0 + * @date 12.09.14 10:56 * * @since 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100 * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100 diff --git a/class/task.php b/class/task.php index e2602cc..d56640a 100644 --- a/class/task.php +++ b/class/task.php @@ -482,7 +482,7 @@ class MCI_Footnotes_Task { * 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 - * (Web_kit) don’t allow it, so we must resort to -1. + * (WebKit) don’t allow it, so we must resort to -1. * @link https://github.com/Modernizr/Modernizr/issues/171 */ From 0dc5f23123231465b675c4872b637ec2070dacb4 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 18:02:16 +0100 Subject: [PATCH 049/144] Fix internal script. --- class/task.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/class/task.php b/class/task.php index d56640a..da4ae9f 100644 --- a/class/task.php +++ b/class/task.php @@ -1005,21 +1005,26 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified. + * The script for alternative tooltips is printed formatted, not minified, + * for transparency. It isn’t indented though (the PHP open tag neither). */ if ( self::$a_bool_alternative_tooltips_enabled ) { + + // Start internal script. ?> - Date: Wed, 24 Feb 2021 21:53:17 +0000 Subject: [PATCH 050/144] Remove @lastmodified tag, datetime from @since tag --- class/template.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/class/template.php b/class/template.php index 3a81216..fd716d6 100644 --- a/class/template.php +++ b/class/template.php @@ -4,9 +4,7 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 10:58 - * - * @lastmodified 2021-02-22T1416+0100 + * @since 1.5.0 * * @since 2.2.6 Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * @since 2.5.0 Adding: Templates: Enable template location stack, thanks to @misfist code contribution. From 2111d850aa1d711288e9a80a621236498b962588 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 24 Feb 2021 23:12:41 +0100 Subject: [PATCH 051/144] Convert script to snake_case --- class/task.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/class/task.php b/class/task.php index da4ae9f..42b2a1a 100644 --- a/class/task.php +++ b/class/task.php @@ -1013,13 +1013,13 @@ class MCI_Footnotes_Task { // Start internal script. ?> Date: Wed, 24 Feb 2021 23:14:56 +0100 Subject: [PATCH 052/144] Convert script to snake_case --- templates/public/footnote-alternative.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index cb400de..4e70481 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -4,8 +4,8 @@ --> <[[link-span]] onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" [[hard-link]] @@ -17,7 +17,7 @@ >[[anchor-element]] Date: Wed, 24 Feb 2021 23:53:22 +0100 Subject: [PATCH 053/144] Edit file level docblocks. --- class/config.php | 8 +++----- class/convert.php | 6 ++---- class/hooks.php | 6 +++--- class/init.php | 2 -- class/language.php | 5 ++--- class/settings.php | 5 ++--- class/task.php | 2 -- class/template.php | 1 + class/wysiwyg.php | 3 ++- 9 files changed, 15 insertions(+), 23 deletions(-) diff --git a/class/config.php b/class/config.php index 4025584..8f02119 100644 --- a/class/config.php +++ b/class/config.php @@ -4,12 +4,10 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:56 + * @since 1.5.0 + * @date 12.09.14 10:56 * - * Edited for: - * 2.0.4 add Public Plugin name for dashboard heading 2020-11-01T0452+0100 - * - * Last modified: 2021-02-18T2027+0100 + * @since 2.0.4 add Public Plugin name for dashboard heading 2020-11-01T0452+0100 */ /** diff --git a/class/convert.php b/class/convert.php index 5847d03..3adb313 100644 --- a/class/convert.php +++ b/class/convert.php @@ -4,12 +4,10 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:56 + * @since 1.5.0 + * @date 12.09.14 10:56 * - * Edited: * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 - * - * Last modified: 2020-12-12T1541+0100 */ /** diff --git a/class/hooks.php b/class/hooks.php index 7254d9f..07b929f 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -4,10 +4,10 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:56 + * @since 1.5.0 + * @date 12.09.14 10:56 * - * Edited: - * @since 2.2.0 2020-12-12T1223+0100 + * @since 2.2.0 (to determine) 2020-12-12T1223+0100 */ /** diff --git a/class/init.php b/class/init.php index e72ce3f..812bd13 100644 --- a/class/init.php +++ b/class/init.php @@ -7,8 +7,6 @@ * @since 1.5.0 * @date 12.09.14 10:56 * - * @lastmodified 2021-02-24T1617+0100 - * * @since 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. * @since 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. diff --git a/class/language.php b/class/language.php index ea56423..fd86a8c 100644 --- a/class/language.php +++ b/class/language.php @@ -4,9 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 17:47 - * - * @lastmodified 2021-02-18T2028+0100 + * @since 1.5.0 + * @date 14.09.14 17:47 * * @since 2.0.0 Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. * @since 2.1.6 Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. diff --git a/class/settings.php b/class/settings.php index 2dd59ba..7073a0e 100644 --- a/class/settings.php +++ b/class/settings.php @@ -4,9 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 10:43 - * - * @lastmodified 2021-02-19T1608+0100 + * @since 1.5.0 + * @date 14.09.14 10:43 * * @since 2.0.4 restore arrow settings 2020-11-02T2115+0100 * @since 2.0.7 remove hook the_post 2020-11-06T1342+0100 diff --git a/class/task.php b/class/task.php index 42b2a1a..f477614 100644 --- a/class/task.php +++ b/class/task.php @@ -6,8 +6,6 @@ * @package footnotes * @since 1.5.0 * - * @lastmodified 2021-02-20T0438+0100 - * * @since 2.0.0 Bugfix: various. * @since 2.0.4 Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. * @since 2.0.5 Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. diff --git a/class/template.php b/class/template.php index fd716d6..fd4e6ba 100644 --- a/class/template.php +++ b/class/template.php @@ -5,6 +5,7 @@ * @filesource * @package footnotes * @since 1.5.0 + * @date 14.09.14 10:58 * * @since 2.2.6 Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * @since 2.5.0 Adding: Templates: Enable template location stack, thanks to @misfist code contribution. diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 671a2d3..898f133 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -4,7 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 17:30 + * @since 1.5.0 + * @date 14.09.14 17:30 */ /** From cf1fef09cc021680500b690df0274e3541851ace Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 25 Feb 2021 00:02:44 +0100 Subject: [PATCH 054/144] Correct phrase (initialism) --- class/hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/hooks.php b/class/hooks.php index 07b929f..617a658 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -7,7 +7,7 @@ * @since 1.5.0 * @date 12.09.14 10:56 * - * @since 2.2.0 (to determine) 2020-12-12T1223+0100 + * @since 2.2.0 (TBD) 2020-12-12T1223+0100 */ /** From a7c103c922b2afe7d1eb5af5b44b18ef2f4017da Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 25 Feb 2021 12:01:24 +0100 Subject: [PATCH 055/144] Remove end comment. --- class/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/template.php b/class/template.php index fd4e6ba..236734c 100644 --- a/class/template.php +++ b/class/template.php @@ -232,4 +232,4 @@ class MCI_Footnotes_Template { return $located; } -} // End of class. +} From 422a6d1fa2322e50e29c3fe946b4bf47970ea663 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 25 Feb 2021 14:22:07 +0100 Subject: [PATCH 056/144] File level headings in class/layout/. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move date to @‌date tag below the @‌since tag. Delete @‌lastmodified tag as pointless, easily out of sync, and screwing things up when collaborating. Need to mention however that in many projects, the last modified datestamp is applied and maintained. That said, some published files on the web out there contain edits post-dating their datestamp. --- class/layout/diagnostics.php | 3 ++- class/layout/init.php | 3 ++- class/layout/settings.php | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php index 552c4e7..502f293 100644 --- a/class/layout/diagnostics.php +++ b/class/layout/diagnostics.php @@ -4,7 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 14:47 + * @since 1.5.0 + * @date 14.09.14 14:47 */ /** diff --git a/class/layout/init.php b/class/layout/init.php index b5c1e6b..72c347d 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -4,7 +4,8 @@ * * @filesource * @package footnotes - * @since 1.5.0 12.09.14 10:26 + * @since 1.5.0 + * @date 12.09.14 10:26 */ /** diff --git a/class/layout/settings.php b/class/layout/settings.php index c775e22..bfddc98 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -3,9 +3,8 @@ * Includes the Plugin Class to display all Settings. * * @filesource - * @since 1.5.0 14.09.14 14:47 - * - * @lastmodified 2021-02-19T2053+0100 + * @since 1.5.0 + * @date 14.09.14 14:47 * * @since 2.0.4 restore arrow settings 2020-11-01T0509+0100 * @since 2.1.0 read-on button label 2020-11-08T2148+0100 From c8d526ebc1d13e1b37027789f830ce1f2a0297a2 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 25 Feb 2021 17:35:16 +0100 Subject: [PATCH 057/144] Remove dates in class/widgets/base.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove @‌lastmodified date. Remove purely documentation related @‌date tag. --- class/widgets/base.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/class/widgets/base.php b/class/widgets/base.php index cc00326..6618f28 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -7,8 +7,6 @@ * @since 1.5.0 * @date 14.09.14 14:30 * - * @lastmodified 2021-02-18T0306+0100 - * @date 2021-02-18T0240+0100 * @since 1.6.4 Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. */ From b4df058574c8bebef2f0a56c0664a9331c8562fe Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 25 Feb 2021 17:48:04 +0100 Subject: [PATCH 058/144] File header class/widgets/reference-container.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move date to its tag, … --- class/widgets/reference-container.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 16c0af2..4a75d11 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -4,9 +4,10 @@ * * @filesource * @package footnotes - * @since 1.5.0 14.09.14 14:26 + * @since 1.5.0 + * @date 14.09.14 14:26 * - * Edited 2.2.0 2020-12-12T2131+0100 + * @since 2.2.0 (TBD) 2020-12-12T2131+0100 */ /** From 02c6c1c362379eed8943c79b7d1495e8c9de5588 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Thu, 25 Feb 2021 19:17:00 +0000 Subject: [PATCH 059/144] Update code to comply with WP Coding Standards (#38) Co-authored-by: @pewgeuges --- .gitignore | 3 + README.md | 6 +- _tools/setup.sh | 4 + class/config.php | 29 +- class/convert.php | 242 ++- class/dashboard/init.php | 212 --- class/dashboard/layout.php | 552 ------ class/dashboard/subpage-diagnostics.php | 140 -- class/dashboard/subpage-main.php | 1182 ------------- class/hooks.php | 79 +- class/init.php | 264 +-- class/language.php | 38 +- class/layout/abstract-engine.php | 563 ++++++ class/layout/diagnostics.php | 149 ++ class/layout/init.php | 207 +++ class/layout/settings.php | 1261 +++++++++++++ class/settings.php | 736 ++++---- class/task.php | 1845 +++++++++++--------- class/template.php | 190 +- class/widgets/base.php | 49 +- class/widgets/reference-container.php | 56 +- class/wysiwyg.php | 77 +- composer.json | 11 + composer.lock | 196 +++ contrib/pre-commit | 61 + footnotes.php | 58 +- includes.php | 37 +- readme.txt | 8 +- templates/dashboard/other-plugins.html | 2 +- templates/public/footnote-alternative.html | 6 +- 30 files changed, 4328 insertions(+), 3935 deletions(-) create mode 100644 _tools/setup.sh delete mode 100644 class/dashboard/init.php delete mode 100644 class/dashboard/layout.php delete mode 100644 class/dashboard/subpage-diagnostics.php delete mode 100644 class/dashboard/subpage-main.php create mode 100644 class/layout/abstract-engine.php create mode 100644 class/layout/diagnostics.php create mode 100644 class/layout/init.php create mode 100644 class/layout/settings.php create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 contrib/pre-commit diff --git a/.gitignore b/.gitignore index 7fdc234..b6fe4af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .phpdoc/ +vendor/ + +*.bak diff --git a/README.md b/README.md index 40216d0..f55c285 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) + - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) @@ -25,8 +26,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) 1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` + - You may have to enable double-wildcards in your console first (`shopt -s globstar`) ## Updating Documentation diff --git a/_tools/setup.sh b/_tools/setup.sh new file mode 100644 index 0000000..fd4c786 --- /dev/null +++ b/_tools/setup.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cp contrib/pre-commit .git/hooks/pre-commit +chmod +x .git/hooks/pre-commit diff --git a/class/config.php b/class/config.php index 98a3245..8f02119 100644 --- a/class/config.php +++ b/class/config.php @@ -1,51 +1,44 @@ -foot'; /** * Public Plugin name for dashboard heading - * + * * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * in WPv5.5 being torn apart as if the headline was text-align:justify and not * the last line. That ugly display bug badly affected the plugin’s communication. * The only working solution found so far is using position:fixed in one heading * that isn’t translated, and dropping the logo in another, translatable heading. @@ -58,7 +51,6 @@ class MCI_Footnotes_Config { /** * Html tag for the LOVE symbol. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ @@ -75,7 +67,6 @@ class MCI_Footnotes_Config { /** * Short code to DON'T display the 'LOVE ME' slug on certain pages. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ diff --git a/class/convert.php b/class/convert.php index e1823ad..3adb313 100644 --- a/class/convert.php +++ b/class/convert.php @@ -3,20 +3,16 @@ * Includes the Convert Class. * * @filesource - * @author Stefan Herndler - * @since 1.5.0 12.09.14 10:56 - * - * Edited: + * @package footnotes + * @since 1.5.0 + * @date 12.09.14 10:56 + * * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 - * - * Last modified: 2020-12-12T1541+0100 */ - /** * Converts data types and Footnotes specific values. * - * @author Stefan Herndler * @since 1.5.0 */ class MCI_Footnotes_Convert { @@ -24,30 +20,29 @@ class MCI_Footnotes_Convert { /** * Converts a integer into the user-defined counter style for the footnotes. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index to be converted. - * @param string $p_str_ConvertStyle Style of the new/converted Index. + * @param int $p_int_index Index to be converted. + * @param string $p_str_convert_style Style of the new/converted Index. * @return string Converted Index as string in the defined counter style. - * + * * Edited: * @since 2.2.0 lowercase Roman numerals supported */ - public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") { - switch ($p_str_ConvertStyle) { - case "romanic": - return self::toRomanic($p_int_Index, true); - case "roman_low": - return self::toRomanic($p_int_Index, false); - case "latin_high": - return self::toLatin($p_int_Index, true); - case "latin_low": - return self::toLatin($p_int_Index, false); - case "arabic_leading": - return self::toArabicLeading($p_int_Index); - case "arabic_plain": + public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) { + switch ( $p_str_convert_style ) { + case 'romanic': + return self::to_romanic( $p_int_index, true ); + case 'roman_low': + return self::to_romanic( $p_int_index, false ); + case 'latin_high': + return self::to_latin( $p_int_index, true ); + case 'latin_low': + return self::to_latin( $p_int_index, false ); + case 'arabic_leading': + return self::to_arabic_leading( $p_int_index ); + case 'arabic_plain': default: - return $p_int_Index; + return $p_int_index; } } @@ -55,175 +50,174 @@ class MCI_Footnotes_Convert { * Converts an integer into latin ascii characters, either lower or upper-case. * Function available from A to ZZ ( means 676 footnotes at 1 page possible). * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @param bool $p_bool_UpperCase True to convert the value to upper case letter, otherwise to lower case. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case True to convert the value to upper case letter, otherwise to lower case. * @return string */ - private static function toLatin($p_int_Value, $p_bool_UpperCase) { - // output string - $l_str_Return = ""; - $l_int_Offset = 0; - // check if the value is higher then 26 = Z - while ($p_int_Value > 26) { - // increase offset and reduce counter - $l_int_Offset++; - $p_int_Value -= 26; + private static function to_latin( $p_int_value, $p_bool_upper_case ) { + // Output string. + $l_str_return = ''; + $l_int_offset = 0; + // Check if the value is higher then 26 = Z. + while ( $p_int_value > 26 ) { + // Increase offset and reduce counter. + $l_int_offset++; + $p_int_value -= 26; } - // if offset set (more then Z), then add a new letter in front - if ($l_int_Offset > 0) { - $l_str_Return = chr($l_int_Offset + 64); + // If offset set (more then Z), then add a new letter in front. + if ( $l_int_offset > 0 ) { + $l_str_return = chr( $l_int_offset + 64 ); } - // add the origin letter - $l_str_Return .= chr($p_int_Value + 64); - // return the latin character representing the integer - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Add the origin letter. + $l_str_return .= chr( $p_int_value + 64 ); + // Return the latin character representing the integer. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts an integer to a leading-0 integer. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. * @return string Value with a leading zero. */ - private static function toArabicLeading($p_int_Value) { - // add a leading 0 if number lower then 10 - if ($p_int_Value < 10) { - return "0" . $p_int_Value; + private static function to_arabic_leading( $p_int_value ) { + // Add a leading 0 if number lower then 10. + if ( $p_int_value < 10 ) { + return '0' . $p_int_value; } - return $p_int_Value; + return $p_int_value; } /** * Converts an integer to a romanic letter. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case Whether to uppercase. * @return string - * + * * Edited: * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 */ - private static function toRomanic($p_int_Value, $p_bool_UpperCase) { - // table containing all necessary romanic letters - $l_arr_RomanicLetters = array( - 'M' => 1000, + private static function to_romanic( $p_int_value, $p_bool_upper_case ) { + // Table containing all necessary romanic letters. + $l_arr_romanic_letters = array( + 'M' => 1000, 'CM' => 900, - 'D' => 500, + 'D' => 500, 'CD' => 400, - 'C' => 100, + 'C' => 100, 'XC' => 90, - 'L' => 50, + 'L' => 50, 'XL' => 40, - 'X' => 10, + 'X' => 10, 'IX' => 9, - 'V' => 5, + 'V' => 5, 'IV' => 4, - 'I' => 1 + 'I' => 1, ); - // return value - $l_str_Return = ''; - // iterate through integer value until it is reduced to 0 - while ($p_int_Value > 0) { - foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { - if ($p_int_Value >= $l_int_Arabic) { - $p_int_Value -= $l_int_Arabic; - $l_str_Return .= $l_str_Romanic; + // Return value. + $l_str_return = ''; + // Iterate through integer value until it is reduced to 0. + while ( $p_int_value > 0 ) { + foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) { + if ( $p_int_value >= $l_int_arabic ) { + $p_int_value -= $l_int_arabic; + $l_str_return .= $l_str_romanic; break; } } } - // return romanic letters as string - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Return romanic letters as string. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts a string depending on its value to a boolean. * - * @author Stefan Herndler * @since 1.0-beta - * @param string $p_str_Value String to be converted to boolean. + * @param string $p_str_value String to be converted to boolean. * @return bool Boolean representing the string. */ - public static function toBool($p_str_Value) { - // convert string to lower-case to make it easier - $p_str_Value = strtolower($p_str_Value); - // check if string seems to contain a "true" value - switch ($p_str_Value) { - case "checked": - case "yes": - case "true": - case "on": - case "1": + public static function to_bool( $p_str_value ) { + // Convert string to lower-case to make it easier. + $p_str_value = strtolower( $p_str_value ); + // Check if string seems to contain a "true" value. + switch ( $p_str_value ) { + case 'checked': + case 'yes': + case 'true': + case 'on': + case '1': return true; } - // nothing found that says "true", so we return false + // Nothing found that says "true", so we return false. return false; } /** * Get a html Array short code depending on Arrow-Array key index. * - * @author Stefan Herndler * @since 1.3.2 - * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. + * @param int $p_int_index Index representing the Arrow. If empty all Arrows are specified. * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. */ - public static function getArrow($p_int_Index = -1) { - // define all possible arrows - $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); - // convert index to an integer - if (!is_int($p_int_Index)) { - $p_int_Index = intval($p_int_Index); + public static function get_arrow( $p_int_index = -1 ) { + // Define all possible arrows. + $l_arr_arrows = array( '↑', '↥', '↟', '↩', '↲', '↵', '⇑', '⇡', '⇧', '↑' ); + // Convert index to an integer. + if ( ! is_int( $p_int_index ) ) { + $p_int_index = intval( $p_int_index ); } - // return the whole arrow array - if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { - return $l_arr_Arrows; + // Return the whole arrow array. + if ( $p_int_index < 0 || $p_int_index > count( $l_arr_arrows ) ) { + return $l_arr_arrows; } - // return a single arrow - return $l_arr_Arrows[$p_int_Index]; + // Return a single arrow. + return $l_arr_arrows[ $p_int_index ]; } + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r /** * Displays a Variable. * - * @author Stefan Herndler * @since 1.5.0 - * @param mixed $p_mixed_Value + * @param mixed $p_mixed_value The variable to display. + * @return void */ - public static function debug($p_mixed_Value) { - if (empty($p_mixed_Value)) { - var_dump($p_mixed_Value); + public static function debug( $p_mixed_value ) { + if ( empty( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_array($p_mixed_Value)) { - printf("
                                                                                    ");
                                                                                    -			print_r($p_mixed_Value);
                                                                                    -			printf("
                                                                                    "); + } elseif ( is_array( $p_mixed_value ) ) { + printf( '
                                                                                    ' );
                                                                                    +			print_r( $p_mixed_value );
                                                                                    +			printf( '
                                                                                    ' ); - } else if (is_object($p_mixed_Value)) { - printf("
                                                                                    ");
                                                                                    -			print_r($p_mixed_Value);
                                                                                    -			printf("
                                                                                    "); + } elseif ( is_object( $p_mixed_value ) ) { + printf( '
                                                                                    ' );
                                                                                    +			print_r( $p_mixed_value );
                                                                                    +			printf( '
                                                                                    ' ); - } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_numeric( $p_mixed_value ) || is_int( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_date($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_date( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); } else { - var_dump($p_mixed_Value); + var_dump( $p_mixed_value ); } - echo "
                                                                                    "; + echo '
                                                                                    '; } + // phpcs:disable } diff --git a/class/dashboard/init.php b/class/dashboard/init.php deleted file mode 100644 index b18e77c..0000000 --- a/class/dashboard/init.php +++ /dev/null @@ -1,212 +0,0 @@ -a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; - } - } - ksort($this->a_arr_SubPageClasses); - - // register hooks/actions - add_action('admin_init', array($this, 'initializeSettings')); - add_action('admin_menu', array($this, 'registerMainMenu')); - // register AJAX callbacks for Plugin information - add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function initializeSettings() { - MCI_Footnotes_Settings::instance()->RegisterSettings(); - // iterate though each sub class of the layout engine and register their sections - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @author Stefan Herndler - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function registerMainMenu() { - global $menu; - // iterate through each main menu - foreach($menu as $l_arr_MainMenu) { - // iterate through each main menu attribute - foreach($l_arr_MainMenu as $l_str_Attribute) { - // main menu already added, append sub pages and stop - if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { - $this->registerSubPages(); - return; - } - } - } - - // add a new main menu page to the WordPress dashboard - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title - self::C_STR_MAIN_MENU_TITLE, // menu title - 'manage_options', // capability - self::C_STR_MAIN_MENU_SLUG, // menu slug - array($this, "displayOtherPlugins"), // function - plugins_url('footnotes/img/main-menu.png'), // icon url - null // position - ); - $this->registerSubPages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function registerSubPages() { - // first registered sub menu page MUST NOT contain a unique slug suffix - // iterate though each sub class of the layout engine and register their sub page - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSubPage(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayOtherPlugins() { - printf("

                                                                                    "); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); - echo $l_obj_Template->getContent(); - - printf('visit Mark Cheret'); - printf("

                                                                                    "); - - printf(''); - } - - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function getPluginMetaInformation() { - // get plugin internal name from POST data - $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; - if (empty($l_str_PluginName)) { - echo json_encode(array("error" => "Plugin name invalid.")); - exit; - } - $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; - // call URL and collect data - $l_arr_Response = wp_remote_get($l_str_Url); - // check if response is valid - if (is_wp_error($l_arr_Response)) { - echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); - exit; - } - if (!array_key_exists("body", $l_arr_Response)) { - echo json_encode(array("error" => "Error reading WordPress API response message.")); - exit; - } - // get the body of the response - $l_str_Response = $l_arr_Response["body"]; - // get plugin object - $l_arr_Plugin = json_decode($l_str_Response, true); - if (empty($l_arr_Plugin)) { - echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                    URL: " . $l_str_Url . "
                                                                                    Response: " . $l_str_Response)); - exit; - } - - $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; - $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; - $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); - - // return Plugin information as JSON encoded string - echo json_encode( - array( - "error" => "", - "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", - "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", - "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", - "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", - "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", - "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", - "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", - "PluginRating" => $l_int_NumRatings, - "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", - "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" - ) - ); - exit; - } -} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php deleted file mode 100644 index d16ad8b..0000000 --- a/class/dashboard/layout.php +++ /dev/null @@ -1,552 +0,0 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); - } - - /** - * Returns an array describing a meta box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SectionID Parent Section ID. - * @param string $p_str_ID Unique ID suffix. - * @param string $p_str_Title Title for the meta box. - * @param string $p_str_CallbackFunctionName Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { - return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, - "callback" => $p_str_CallbackFunctionName - ); - } - - /** - * Registers a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSubPage() { - global $submenu; - // any sub menu for our main menu exists - if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { - // iterate through all sub menu entries of the ManFisher main menu - foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { - if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { - // remove that sub menu and add it again to move it to the bottom - remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); - } - } - } - - $this->a_str_SubPageHook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug - $this->getSubPageTitle(), // page title - $this->getSubPageTitle(), // menu title - 'manage_options', // capability - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug - array($this, 'displayContent') // function - ); - } - - /** - * Registers all sections for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSections() { - // iterate through each section - foreach($this->getSections() as $l_arr_Section) { - // append tab to the tab-array - $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; - add_settings_section( - $l_arr_Section["id"], // unique id - "", //$l_arr_Section["title"], // title - array($this, 'Description'), // callback function for the description - $l_arr_Section["id"] // parent sub page slug - ); - $this->registerMetaBoxes($l_arr_Section["id"]); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_ParentID Parent section unique id. - */ - private function registerMetaBoxes($p_str_ParentID) { - // iterate through each meta box - foreach($this->getMetaBoxes() as $l_arr_MetaBox) { - if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { - continue; - } - add_meta_box( - $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id - $l_arr_MetaBox["title"], // meta box title - array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content - $p_str_ParentID, // post type = parent section id - 'main' // context - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function appendScripts() { - // enable meta boxes layout and close functionality - wp_enqueue_script('postbox'); - // add WordPress color picker layout - wp_enqueue_style('wp-color-picker'); - // add WordPress color picker function - wp_enqueue_script('wp-color-picker'); - - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style('mci-footnotes-admin'); - } - - /** - * Displays the content of specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayContent() { - // register and enqueue scripts and styling - $this->appendScripts(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - // store settings - $l_bool_SettingsUpdated = false; - if (array_key_exists("save-settings", $_POST)) { - if ($_POST["save-settings"] == "save") { - unset($_POST["save-settings"]); - unset($_POST["submit"]); - $l_bool_SettingsUpdated = $this->saveSettings(); - } - } - - // display all sections and highlight the active section - echo '
                                                                                    '; - echo '
                                                                                    '; - - if ($l_bool_SettingsUpdated) { - echo sprintf('
                                                                                    %s
                                                                                    ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - } - - // form to submit the active section - echo '
                                                                                    '; - //settings_fields($l_arr_ActiveSection["container"]); - echo ''; - // outputs the settings field of the active section - do_settings_sections($l_arr_ActiveSection["id"]); - do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); - - // add submit button to active section if defined - if ($l_arr_ActiveSection["submit"]) { - submit_button(); - } - // close the form to submit data - echo ''; - // close container for the settings page - echo '
                                                                                    '; - // output special javascript for the expand/collapse function of the meta boxes - echo ''; - } - - /** - * Save all Plugin settings. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return bool - */ - private function saveSettings() { - $l_arr_newSettings = array(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - - // iterate through each value that has to be in the specific container - foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { - // setting is available in the POST array, use it - if (array_key_exists($l_str_Key, $_POST)) { - $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; - } else { - // setting is not defined in the POST array, define it to avoid the Default value - $l_arr_newSettings[$l_str_Key] = ""; - } - } - // update settings - return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); - } - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Description() { - // default no description will be displayed - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingKeyName Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function LoadSetting($p_str_SettingKeyName) { - // get current section - reset($this->a_arr_Sections); - $p_arr_Return = array(); - $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); - return $p_arr_Return; - } - - /** - * Returns a line break to start a new line. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addNewline() { - return '
                                                                                    '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addLineSpace() { - return '

                                                                                    '; - } - - /** - * Returns a simple text inside html text. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function addText($p_str_Text) { - return sprintf('%s', $p_str_Text); - } - - /** - * Returns the html tag for an input/select label. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_Caption Label caption. - * @return string - * - * Edited 2020-12-01T0159+0100.. - * @since 2.1.6 no colon - */ - protected function addLabel($p_str_SettingName, $p_str_Caption) { - if (empty($p_str_Caption)) { - return ""; - } - // remove the colon causing localization issues with French, - // and with languages not using punctuation at all, - // and with languages using other punctuation marks instead of colon, - // e.g. Greek using a raised dot. - // In French, colon is preceded by a space, forcibly non-breaking, - // and narrow per new school. - // Add colon to label strings for inclusion in localization. - // Colon after label is widely preferred best practice, mandatory per style guides. - // - return sprintf('', $p_str_SettingName, $p_str_Caption); - // ^ here deleted colon 2020-12-08T1546+0100 - } - - /** - * Returns the html tag for an input [type = text]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. - * @param bool $p_bool_Readonly Set the input to be read only, default false. - * @param bool $p_bool_Hidden Set the input to be hidden, default false. - * @return string - */ - protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { - $l_str_Style = ""; - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - if ($p_bool_Hidden) { - $l_str_Style .= 'display:none;'; - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, - $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addCheckbox($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], - MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); - } - - /** - * Returns the html tag for a select box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre select the current value. - * @param array $p_arr_Options Possible options to be selected. - * @return string - */ - protected function addSelectBox($p_str_SettingName, $p_arr_Options) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - $l_str_Options = ""; - - /* loop through all array keys */ - foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { - $l_str_Options .= sprintf('', - $l_str_Value, - $l_arr_Data["value"] == $l_str_Value ? "selected" : "", - $l_str_Caption); - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); - } - - /** - * Returns the html tag for a text area. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. - * @return string - */ - protected function addTextArea($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addColorSelection($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_in_Min Minimum value. - * @param int $p_int_Max Maximum value. - * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - - if ($p_bool_Deci) { - $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); - } else { - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); - } - } - -} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php deleted file mode 100644 index 33f327a..0000000 --- a/class/dashboard/subpage-diagnostics.php +++ /dev/null @@ -1,140 +0,0 @@ -addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - */ - protected function getMetaBoxes() { - return array( - $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_PhpExtensions = ""; - // iterate through each PHP extension - foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { - if ($l_int_Index > 0) { - $l_str_PhpExtensions .= ' | '; - } - $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); - } - - /** @var WP_Theme $l_obj_CurrentTheme */ - $l_obj_CurrentTheme = wp_get_theme(); - - $l_str_WordPressPlugins = ""; - // iterate through each installed WordPress Plugin - foreach (get_plugins() as $l_arr_Plugin) { - $l_str_WordPressPlugins .= '
                                                                                    '; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; - } - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "server" => $_SERVER["SERVER_NAME"], - - "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php" => phpversion(), - - "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "user-agent" => $_SERVER["HTTP_USER_AGENT"], - - "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "memory-limit" => ini_get('memory_limit'), - - "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php-extensions" => $l_str_PhpExtensions, - - "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "wordpress" => $wp_version, - - "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", - - "plugins" => $l_str_WordPressPlugins - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php deleted file mode 100644 index 940a22b..0000000 --- a/class/dashboard/subpage-main.php +++ /dev/null @@ -1,1182 +0,0 @@ -addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); - - // sync tab name with mirror in public function CustomCSSMigration(): - $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); - - $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); - $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); - $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); - - return $l_arr_Tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * HyperlinkArrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function getMetaBoxes() { - $l_arr_MetaBoxes = array(); - - // sync box name with mirror in task.php: - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); - } - - $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); - } - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); - - return $l_arr_MetaBoxes; - } - - /** - * Displays all settings for the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function ReferenceContainer() { - - // options for the label element: - $l_arr_LabelElement = array( - "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the positioning of the reference container - $l_arr_Positions = array( - "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), - "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // basic responsive page layout options: - $l_arr_PageLayoutOptions = array( - "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the separating punctuation between backlinks: - $l_arr_Separators = array( - // Unicode character names are conventionally uppercase. - "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because - // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_Terminators = array( - "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): - "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the first column width (per cent is a ratio, not a unit): - $l_arr_WidthUnits = array( - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for reference container script mode: - $l_arr_ScriptMode = array( - "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), - - "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), - - "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), - - "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), - - "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), - "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), - "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), - - "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), - "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-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), - - "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), - "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), - "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), - "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), - "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), - - "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), - "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), - "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), - "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), - "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), - "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), - "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), - "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), - "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), - "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), - "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), - "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), - "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), - "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all options for the footnotes start and end tag short codes - * Displays all options for the footnotes numbering - * Displays all options for the scrolling behavior - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function StartEnd() { - // footnotes start tag short code options: - $l_arr_ShortCodeStart = array( - "((" => "((", - "(((" => "(((", - "{{" => "{{", - "{{{" => "{{{", - "[n]" => "[n]", - "[fn]" => "[fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[ref]" => "[ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // footnotes end tag short code options: - $l_arr_ShortCodeEnd = array( - "))" => "))", - ")))" => ")))", - "}}" => "}}", - "}}}" => "}}}", - "[/n]" => "[/n]", - "[/fn]" => "[/fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[/ref]" => "[/ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the syntax validation: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), - "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), - - "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), - "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), - - // for script showing/hiding user defined text boxes: - "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // option to enable syntax validation, label mirrored in task.php: - "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), - "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Numbering() { - // define some space for the output - $l_str_Space = "     "; - // options for the combination of identical footnotes - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the numbering style of the footnotes: - $l_arr_CounterStyle = array( - "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", - "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", - "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", - "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", - "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", - "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), - - // algorithmically combine identicals: - "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), - "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Support for Ibid. notation added thanks to @meglio in . - "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Scrolling() { - - // options for enabling hard links for AMP compat: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), - "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), - "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable hard links for AMP compat: - "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), - "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), - "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), - "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), - "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable backlink tooltips: - "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), - "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), - "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function Love() { - // options for the acknowledgment display in the footer: - $l_arr_Love = array( - // logo only: - "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // logo followed by heart symbol: - "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // logo preceded by heart symbol: - "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. - "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // "This website uses Footnotes." - "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the Footnotes plugin." - "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the awesome Footnotes plugin." - "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // "No display of any “Footnotes love” mention in the footer" - "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), - - "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the excerpt setting - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function Excerpts() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), - "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. - "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnote referrers - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function Superscript() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for superscript normalize scope: - $l_arr_NormalizeSuperscript = array( - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), - - "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - - "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), - "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnotes mouse-over box. - * - * @author Stefan Herndler - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function MouseOverBox() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), - "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), - "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the name of the plugin as logogram “footnotes”. - "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxPosition() { - - // options for the Mouse-over box position - $l_arr_Position = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the alternative Mouse-over box position - $l_arr_AlternativePosition = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), - "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), - "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxDimensions() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), - "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), - "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTiming() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), - "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), - "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), - "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), - "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTruncation() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), - - "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), - // The feature trims back until the last full word. - "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxText() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), - "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), - "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), - "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxAppearance() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the font size unit: - $l_arr_FontSizeUnits = array( - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), - "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), - "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), - "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), - // To use default: Clear or leave empty. - "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), - // To use default: Clear or leave empty. - "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), - "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), - // To use default: Clear or leave empty. - "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), - "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), - // To use default: Clear or leave empty. - "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the prepended symbol - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function HyperlinkArrow() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), - "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), - "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the custom css box. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function CustomCSS() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text", - // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-2" => ".footnote_tooltip", - // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-3" => ".footnote_plugin_index", - // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-4" => ".footnote_plugin_text", - // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSMigration() { - - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), - "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), - "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the “Referrers and tooltips” settings tab name. - "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSNew() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); - // replace all placeholders - $l_obj_Template->replace( - array( - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), - - "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @author Stefan Herndler - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function LookupHooks() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); - - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), - "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), - "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), - "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", - - "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), - "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), - "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", - - "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), - "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), - "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", - - "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), - "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), - "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", - - "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), - "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), - "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays a short introduction of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Help() { - global $g_obj_MCI_Footnotes; - // load footnotes starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - - if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { - // load user defined starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". - " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". - " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". - " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". - " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - . $l_arr_Footnote_EndingTag["value"] . " World!"; - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "start" => $l_arr_Footnote_StartingTag["value"], - - "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "end" => $l_arr_Footnote_EndingTag["value"], - - "example-code" => $l_str_Example, - "example-string" => "
                                                                                    " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), - - "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') - ) - ); - // call wp_head function to get the Styling of the mouse-over box - $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all Donate button to support the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Donate() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); - // replace all placeholders - $l_obj_Template->replace( - array( - "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} diff --git a/class/hooks.php b/class/hooks.php index e86d106..617a658 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,19 +1,18 @@ -ClearAll(); } /** * Add Links to the Plugin in the "installed Plugins" page. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Links Current Links. - * @param string $p_str_PluginFileName Plugins init file name. + * @param array $p_arr_links Current Links. + * @param string $p_str_plugin_file_name Plugins init file name. * @return array */ - public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { - // append link to the WordPress Plugin page - $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the Settings page - $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the PlayPal Donate function - $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // return new links - return $p_arr_Links; + public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { + // Append link to the WordPress Plugin page. + $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); + // Append link to the settings page. + $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); + // Append link to the PayPal donate function. + $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); + // Return new links. + return $p_arr_links; } } diff --git a/class/init.php b/class/init.php index e1001a3..812bd13 100644 --- a/class/init.php +++ b/class/init.php @@ -1,13 +1,11 @@ -initializeDashboard(); - // initialize the Plugin Task - $this->initializeTask(); + // Initialize the Plugin Dashboard. + $this->initialize_dashboard(); + // Initialize the Plugin Task. + $this->initialize_task(); - // Register all Public Stylesheets and Scripts - add_action('init', array($this, 'registerPublic')); - // Enqueue all Public Stylesheets and Scripts - add_action('wp_enqueue_scripts', array($this, 'registerPublic')); - // Register all Widgets of the Plugin. - add_action('widgets_init', array($this, 'initializeWidgets')); + // Register all Public Stylesheets and Scripts. + add_action( 'init', array( $this, 'register_public' ) ); + // Enqueue all Public Stylesheets and Scripts. + add_action( 'wp_enqueue_scripts', array( $this, 'register_public' ) ); + // Register all Widgets of the Plugin.. + add_action( 'widgets_init', array( $this, 'initialize_widgets' ) ); } /** * Initializes all Widgets of the Plugin. * - * @author Stefan Herndler * @since 1.5.0 * - * * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution * * @since 1.6.5 @@ -129,37 +124,34 @@ class MCI_Footnotes { * and use the bare register_widget() here. * @see self::run() * - * Also, the visibility of initializeWidgets() is not private any longer. + * Also, the visibility of initialize_widgets() is not private any longer. */ - public function initializeWidgets() { - register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); + public function initialize_widgets() { + register_widget( 'MCI_Footnotes_Widget_Reference_container' ); } /** * Initializes the Dashboard of the Plugin and loads them. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeDashboard() { + private function initialize_dashboard() { new MCI_Footnotes_Layout_Init(); } /** * Initializes the Plugin Task and registers the Task hooks. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeTask() { - $this->a_obj_Task = new MCI_Footnotes_Task(); - $this->a_obj_Task->registerHooks(); + private function initialize_task() { + $this->a_obj_task = new MCI_Footnotes_Task(); + $this->a_obj_task->register_hooks(); } /** * Registers and enqueues scripts and stylesheets to the public pages. * - * @author Stefan Herndler * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. @@ -168,7 +160,7 @@ class MCI_Footnotes { * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ - public function registerPublic() { + public function register_public() { /** * Enqueues external scripts. @@ -181,10 +173,10 @@ class MCI_Footnotes { * * The condition about tooltips was missing, only the not-alternative-tooltips part was present. */ - // set conditions re-used for stylesheet enqueuing: - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + // Set conditions re-used for stylesheet enqueuing. + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); /** * Enqueues the jQuery library registered by WordPress. @@ -195,68 +187,79 @@ class MCI_Footnotes { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * jQuery is also used for animated scrolling, so it was loaded by default. * The function wp_enqueue_script() avoids loading the same library multiple times. * After adding the alternative reference container, jQuery has become optional, * but still enabled by default. */ - if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { - + if ( 'jquery' === $l_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) { + wp_enqueue_script( 'jquery' ); - + } - if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { /** * Enqueues the jQuery Tools library shipped with the plugin. * - * redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js - * added versioning 2020-11-18T2150+0100 - * not use '-js' in the handle, is appended automatically + * Redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js. + * + * Add versioning. + * + * @since 2.1.2 + * @date 2020-11-18T2150+0100 + * + * No '-js' in the handle, is appended automatically. + * + * Deferring to the footer breaks jQuery tooltip display. + * @date 2021-02-23T1105+0100 */ wp_enqueue_script( 'mci-footnotes-jquery-tools', - plugins_url('footnotes/js/jquery.tools.min.js'), + plugins_url( 'footnotes/js/jquery.tools.min.js' ), array(), - '1.2.7.redacted.2' + '1.2.7.redacted.2', + false ); - /** - * Registers jQuery UI from the JavaScript Content Delivery Network. - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * Used to add jQuery UI following @vonpiernik: - * : - * - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. - * - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * This was enabled in Footnotes v2.0.0 through v2.0.3. - * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 - */ - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 - //wp_enqueue_script( 'jQueryUI' ); - /** - * This is then needed instead of the above first instance: - * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 - */ - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - /** * Enqueues some jQuery UI libraries registered by WordPress. * - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * + * @reporter @rajinderverma + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/ + * + * @reporter @ericcorbett2 + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 + * + * @reporter @honlapdavid + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 + * + * Fetch jQuery UI from cdnjs.cloudflare.com. + * @since 2.0.0 + * @date 2020-10-26T1907+0100 + * @contributor @vonpiernik + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 + * + * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. + * + * @since 2.0.4 + * @date 2020-11-01T1902+0100 + * @reporter @check2020de + * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ + * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui + * * If alternative tooltips are enabled, these libraries are not needed. */ wp_enqueue_script( 'jquery-ui-core' ); @@ -308,34 +311,43 @@ class MCI_Footnotes { * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. */ - // set tooltip mode for use in stylesheet name: - if ( self::$a_bool_TooltipsEnabled ) { - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - $l_str_TooltipMode = 'al'; - $l_str_TComplement = 'ternative-tooltips'; + // Set tooltip mode for use in stylesheet name. + if ( self::$a_bool_tooltips_enabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_str_tooltip_mode_short = 'al'; + $l_str_tooltip_mode_rest = 'ternative-tooltips'; } else { - $l_str_TooltipMode = 'jq'; - $l_str_TComplement = 'uery-tooltips'; + $l_str_tooltip_mode_short = 'jq'; + $l_str_tooltip_mode_rest = 'uery-tooltips'; } } else { - $l_str_TooltipMode = 'no'; - $l_str_TComplement = '-tooltips'; + $l_str_tooltip_mode_short = 'no'; + $l_str_tooltip_mode_rest = '-tooltips'; } - // set basic responsive page layout mode for use in stylesheet name: - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - switch ( $l_str_PageLayoutOption ) { - case "reference-container": $l_str_LayoutMode = '1'; break; - case "entry-content" : $l_str_LayoutMode = '2'; break; - case "main-content" : $l_str_LayoutMode = '3'; break; - case "none": default: $l_str_LayoutMode = '0'; break; + // Set basic responsive page layout mode for use in stylesheet name. + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + switch ( $l_str_page_layout_option ) { + case 'reference-container': + $l_str_layout_mode = '1'; + break; + case 'entry-content': + $l_str_layout_mode = '2'; + break; + case 'main-content': + $l_str_layout_mode = '3'; + break; + case 'none': + default: + $l_str_layout_mode = '0'; + break; } - // enqueue the tailored united minified stylesheet: + // Enqueue the tailored united minified stylesheet. wp_enqueue_style( - 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, + 'mci-footnotes-' . $l_str_tooltip_mode_short . $l_str_tooltip_mode_rest . '-pagelayout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, @@ -356,12 +368,12 @@ class MCI_Footnotes { wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_PageLayoutOption != 'none') { + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + if ( 'none' !== $l_str_page_layout_option ) { wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + 'mci-footnotes-layout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' ), array(), C_STR_FOOTNOTES_VERSION, diff --git a/class/language.php b/class/language.php index fccf143..fd86a8c 100644 --- a/class/language.php +++ b/class/language.php @@ -1,13 +1,11 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_id, + 'title' => $p_str_title, + 'submit' => $p_bool_has_submit_button, + 'container' => $p_int_settings_container_index, + ); + } + + /** + * Returns an array describing a meta box. + * + * @since 1.5.0 + * @param string $p_str_section_id Parent Section ID. + * @param string $p_str_id Unique ID suffix. + * @param string $p_str_title Title for the meta box. + * @param string $p_str_callback_function_name Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function add_meta_box( $p_str_section_id, $p_str_id, $p_str_title, $p_str_callback_function_name ) { + return array( + 'parent' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_section_id, + 'id' => $p_str_id, + 'title' => $p_str_title, + 'callback' => $p_str_callback_function_name, + ); + } + + /** + * Registers a sub page. + * + * @since 1.5.0 + */ + public function register_sub_page() { + global $submenu; + + if ( array_key_exists( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ), $submenu ) ) { + foreach ( $submenu[ plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ) ] as $l_arr_sub_menu ) { + if ( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ) === $l_arr_sub_menu[2] ) { + remove_submenu_page( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ); + } + } + } + + $this->a_str_sub_page_hook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, + $this->get_sub_page_title(), + $this->get_sub_page_title(), + 'manage_options', + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), + array( $this, 'display_content' ) + ); + } + + /** + * Registers all sections for a sub page. + * + * @since 1.5.0 + */ + public function register_sections() { + foreach ( $this->get_sections() as $l_arr_section ) { + // Append tab to the tab-array. + $this->a_arr_sections[ $l_arr_section['id'] ] = $l_arr_section; + add_settings_section( + $l_arr_section['id'], + '', + array( $this, 'Description' ), + $l_arr_section['id'] + ); + $this->register_meta_boxes( $l_arr_section['id'] ); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @since 1.5.0 + * @param string $p_str_parent_id Parent section unique id. + */ + private function register_meta_boxes( $p_str_parent_id ) { + // Iterate through each meta box. + foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) { + if ( $p_str_parent_id !== $l_arr_meta_box['parent'] ) { + continue; + } + add_meta_box( + $p_str_parent_id . '-' . $l_arr_meta_box['id'], + $l_arr_meta_box['title'], + array( $this, $l_arr_meta_box['callback'] ), + $p_str_parent_id, + 'main' + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @since 1.5.0 + */ + private function append_scripts() { + wp_enqueue_script( 'postbox' ); + wp_enqueue_style( 'wp-color-picker' ); + wp_enqueue_script( 'wp-color-picker' ); + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style( 'mci-footnotes-admin' ); + } + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * Displays the content of specific sub page. + * + * @since 1.5.0 + */ + public function display_content() { + $this->append_scripts(); + + // TODO: add nonce verification. + + // Get the current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + // Store settings. + $l_bool_settings_updated = false; + if ( array_key_exists( 'save-settings', $_POST ) ) { + if ( 'save' === $_POST['save-settings'] ) { + unset( $_POST['save-settings'] ); + unset( $_POST['submit'] ); + $l_bool_settings_updated = $this->save_settings(); + } + } + + // Display all sections and highlight the active section. + echo '
                                                                                    '; + echo '
                                                                                    '; + + if ( $l_bool_settings_updated ) { + echo sprintf( '
                                                                                    %s
                                                                                    ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); + } + + // Form to submit the active section. + echo '
                                                                                    '; + echo ''; + // Outputs the settings field of the active section. + do_settings_sections( $l_arr_active_section['id'] ); + do_meta_boxes( $l_arr_active_section['id'], 'main', null ); + + // Add submit button to active section if defined. + if ( $l_arr_active_section['submit'] ) { + submit_button(); + } + echo ''; + echo '
                                                                                    '; + + // Echo JavaScript for the expand/collapse function of the meta boxes. + echo ''; + } + // phpcs:enable + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * Save all Plugin settings. + * + * @since 1.5.0 + * @return bool + */ + private function save_settings() { + $l_arr_new_settings = array(); + + // TODO: add nonce verification. + + // Get current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { + if ( array_key_exists( $l_str_key, $_POST ) ) { + $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); + } else { + // Setting is not defined in the POST array, define it to avoid the Default value. + $l_arr_new_settings[ $l_str_key ] = ''; + } + } + // Update settings. + return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); + } + // phpcs:enable + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @since 1.5.0 + */ + public function description() { + // Default no description will be displayed. + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @since 1.5.0 + * @param string $p_str_setting_key_name Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function load_setting( $p_str_setting_key_name ) { + // Get current section. + reset( $this->a_arr_sections ); + $p_arr_return = array(); + $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); + return $p_arr_return; + } + + /** + * Returns a line break to start a new line. + * + * @since 1.5.0 + * @return string + */ + protected function add_newline() { + return '
                                                                                    '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @since 1.5.0 + * @return string + */ + protected function add_line_space() { + return '

                                                                                    '; + } + + /** + * Returns a simple text inside html text. + * + * @since 1.5.0 + * @param string $p_str_text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function add_text( $p_str_text ) { + return sprintf( '%s', $p_str_text ); + } + + /** + * Returns the html tag for an input/select label. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_caption Label caption. + * @return string + */ + protected function add_label( $p_str_setting_name, $p_str_caption ) { + if ( empty( $p_str_caption ) ) { + return ''; + } + + /* + * Remove the colon causing localization issues with French, and with + * languages not using punctuation at all, and with languages using other + * punctuation marks instead of colon, e.g. Greek using a raised dot. + * In French, colon is preceded by a space, forcibly non-breaking, and + * narrow per new school. + * Add colon to label strings for inclusion in localization. Colon after + * label is widely preferred best practice, mandatory per + * [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui). + */ + return sprintf( '', $p_str_setting_name, $p_str_caption ); + } + + /** + * Returns the html tag for an input [type = text]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_str_max_length Maximum length of the input, default 999 characters. + * @param bool $p_bool_readonly Set the input to be read only, default false. + * @param bool $p_bool_hidden Set the input to be hidden, default false. + * @return string + */ + protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) { + $l_str_style = ''; + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + if ( $p_bool_hidden ) { + $l_str_style .= 'display:none;'; + } + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $p_str_max_length, + $l_str_style, + $l_arr_data['value'], + $p_bool_readonly ? 'readonly="readonly"' : '' + ); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @return string + */ + protected function add_checkbox( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : '' + ); + } + + /** + * Returns the html tag for a select box. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre select the current value. + * @param array $p_arr_options Possible options to be selected. + * @return string + */ + protected function add_select_box( $p_str_setting_name, $p_arr_options ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + $l_str_options = ''; + + foreach ( $p_arr_options as $l_str_value => $l_str_caption ) { + $l_str_options .= sprintf( + '', + $l_str_value, + $l_str_value === $l_arr_data['value'] ? 'selected' : '', + $l_str_caption + ); + } + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_options + ); + } + + /** + * Returns the html tag for a text area. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre fill the text area. + * @return string + */ + protected function add_textarea( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @since 1.5.6 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @return string + */ + protected function add_color_selection( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_in_min Minimum value. + * @param int $p_int_max Maximum value. + * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + + if ( $p_bool_deci ) { + $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_value, + $p_in_min, + $p_int_max + ); + } else { + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'], + $p_in_min, + $p_int_max + ); + } + } + +} diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php new file mode 100644 index 0000000..502f293 --- /dev/null +++ b/class/layout/diagnostics.php @@ -0,0 +1,149 @@ +add_section( 'diagnostics', __( 'Diagnostics', 'footnotes' ), null, false ), + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @since 1.5.0 + * @return array + */ + protected function get_meta_boxes() { + return array( + $this->add_meta_box( 'diagnostics', 'diagnostics', __( 'Displays information about the web server, PHP and WordPress', 'footnotes' ), 'Diagnostics' ), + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_php_extensions = ''; + // Iterate through each PHP extension. + foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) { + if ( $l_int_index > 0 ) { + $l_str_php_extensions .= ' | '; + } + $l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension ); + } + + $l_obj_current_theme = wp_get_theme(); + + $l_str_wordpress_plugins = ''; + // Iterate through each installed WordPress Plugin. + foreach ( get_plugins() as $l_arr_plugin ) { + $l_str_wordpress_plugins .= '
                                                                                    '; + $l_str_wordpress_plugins .= ''; + // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found + $l_str_wordpress_plugins .= ''; + // phpcs:enable + $l_str_wordpress_plugins .= ''; + } + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' ); + + if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { + die; + } else { + $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); + } + if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + die; + } else { + $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + } + + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-server' => __( 'Server name', 'footnotes' ), + 'server' => $l_str_server_name, + + 'label-php' => __( 'PHP version', 'footnotes' ), + 'php' => phpversion(), + + 'label-user-agent' => __( 'User agent', 'footnotes' ), + 'user-agent' => $l_str_http_user_agent, + + 'label-max-execution-time' => __( 'Max execution time', 'footnotes' ), + 'max-execution-time' => ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'footnotes' ), + + 'label-memory-limit' => __( 'Memory limit', 'footnotes' ), + 'memory-limit' => ini_get( 'memory_limit' ), + + 'label-php-extensions' => __( 'PHP extensions', 'footnotes' ), + 'php-extensions' => $l_str_php_extensions, + + 'label-wordpress' => __( 'WordPress version', 'footnotes' ), + 'wordpress' => $wp_version, + + 'label-theme' => __( 'Active Theme', 'footnotes' ), + 'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']', + + 'plugins' => $l_str_wordpress_plugins, + ) + ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + // Display template with replaced placeholders. + echo $l_obj_template->get_content(); + // phpcs:enable + } +} diff --git a/class/layout/init.php b/class/layout/init.php new file mode 100644 index 0000000..72c347d --- /dev/null +++ b/class/layout/init.php @@ -0,0 +1,207 @@ +a_arr_sub_page_classes[ $l_obj_class->get_priority() ] = $l_obj_class; + } + } + ksort( $this->a_arr_sub_page_classes ); + + // Register hooks/actions. + add_action( 'admin_init', array( $this, 'initialize_settings' ) ); + add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); + // Register AJAX callbacks for Plugin information. + add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); + add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @since 1.5.0 + */ + public function initialize_settings() { + MCI_Footnotes_Settings::instance()->register_settings(); + // Iterate though each sub class of the layout engine and register their sections. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function register_main_menu() { + global $menu; + // Iterate through each main menu. + foreach ( $menu as $l_arr_main_menu ) { + // 3terate through each main menu attribute. + foreach ( $l_arr_main_menu as $l_str_attribute ) { + // Main menu already added, append sub pages and stop. + if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { + $this->register_sub_pages(); + return; + } + } + } + + // Add a new main menu page to the WordPress dashboard. + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // Page title. + self::C_STR_MAIN_MENU_TITLE, // Menu title. + 'manage_options', // Capability. + self::C_STR_MAIN_MENU_SLUG, // Menu slug. + array( $this, 'display_other_plugins' ), // Function. + plugins_url( 'footnotes/img/main-menu.png' ), // Icon URL. + null // Position. + ); + $this->register_sub_pages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @since 1.5.0 + */ + private function register_sub_pages() { + // First registered sub menu page MUST NOT contain a unique slug suffix. + // Iterate though each sub class of the layout engine and register their sub page. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sub_page(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @since 1.5.0 + */ + public function display_other_plugins() { + printf( '

                                                                                    ' ); + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + + printf( 'visit Mark Cheret' ); + printf( '

                                                                                    ' ); + + printf( '' ); + } + + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @since 1.5.0 + */ + public function get_plugin_meta_information() { + // TODO: add nonce verification. + + // Get plugin internal name from POST data. + if ( isset( $_POST['plugin'] ) ) { + $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); + } + + if ( empty( $l_str_plugin_name ) ) { + echo wp_json_encode( array( 'error' => 'Plugin name invalid.' ) ); + exit; + } + $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; + // Call URL and collect data. + $l_arr_response = wp_remote_get( $l_str_url ); + // Check if response is valid. + if ( is_wp_error( $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); + exit; + } + if ( ! array_key_exists( 'body', $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); + exit; + } + // Get the body of the response. + $l_str_response = $l_arr_response['body']; + // Get plugin object. + $l_arr_plugin = json_decode( $l_str_response, true ); + if ( empty( $l_arr_plugin ) ) { + echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                    URL: ' . $l_str_url . '
                                                                                    Response: ' . $l_str_response ) ); + exit; + } + + $l_int_num_ratings = array_key_exists( 'num_ratings', $l_arr_plugin ) ? intval( $l_arr_plugin['num_ratings'] ) : 0; + $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; + $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); + + // Return Plugin information as JSON encoded string. + echo wp_json_encode( + array( + 'error' => '', + 'PluginDescription' => array_key_exists( 'short_description', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['short_description'] ) : 'Error reading Plugin information', + 'PluginAuthor' => array_key_exists( 'author', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['author'] ) : 'unknown', + 'PluginRatingText' => $l_int_stars . ' ' . __( 'rating based on', 'footnotes' ) . ' ' . $l_int_num_ratings . ' ' . __( 'ratings', 'footnotes' ), + 'PluginRating1' => $l_int_stars >= 0.5 ? 'star-full' : 'star-empty', + 'PluginRating2' => $l_int_stars >= 1.5 ? 'star-full' : 'star-empty', + 'PluginRating3' => $l_int_stars >= 2.5 ? 'star-full' : 'star-empty', + 'PluginRating4' => $l_int_stars >= 3.5 ? 'star-full' : 'star-empty', + 'PluginRating5' => $l_int_stars >= 4.5 ? 'star-full' : 'star-empty', + 'PluginRating' => $l_int_num_ratings, + 'PluginLastUpdated' => array_key_exists( 'last_updated', $l_arr_plugin ) ? $l_arr_plugin['last_updated'] : 'unknown', + 'PluginDownloads' => array_key_exists( 'downloaded', $l_arr_plugin ) ? $l_arr_plugin['downloaded'] : '---', + ) + ); + exit; + } + // phpcs:enable +} diff --git a/class/layout/settings.php b/class/layout/settings.php new file mode 100644 index 0000000..bfddc98 --- /dev/null +++ b/class/layout/settings.php @@ -0,0 +1,1261 @@ +add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true ); + + // Sync tab name with mirror in public function custom_css_migration(). + $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true ); + + $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true ); + $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true ); + $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false ); + + return $l_arr_tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * hyperlink_arrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function get_meta_boxes() { + $l_arr_meta_boxes = array(); + + // Sync box name with mirror in task.php. + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); + + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' ); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' ); + } + + $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' ); + + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' ); + } + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' ); + + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction in how to use the plugin', 'footnotes' ), 'help' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' ); + + return $l_arr_meta_boxes; + } + + /** + * Displays all settings for the reference container. + * + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function reference_container() { + + // Options for the label element. + $l_arr_label_element = array( + 'p' => __( 'paragraph', 'footnotes' ), + 'h2' => __( 'heading 2', 'footnotes' ), + 'h3' => __( 'heading 3', 'footnotes' ), + 'h4' => __( 'heading 4', 'footnotes' ), + 'h5' => __( 'heading 5', 'footnotes' ), + 'h6' => __( 'heading 6', 'footnotes' ), + ); + // Options for the positioning of the reference container. + $l_arr_positions = array( + 'post_end' => __( 'at the end of the post', 'footnotes' ), + 'widget' => __( 'in the widget area', 'footnotes' ), + 'footer' => __( 'in the footer', 'footnotes' ), + ); + // Basic responsive page layout options. + $l_arr_page_layout_options = array( + 'none' => __( 'No', 'footnotes' ), + 'reference-container' => __( 'to the reference container exclusively', 'footnotes' ), + 'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ), + 'main-content' => __( 'to the main element including the post title', 'footnotes' ), + ); + // Options for the separating punctuation between backlinks. + $l_arr_separators = array( + // Unicode character names are conventionally uppercase. + 'comma' => __( 'COMMA', 'footnotes' ), + 'semicolon' => __( 'SEMICOLON', 'footnotes' ), + 'en_dash' => __( 'EN DASH', 'footnotes' ), + ); + // Options for the terminating punctuation after backlinks. + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. + // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_terminators = array( + 'period' => __( 'FULL STOP', 'footnotes' ), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts). + 'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ), + 'colon' => __( 'COLON', 'footnotes' ), + ); + // Options for the first column width (per cent is a ratio, not a unit). + $l_arr_width_units = array( + '%' => __( 'per cent', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'rem' => __( 'root em', 'footnotes' ), + 'em' => __( 'em', 'footnotes' ), + 'vw' => __( 'viewport width', 'footnotes' ), + ); + // Options for reference container script mode. + $l_arr_script_mode = array( + 'jquery' => __( 'jQuery', 'footnotes' ), + 'js' => __( 'plain JavaScript', 'footnotes' ), + ); + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), + 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), + + 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), + 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), + + 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), + 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ), + + 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ), + 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ), + + 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), + 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), + 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), + + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), + // Translators: %s: at the end of the post. + 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), + + 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), + 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ), + 'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ), + + 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ), + 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ), + + 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ), + 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ), + 'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ), + + 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ), + 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ), + 'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ), + + 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), + 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), + 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), + + 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), + 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), + 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), + + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), + 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), + 'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ), + + 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ), + 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ), + + 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ), + '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ), + 'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ), + + 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ), + 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ), + 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ), + 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ), + 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ), + 'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ), + + 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ), + 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ), + 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ), + 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ), + 'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ), + + 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ), + 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), + 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), + 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), + 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), + 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), + 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), + 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), + 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + + 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), + 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), + 'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ), + + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), + 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the footnotes start and end tag short codes. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function start_end() { + // Footnotes start tag short code options. + $l_arr_shortcode_start = array( + '((' => '((', + '(((' => '(((', + '{{' => '{{', + '{{{' => '{{{', + '[n]' => '[n]', + '[fn]' => '[fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[ref]' => '[ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), + ); + // Footnotes end tag short code options. + $l_arr_shortcode_end = array( + '))' => '))', + ')))' => ')))', + '}}' => '}}', + '}}}' => '}}}', + '[/n]' => '[/n]', + '[/fn]' => '[/fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[/ref]' => '[/ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), + ); + // Options for the syntax validation. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), + + 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), + 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), + 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ), + + 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ), + 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ), + 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), + + // For script showing/hiding user defined text boxes. + 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + 'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ), + + // Option to enable syntax validation, label mirrored in task.php. + 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ), + 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), + 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), + + 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the footnotes numbering. + * + * @since 2.2.0 + */ + public function numbering() { + // Define some space for the output. + $l_str_space = '     '; + // Options for the combination of identical footnotes. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for the numbering style of the footnotes. + $l_arr_counter_style = array( + 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', + 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', + 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', + 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', + 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', + 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ), + 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ), + + // Algorithmically combine identicals. + 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ), + 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ), + 'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ), + // Support for Ibid. notation added thanks to @meglio in . + 'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the scrolling behavior. + * + * @since 2.2.0 + */ + public function scrolling() { + + // Options for enabling hard links for AMP compat. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), + 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), + 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), + + 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), + 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), + 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), + + // Enable hard links for AMP compat. + 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), + 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), + 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), + + 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), + 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), + 'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ), + + 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ), + 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ), + 'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ), + 'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ), + + // Enable backlink tooltips. + 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ), + 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ), + 'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead.', 'footnotes' ), + + 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), + 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), + 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function love() { + // Options for the acknowledgment display in the footer. + $l_arr_love = array( + // Logo only. + 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Logo followed by heart symbol. + 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // Logo preceded by heart symbol. + 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: 2: heart symbol 1: footnotes logogram. + 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // Translators: %s: Plugin logo. + 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: %s: Plugin logo. + 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: %s: Plugin logo. + 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + 'random' => __( 'randomly determined display of either mention', 'footnotes' ), + // Translators: 1: Plugin logo.2: heart symbol. + 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + // Translators: %s: Plugin logo. + 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), + // Translators: %s: Plugin logo. + 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the excerpt setting. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function excerpts() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), + 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), + 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), + // Translators: %s: link to the Advanced Excerpt Plugin. + 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for the footnote referrers. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function superscript() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for superscript normalize scope. + $l_arr_normalize_superscript = array( + 'no' => __( 'No', 'footnotes' ), + 'referrers' => __( 'Footnote referrers', 'footnotes' ), + 'all' => __( 'All superscript elements', 'footnotes' ), + ); + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), + 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), + + 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), + 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), + + 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ), + 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), + + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), + + 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), + 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), + 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays enabled status for the footnotes mouse-over box. + * + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function mouseover_box() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ), + 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ), + 'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ), + + 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), + 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), + 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), + // Translators: %s: Plugin logo. + 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays position settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_position() { + + // Options for the Mouse-over box position. + $l_arr_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top center' => __( 'top center', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'center right' => __( 'center right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom center' => __( 'bottom center', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), + 'center left' => __( 'center left', 'footnotes' ), + ); + // Options for the alternative Mouse-over box position. + $l_arr_alternative_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ), + 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ), + 'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ), + + 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ), + 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ), + + 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ), + 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays dimensions setting for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_dimensions() { + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ), + 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ), + 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ), + 'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays timing settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_timing() { + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ), + 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ), + 'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ), + 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ), + 'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ), + 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ), + 'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ), + 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ), + 'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays truncation settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_truncation() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ), + 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ), + + 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ), + 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ), + // The feature trims back until the last full word. + 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), + + 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), + 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays dedicated tooltip text settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_text() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'description-delimiter' => __( '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.', 'footnotes' ), + + 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ), + 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ), + 'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ), + + 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ), + 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ), + 'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ), + 'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ), + + 'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays style settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_appearance() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for the font size unit. + $l_arr_font_size_units = array( + 'em' => __( 'em', 'footnotes' ), + 'rem' => __( 'rem', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'pt' => __( 'points', 'footnotes' ), + 'pc' => __( 'picas', 'footnotes' ), + 'mm' => __( 'millimeters', 'footnotes' ), + '%' => __( 'per cent', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ), + 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ), + 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ), + 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ), + 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), + + 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), + 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), + 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), + // Translators: %s: Clear or leave empty. + 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), + 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), + 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), + + 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), + 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), + 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), + 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), + + 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), + 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for the backlink symbol. + * + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function hyperlink_arrow() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), + 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ), + 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), + 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), + 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the Custom CSS box. + * + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function custom_css() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ), + + // phpcs:disable Squiz.PHP.CommentedOutCode.Found + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text",. + // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-2" => ".footnote_tooltip",. + // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-3" => ".footnote_plugin_index",. + // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-4" => ".footnote_plugin_text",. + // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)). + // phpcs:enable + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays transitional legacy Custom CSS box. + * + * @since 2.2.2 + */ + public function custom_css_migration() { + + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ), + + 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), + 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), + 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), + // Translators: %s: Referres and tooltips. + 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the new Custom CSS box. + * + * @since 2.2.2 + */ + public function custom_css_new() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ), + + 'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function lookup_hooks() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' ); + + // Replace all placeholders. + $l_obj_template->replace( + array( + 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), + // Translators: 1: 99; 2: 1200. + 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), + // Translators: 1: PHP_INT_MAX; 2: 0; 3: -1; 4: 'PHP_INT_MAX'. + 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), + 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), + + 'head-hook' => __( 'WordPress hook function name', 'footnotes' ), + 'head-checkbox' => __( 'Activate', 'footnotes' ), + 'head-numbox' => __( 'Priority level', 'footnotes' ), + 'head-url' => __( 'WordPress documentation', 'footnotes' ), + + 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), + 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), + 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', + + 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), + 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), + 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', + + 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), + 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), + 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', + + 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), + 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), + 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', + + 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), + 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), + 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays a short introduction of the Plugin. + * + * @since 1.5.0 + */ + public function Help() { + global $g_obj_mci_footnotes; + // Load footnotes starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + + if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) { + // Load user defined starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + } + $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo dolores ' . + 'et ea rebum. Stet clita kasd gubergren, no sea ' . + 'takimata sanctus est Lorem ipsum dolor sit amet. ' . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo ' . + 'dolores et ea rebum. Stet clita kasd gubergren, no ' . + 'sea takimata sanctus est Lorem ipsum dolor sit amet.' . + $l_arr_footnote_ending_tag['value'] . ' World!'; + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), + 'start' => $l_arr_footnote_starting_tag['value'], + 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), + 'end' => $l_arr_footnote_ending_tag['value'], + 'example-code' => $l_str_example, + 'example-string' => '
                                                                                    ' . __( 'will be displayed as:', 'footnotes' ), + 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), + // Translators: 1: ; 2: . + 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), + ) + ); + // Call wp_head function to get the Styling of the mouse-over box. + $g_obj_mci_footnotes->a_obj_task->wp_head(); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all Donate button to support the developers. + * + * @since 1.5.0 + */ + public function donate() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'caption' => __( 'Donate now', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } +} diff --git a/class/settings.php b/class/settings.php index 2e8acaa..7073a0e 100644 --- a/class/settings.php +++ b/class/settings.php @@ -1,13 +1,11 @@ - array( + 'footnotes_storage' => array( - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_STR_FOOTNOTES_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_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + 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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - // 2.5.4 fast-tracked: - self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + // 2.5.4 fast-tracked. + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - self::C_STR_REFERENCE_CONTAINER_NAME => 'References', - self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', - self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no', - self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', + 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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + 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', - // whether to enqueue additional stylesheet: - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // Whether to enqueue additional stylesheet. + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - // top and bottom margins: - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // Top and bottom margins. + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - // table cell borders: - self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // Table cell borders. + self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - // backlink symbol: - self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // Backlink symbol. + self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - // backlink separators and terminators are often not preferred. - // but a choice must be provided along with the ability to customize: - self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', - self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // Backlink separators and terminators are often not preferred.. + // But a choice must be provided along with the ability to customize. + 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 => '', - // set backlinks column width: - self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // Set backlinks column width. + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - // set backlinks column max. width: - self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // Set backlinks column max. width. + 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', - // whether a
                                                                                    tag is inserted: - self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // Whether a
                                                                                    tag is inserted. + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - // whether to enable URL line wrapping: - self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // Whether to enable URL line wrapping. + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - // whether to use link elements: - self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // Whether to use link elements. + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', - // excerpt should be disabled: - self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + // Excerpt should be disabled. + self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', - self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', - self::C_STR_FOOTNOTES_LOVE => 'no', + self::C_STR_FOOTNOTES_LOVE => 'no', ), - "footnotes_storage_custom" => array( + 'footnotes_storage_custom' => array( - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - // 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: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // The truncation length is raised from 150 to 200 chars. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - // 2.5.4 fast-tracked: - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', - self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 2.5.4 fast-tracked. + 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 => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - // 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: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover. + // The current line of text (web coordinates origin is top left). + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // The width should be limited to start with, for the box to have shape. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + // Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - // tooltip display durations: - // called mouse over box not tooltip for consistency - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // Tooltip display durations. + // Called mouse over box not tooltip for consistency. + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - // tooltip font size reset to legacy by default since 2.1.4; - // was set to inherit since 2.1.1 as it overrode custom CSS, - // is moved to settings since 2.1.4 2020-12-04T1023+0100 - self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', - self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + // Tooltip font size reset to legacy by default since 2.1.4;. + // Was set to inherit since 2.1.1 as it overrode custom CSS,. + // Is moved to settings since 2.1.4 2020-12-04T1023+0100. + self::C_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', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background. + // By default, due to diverging user preferences. White is neutral. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - 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_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + // The mouse over box corners mustn’t be rounded as that is outdated. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - // Custom CSS migrates to a dedicated tab: - self::C_STR_CUSTOM_CSS => '', + // Custom CSS migrates to a dedicated tab. + self::C_STR_CUSTOM_CSS => '', ), - "footnotes_storage_expert" => array( + 'footnotes_storage_expert' => array( - // These are checkboxes; keyword 'checked' is converted to Boolean true, - // empty string to false (default): + // These are checkboxes; keyword 'checked' is converted to Boolean true,. + // Empty string to false (default). - // Titles should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. - // See - // Yet in titles, footnotes are still buggy, because WordPress - // uses the title string in menus and in the title element. - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + // Titles should all be enabled by default to prevent users from. + // Thinking at first that the feature is broken in post titles.. + // See . + // Yet in titles, footnotes are still buggy, because WordPress. + // Uses the title string in menus and in the title element.. + self::C_STR_EXPERT_LOOKUP_THE_TITLE => '', - self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked', - // And the_excerpt is disabled by default following @nikelaos in - // - // - self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + // And the_excerpt is disabled by default following @nikelaos in. + // . + // . + self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '', - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '', - // 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. - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // 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.. + self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '', - // initially hard-coded default - // shows "9223372036854780000" instead of 9223372036854775807 in the numbox - // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: - // - // interpret -1 as PHP_INT_MAX instead - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // Initially hard-coded default. + // Shows "9223372036854780000" instead of 9223372036854775807 in the numbox. + // Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty. + // . + // Interpret -1 as PHP_INT_MAX instead. + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // 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. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + // 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.. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), - "footnotes_storage_custom_css" => array( + 'footnotes_storage_custom_css' => array( - self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', ), @@ -1074,130 +1032,123 @@ class MCI_Footnotes_Settings { /** * Contains all Settings from each Settings container as soon as this class is initialized. * - * @author Stefan Herndler * @since 1.5.0 * @var array */ - private $a_arr_Settings = array(); + private $a_arr_settings = array(); /** * Class Constructor. Loads all Settings from each WordPress Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ private function __construct() { - $this->loadAll(); + $this->load_all(); } /** * Returns a singleton of this class. * - * @author Stefan Herndler * @since 1.5.0 * @return MCI_Footnotes_Settings */ public static function instance() { - // no instance defined yet, load it - if (self::$a_obj_Instance === null) { - self::$a_obj_Instance = new self(); + // No instance defined yet, load it. + if ( ! self::$a_obj_instance ) { + self::$a_obj_instance = new self(); } - // return a singleton of this class - return self::$a_obj_Instance; + // Return a singleton of this class. + return self::$a_obj_instance; } /** * Returns the name of a specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return str Settings Container name. */ - public function getContainer($p_int_Index) { - return $this->a_arr_Container[$p_int_Index]; + public function get_container( $p_int_index ) { + return $this->a_arr_container[ $p_int_index ]; } /** * Returns the default values of a specific Settings Container. * - * @author Stefan Herndler * @since 1.5.6 - * @param int $p_int_Index Settings Container Aray Key Index. + * @param int $p_int_index Settings Container Aray Key Index. * @return array */ - public function getDefaults($p_int_Index) { - return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; + public function get_defaults( $p_int_index ) { + return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ]; } /** * Loads all Settings from each Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ - private function loadAll() { - // clear current settings - $this->a_arr_Settings = array(); - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // load settings - $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); + 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 ) ); } } /** * Loads all Settings from specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). * * @since ditched trimming whitespace from text box content in response to user request. * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 */ - private function Load($p_int_Index) { - // load all settings from container - $l_arr_Options = get_option($this->getContainer($p_int_Index)); - // load all default settings - $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; + 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 ) ]; - // no settings found, set them to their default value - if (empty($l_arr_Options)) { - return $l_arr_Default; + // No settings found, set them to their default value. + if ( empty( $l_arr_options ) ) { + return $l_arr_default; } - // 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; + // 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; } } - // iterate through each setting in the container - foreach($l_arr_Options as $l_str_Key => $l_str_Value) { - // remove all whitespace at the beginning and end of a setting - // trimming whitespace is ditched: - //$l_str_Value = trim($l_str_Value); - // write the sanitized value back to the setting container - $l_arr_Options[$l_str_Key] = $l_str_Value; + // Iterate through each setting in the container. + foreach ( $l_arr_options as $l_str_key => $l_str_value ) { + // Remove all whitespace at the beginning and end of a setting. + // Trimming whitespace is ditched. + // $l_str_value = trim($l_str_value);. + // Write the sanitized value back to the setting container. + $l_arr_options[ $l_str_key ] = $l_str_value; } - // return settings loaded from Container - return $l_arr_Options; + // Return settings loaded from Container. + return $l_arr_options; } /** * Updates a whole Settings container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index of the Settings container. - * @param array $p_arr_newValues new Settings. + * @param int $p_int_index Index of the Settings container. + * @param array $p_arr_new_values new Settings. * @return bool */ - public function saveOptions($p_int_Index, $p_arr_newValues) { - if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { - $this->loadAll(); + 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(); return true; } return false; @@ -1206,19 +1157,17 @@ class MCI_Footnotes_Settings { /** * Returns the value of specified Settings name. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Key Settings Array Key name. + * @param string $p_str_key Settings Array Key name. * @return mixed Value of the Setting on Success or Null in Settings name is invalid. */ - 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; + 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; } /** * Deletes each Settings Container and loads the default values for each Settings Container. * - * @author Stefan Herndler * @since 1.5.0 * * Edit: This didn’t actually work. @@ -1227,27 +1176,28 @@ class MCI_Footnotes_Settings { * done by deleting and reinstalling (see the warning about database backup). * 2020-12-13T1353+0100 */ - public function ClearAll() { - // iterate through each Settings Container - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // delete the settings container - delete_option($this->getContainer($i)); + 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 ) ); } - // set settings back to the default values - $this->a_arr_Settings = $this->a_arr_Default; + // Set settings back to the default values. + $this->a_arr_settings = $this->a_arr_default; } /** * Register all Settings Container for the Plugin Settings Page in the Dashboard. * Settings Container Label will be the same as the Settings Container Name. * - * @author Stefan Herndler * @since 1.5.0 */ - public function RegisterSettings() { - // register all settings - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - register_setting($this->getContainer($i), $this->getContainer($i)); + 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 ) ); } } } diff --git a/class/task.php b/class/task.php index 249636c..f477614 100644 --- a/class/task.php +++ b/class/task.php @@ -1,14 +1,11 @@ -get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); - $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); - $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); - $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); - $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); + // Get values from settings. + $l_int_the_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) ); + $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) ); + $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) ); + $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) ); + $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) ); - // PHP_INT_MAX can be set by -1: - $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; - $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; - $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; - $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; - $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; + // PHP_INT_MAX can be set by -1. + $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority; + $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority; + $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority; + $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority; + $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority; + // Append custom css to the header. + add_filter( 'wp_head', array( $this, 'wp_head' ), PHP_INT_MAX ); - // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + // Append the love and share me slug to the footer. + add_filter( 'wp_footer', array( $this, 'wp_footer' ), PHP_INT_MAX ); - // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { + add_filter( 'the_title', array( $this, 'the_title' ), $l_int_the_title_priority ); } - // configurable priority level for reference container relative positioning; default 98: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); + // Configurable priority level for reference container relative positioning; default 98. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { + add_filter( 'the_content', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for category pages + * Hook for category pages. * * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. * @@ -462,10 +530,10 @@ class MCI_Footnotes_Task { * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ */ - add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'term_description', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for popup maker popups + * Hook for popup maker popups. * * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @@ -475,22 +543,21 @@ class MCI_Footnotes_Task { * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ */ - add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) { + add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), $l_int_the_excerpt_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) { + add_filter( 'widget_title', array( $this, 'widget_title' ), $l_int_widget_title_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) { + add_filter( 'widget_text', array( $this, 'widget_text' ), $l_int_widget_text_priority ); } - /** - * The the_post hook + * The the_post hook. * * - Adding: Hooks: support 'the_post' in response to user request for custom post types. * @@ -555,18 +622,16 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges */ - // reset stored footnotes when displaying the header - self::$a_arr_Footnotes = array(); - self::$a_bool_AllowLoveMe = true; + // Reset stored footnotes when displaying the header. + self::$a_arr_footnotes = array(); + self::$a_bool_allow_love_me = true; } /** * Outputs the custom css to the header of the public page. * - * @author Stefan Herndler * @since 1.5.0 * - * * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. * @since 2.1.3 raise settings priority to override theme stylesheets @@ -579,7 +644,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // insert start tag without switching out of PHP: + // Insert start tag without switching out of PHP. echo "\r\n\r\n"; /** @@ -921,184 +1003,206 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified: + * The script for alternative tooltips is printed formatted, not minified, + * for transparency. It isn’t indented though (the PHP open tag neither). */ - if ( self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { + + // Start internal script. ?> get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { - echo $this->ReferenceContainer(); + if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $this->reference_container(); + // phpcs:enable } - // get setting for love and share this plugin - $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); - // check if the admin allows to add a link to the footer - if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { + // Get setting for love and share this plugin. + $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); + // Check if the admin allows to add a link to the footer. + if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) { return; } - // set a hyperlink to the word "footnotes" in the Love slug - $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); - // get random love me text - if (strtolower($l_str_LoveMeIndex) == "random") { - $l_str_LoveMeIndex = "text-" . rand(1,7); + // Set a hyperlink to the word "footnotes" in the Love slug. + $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ); + // Get random love me text. + if ( 'random' === strtolower( $l_str_love_me_index ) ) { + $l_str_love_me_index = 'text-' . wp_rand( 1, 7 ); } - switch ($l_str_LoveMeIndex) { - // options named wrt backcompat, simplest is default: - case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; - case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; + switch ( $l_str_love_me_index ) { + // Options named wrt backcompat, simplest is default. + case 'text-1': + /* Translators: 2: Link to plugin page 1: Love heart symbol */ + $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-2': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-4': + /* Translators: 1: Link to plugin page 2: Love heart symbol */ + $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-5': + /* Translators: 1: Love heart symbol 2: Link to plugin page */ + $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); + break; + case 'text-6': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-7': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-3': + default: + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); + break; } - echo sprintf('
                                                                                    %s
                                                                                    ', $l_str_LoveMeText); + echo sprintf( '
                                                                                    %s
                                                                                    ', esc_html( $l_str_love_me_text ) ); } /** * Replaces footnotes in the post/page title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function the_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function the_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_content($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + public function the_content( $p_str_content ) { + // phpcs:disable WordPress.PHP.YodaConditions.NotYoda + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ); + // phpcs:enable } /** * Replaces footnotes in the excerpt of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_excerpt($p_str_Content) { - return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); + public function the_excerpt( $p_str_content ) { + return $this->exec( $p_str_content, false, ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT ) ) ); } /** * Replaces footnotes in the widget title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function widget_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current widget. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_text($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + public function widget_text( $p_str_content ) { + // phpcs:disable WordPress.PHP.YodaConditions.NotYoda + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); + // phpcs:enable } /** * Replaces footnotes in each Content var of the current Post object. * - * @author Stefan Herndler * @since 1.5.4 - * @param array|WP_Post $p_mixed_Posts + * @param array|WP_Post $p_mixed_posts The current Post object. */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + public function the_post( &$p_mixed_posts ) { + // Single WP_Post object received. + if ( ! is_array( $p_mixed_posts ) ) { + $p_mixed_posts = $this->replace_post_object( $p_mixed_posts ); return; } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + $num_posts = count( $p_mixed_posts ); + // Array of WP_Post objects received. + for ( $l_int_index = 0; $l_int_index < $num_posts; $l_int_index++ ) { + $p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] ); } } /** * Replace all Footnotes in a WP_Post object. * - * @author Stefan Herndler * @since 1.5.6 - * @param WP_Post $p_obj_Post + * @param WP_Post $p_obj_post The Post object. * @return WP_Post */ - private function replacePostObject($p_obj_Post) { - //MCI_Footnotes_Convert::debug($p_obj_Post); - $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); - $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); - $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); - return $p_obj_Post; + private function replace_post_object( $p_obj_post ) { + $p_obj_post->post_content = $this->exec( $p_obj_post->post_content ); + $p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered ); + $p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt ); + return $p_obj_post; } /** * Replaces all footnotes that occur in the given content. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * - * * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. */ - public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) { - // replace all footnotes in the content, settings are converted to html characters - $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); - // replace all footnotes in the content, settings are NOT converted to html characters - $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); + // Replace all footnotes in the content, settings are converted to html characters. + $p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text ); + // Replace all footnotes in the content, settings are NOT converted to html characters. + $p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text ); /** - * Reference container customized positioning through shortcode + * Reference container customized positioning through shortcode. * * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @@ -1116,50 +1220,48 @@ class MCI_Footnotes_Task { * * @reporter @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 - * */ - // append the reference container or insert at shortcode: - $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); - if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { - $l_str_ReferenceContainerPositionShortcode = '[[references]]'; + // Append the reference container or insert at shortcode. + $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); + if ( empty( $l_str_reference_container_position_shortcode ) ) { + $l_str_reference_container_position_shortcode = '[[references]]'; } - if ( $p_bool_OutputReferences ) { + if ( $p_bool_output_references ) { - if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { + if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) { - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content ); } else { - $p_str_Content .= $this->ReferenceContainer(); + $p_str_content .= $this->reference_container(); } - // increment the container ID: - self::$a_int_ReferenceContainerId++; + // Increment the container ID. + self::$a_int_reference_container_id++; } - // delete position shortcode should any remain: - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); + // Delete position shortcode should any remain. + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content ); - // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found - if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { - self::$a_bool_AllowLoveMe = false; - $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); + // Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. + if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) { + self::$a_bool_allow_love_me = false; + $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content ); } - // return the content with replaced footnotes and optional reference container appended: - return $p_str_Content; + // Return the content with replaced footnotes and optional reference container appended. + return $p_str_content; } /** * Replaces all footnotes in the given content and appends them to the static property. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Content to be searched for footnotes. - * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Content to be searched for footnotes. + * @param bool $p_bool_convert_html_chars html encode settings, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * * @since 2.0.0 various. @@ -1168,37 +1270,37 @@ class MCI_Footnotes_Task { * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. */ - public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { + public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) { - // post ID to make everything unique wrt infinite scroll and archive view - self::$a_int_PostId = get_the_id(); + // Post ID to make everything unique wrt infinite scroll and archive view. + self::$a_int_post_id = get_the_id(); - // contains the index for the next footnote on this page - $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; + // Contains the index for the next footnote on this page. + $l_int_footnote_index = count( self::$a_arr_footnotes ) + 1; - // contains the starting position for the lookup of a footnote - $l_int_PosStart = 0; + // Contains the starting position for the lookup of a footnote. + $l_int_pos_start = 0; - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - // decode html special chars - if ($p_bool_ConvertHtmlChars) { - $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); - $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); + // Decode html special chars. + if ( $p_bool_convert_html_chars ) { + $l_str_starting_tag = htmlspecialchars( $l_str_starting_tag ); + $l_str_ending_tag = htmlspecialchars( $l_str_ending_tag ); } - // if footnotes short code is empty, return the content without changes - if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { - return $p_str_Content; + // If footnotes short code is empty, return the content without changes. + if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) { + return $p_str_content; } /** - * Footnote delimiter syntax validation + * Footnote delimiter syntax validation. * * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * @@ -1219,74 +1321,74 @@ class MCI_Footnotes_Task { * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) { - // make shortcodes conform to regex syntax: - $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); - $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); + // Make shortcodes conform to regex syntax. + $l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag ); + $l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag ); - // apply different regex depending on whether start shortcode is double/triple opening parenthesis: - if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { + // Apply different regex depending on whether start shortcode is double/triple opening parenthesis. + if ( '((' === $l_str_starting_tag || '(((' === $l_str_starting_tag ) { - // this prevents from catching a script containing e.g. a double opening parenthesis: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; + // This prevents from catching a script containing e.g. a double opening parenthesis. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ')[^\{\}])*?)(' . $l_str_start_tag_regex . '|$)#s'; } else { - // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; + // Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ').)*?)(' . $l_str_start_tag_regex . '|$)#s'; } - // check syntax and get error locations: - preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); - if ( empty( $p_arr_ErrorLocation ) ) { - self::$a_bool_SyntaxErrorFlag = false; + // Check syntax and get error locations. + preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location ); + if ( empty( $p_arr_error_location ) ) { + self::$a_bool_syntax_error_flag = false; } - // prevent generating and inserting the warning multiple times: - if ( self::$a_bool_SyntaxErrorFlag ) { + // Prevent generating and inserting the warning multiple times. + if ( self::$a_bool_syntax_error_flag ) { - // get plain text string for error location: - $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); + // Get plain text string for error location. + $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] ); - // limit string length to 300 characters: - if ( strlen( $l_str_ErrorSpotString ) > 300 ) { - $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; + // Limit string length to 300 characters. + if ( strlen( $l_str_error_spot_string ) > 300 ) { + $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…'; } - // compose warning box: - $l_str_SyntaxErrorWarning = '

                                                                                    '; - $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                    '; + // Compose warning box. + $l_str_syntax_error_warning = '

                                                                                    '; + $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                    '; - // syntax validation setting in the dashboard under the General settings tab: - $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); + // Syntax validation setting in the dashboard under the General settings tab. + /* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */ + $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); - $l_str_SyntaxErrorWarning .= '

                                                                                    '; - $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                    “'; - $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; - $l_str_SyntaxErrorWarning .= '”

                                                                                    '; + $l_str_syntax_error_warning .= '

                                                                                    '; + $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                    “'; + $l_str_syntax_error_warning .= $l_str_error_spot_string; + $l_str_syntax_error_warning .= '”

                                                                                    '; - // prepend the warning box to the content: - $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; + // Prepend the warning box to the content. + $p_str_content = $l_str_syntax_error_warning . $p_str_content; - // checked, set flag to false to prevent duplicate warning: - self::$a_bool_SyntaxErrorFlag = false; + // Checked, set flag to false to prevent duplicate warning. + self::$a_bool_syntax_error_flag = false; - return $p_str_Content; + return $p_str_content; } } + // Load referrer templates if footnotes text not hidden. + if ( ! $p_bool_hide_footnotes_text ) { - // load referrer templates if footnotes text not hidden: - if (!$p_bool_HideFootnotesText) { - - // load footnote referrer template file: - if (self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + // Load footnote referrer template file. + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' ); } else { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' ); } /** @@ -1295,56 +1397,57 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. * * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority) */ - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - // load tooltip inline script if jQuery tooltips are enabled: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); + // Load tooltip inline script if jQuery tooltips are enabled. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' ); } - } else { - $l_obj_Template = null; - $l_obj_TemplateTooltip = null; + $l_obj_template = null; + $l_obj_template_tooltip = null; } - // search footnotes short codes in the content + // Search footnotes short codes in the content. do { - // get first occurrence of the footnote start tag short code: - $i_int_LenContent = strlen($p_str_Content); - if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; - $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosStart === false) { + // Get first occurrence of the footnote start tag short code. + $i_int_len_content = strlen( $p_str_content ); + if ( $l_int_pos_start > $i_int_len_content ) { + $l_int_pos_start = $i_int_len_content; + } + $l_int_pos_start = strpos( $p_str_content, $l_str_starting_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_start ) { break; } - // get first occurrence of the footnote end tag short code: - $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosEnd === false) { + // Get first occurrence of the footnote end tag short code. + $l_int_pos_end = strpos( $p_str_content, $l_str_ending_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_end ) { break; } - // calculate the length of the footnote - $l_int_Length = $l_int_PosEnd - $l_int_PosStart; + // Calculate the length of the footnote. + $l_int_length = $l_int_pos_end - $l_int_pos_start; - // get footnote text - $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); + // Get footnote text. + $l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) ); - // get tooltip text if present: - self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); - self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + // Get tooltip text if present. + self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ); + self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode ); + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); } else { - $l_str_TooltipText = ''; + $l_str_tooltip_text = ''; } /** - * URL line wrapping for Unicode non conformant browsers + * URL line wrapping for Unicode non conformant browsers. * * @since 2.1.1 (CSS) * @since 2.1.4 (PHP) @@ -1437,7 +1540,6 @@ class MCI_Footnotes_Task { * @reporter @bernardzit * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * - * * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * @date 2020-12-23T1107+0100 * @@ -1478,48 +1580,48 @@ class MCI_Footnotes_Task { * Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces. * But given they can occur on WP-powered websites, some page builders may probably not. */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - $l_str_FootnoteText = preg_replace( + $l_str_footnote_text = preg_replace( '#(?$1', - $l_str_FootnoteText + $l_str_footnote_text ); } - // Text to be displayed instead of the footnote - $l_str_FootnoteReplaceText = ""; + // Text to be displayed instead of the footnote. + $l_str_footnote_replace_text = ''; - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - // get the configurable parts: - self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); - self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); - self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); + // Get the configurable parts. + self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ); + self::$a_str_footnote_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ); + self::$a_str_link_ids_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ); - // streamline ID concatenation: - self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + // Streamline ID concatenation. + self::$a_str_post_container_id_compound = self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_post_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_reference_container_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; } - // display the footnote referrers and the tooltips: - if (!$p_bool_HideFootnotesText) { - $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Display the footnote referrers and the tooltips. + if ( ! $p_bool_hide_footnotes_text ) { + $l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // display only a truncated footnote text if option enabled: - $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); - $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); + // Display only a truncated footnote text if option enabled. + $l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) ); + $l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) ); - // define excerpt text as footnote text by default: - $l_str_ExcerptText = $l_str_FootnoteText; + // Define excerpt text as footnote text by default. + $l_str_excerpt_text = $l_str_footnote_text; /** - * Tooltip truncation + * Tooltip truncation. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1534,34 +1636,34 @@ class MCI_Footnotes_Task { * This is equivalent to the WordPress default excerpt generation, i.e. without a * custom excerpt and without a delimiter. But WordPress does word count, usually 55. */ - if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { - $l_str_DummyText = strip_tags($l_str_FootnoteText); - if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { - $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); - $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - $l_str_ExcerptText .= ' … <'; - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; - $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; - $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= "_$l_int_Index');\""; + if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) { + $l_str_dummy_text = wp_strip_all_tags( $l_str_footnote_text ); + if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) { + $l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length ); + $l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) ); + $l_str_excerpt_text .= ' … <'; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span'; + $l_str_excerpt_text .= ' class="footnote_tooltip_continue" '; + $l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= '(\'footnote_plugin_reference_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= "_$l_int_index');\""; - // if enabled, add the hard link fragment ID: - if (self::$a_bool_HardLinksEnable) { + // If enabled, add the hard link fragment ID. + if ( self::$a_bool_hard_links_enable ) { - $l_str_ExcerptText .= ' href="#'; - $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; - $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; - $l_str_ExcerptText .= $l_int_Index; - $l_str_ExcerptText .= '"'; + $l_str_excerpt_text .= ' href="#'; + $l_str_excerpt_text .= self::$a_str_footnote_link_slug; + $l_str_excerpt_text .= self::$a_str_post_container_id_compound; + $l_str_excerpt_text .= $l_int_index; + $l_str_excerpt_text .= '"'; } - $l_str_ExcerptText .= '>'; + $l_str_excerpt_text .= '>'; /** - * Configurable read-on button label + * Configurable read-on button label. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1571,55 +1673,56 @@ class MCI_Footnotes_Task { * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ */ - $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); + $l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '' : ''; } } /** - * Referrers element superscript or baseline + * Referrers element superscript or baseline. * * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report + * * @since 2.1.1 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * - * define the HTML element to use for the referrers: + * define the HTML element to use for the referrers. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) { - $l_str_SupSpan = 'sup'; + $l_str_sup_span = 'sup'; } else { - $l_str_SupSpan = 'span'; + $l_str_sup_span = 'span'; } - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkCloseTag = ''; - // self::$a_str_LinkOpenTag will be defined as needed + self::$a_str_link_span = 'a'; + self::$a_str_link_close_tag = ''; + // Self::$a_str_link_open_tag will be defined as needed. - // compose hyperlink address (leading space is in template): - $l_str_FootnoteLinkArgument = 'href="#'; - $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; - $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteLinkArgument .= $l_int_Index; - $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; + // Compose hyperlink address (leading space is in template). + $l_str_footnote_link_argument = 'href="#'; + $l_str_footnote_link_argument .= self::$a_str_footnote_link_slug; + $l_str_footnote_link_argument .= self::$a_str_post_container_id_compound; + $l_str_footnote_link_argument .= $l_int_index; + $l_str_footnote_link_argument .= '" class="footnote_hard_link"'; /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_ReferrerAnchorElement = ''; + $l_str_referrer_anchor_element = ''; } else { @@ -1636,101 +1739,101 @@ class MCI_Footnotes_Task { * * If no hyperlink nor offset anchor is needed, initialize as empty. */ - $l_str_FootnoteLinkArgument = ''; - $l_str_ReferrerAnchorElement = ''; + $l_str_footnote_link_argument = ''; + $l_str_referrer_anchor_element = ''; - // The link element is set independently as it may be needed for styling: - if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { + // The link element is set independently as it may be needed for styling. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED ) ) ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkOpenTag = ''; - self::$a_str_LinkCloseTag = ''; + self::$a_str_link_span = 'a'; + self::$a_str_link_open_tag = ''; + self::$a_str_link_close_tag = ''; } } - // determine tooltip content: - if ( self::$a_bool_TooltipsEnabled ) { - $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; + // Determine tooltip content. + if ( self::$a_bool_tooltips_enabled ) { + $l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text; } else { - $l_str_TooltipContent = ''; + $l_str_tooltip_content = ''; } - + /** * Determine shrink width if alternative tooltips are enabled. - * + * * @since 2.5.6 */ - $l_str_TooltipStyle = ''; - if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { - $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); - if ( $l_int_TooltipLength < 70 ) { - $l_str_TooltipStyle = ' style="width: '; - $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); - $l_str_TooltipStyle .= 'em;"'; + $l_str_tooltip_style = ''; + if ( self::$a_bool_alternative_tooltips_enabled && self::$a_bool_tooltips_enabled ) { + $l_int_tooltip_length = strlen( wp_strip_all_tags( $l_str_tooltip_content ) ); + if ( $l_int_tooltip_length < 70 ) { + $l_str_tooltip_style = ' style="width: '; + $l_str_tooltip_style .= ( $l_int_tooltip_length * .7 ); + $l_str_tooltip_style .= 'em;"'; } } - // fill in 'templates/public/footnote.html': - $l_obj_Template->replace( + // Fill in 'templates/public/footnote.html'. + $l_obj_template->replace( array( - "link-span" => self::$a_str_LinkSpan, - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "hard-link" => $l_str_FootnoteLinkArgument, - "sup-span" => $l_str_SupSpan, - "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - "index" => $l_int_Index, - "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - "anchor-element" => $l_str_ReferrerAnchorElement, - "style" => $l_str_TooltipStyle, - "text" => $l_str_TooltipContent, + 'link-span' => self::$a_str_link_span, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'hard-link' => $l_str_footnote_link_argument, + 'sup-span' => $l_str_sup_span, + 'before' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), + 'index' => $l_int_index, + 'after' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), + 'anchor-element' => $l_str_referrer_anchor_element, + 'style' => $l_str_tooltip_style, + 'text' => $l_str_tooltip_content, ) ); - $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); + $l_str_footnote_replace_text = $l_obj_template->get_content(); - // reset the template - $l_obj_Template->reload(); + // Reset the template. + $l_obj_template->reload(); - // if standard tooltips are enabled but alternative are not: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + // If standard tooltips are enabled but alternative are not. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); - $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); - $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); - $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); - $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); + $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) ); + $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) ); + $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); + $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); + $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); + $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); - // fill in 'templates/public/tooltip.html': - $l_obj_TemplateTooltip->replace( + // Fill in 'templates/public/tooltip.html'. + $l_obj_template_tooltip->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), - "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, - "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, - "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, - "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, - "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, - "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'position' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION ), + 'offset-y' => ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0, + 'offset-x' => ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0, + 'fade-in-delay' => ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : 0, + 'fade-in-duration' => ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : 0, + 'fade-out-delay' => ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : 0, + 'fade-out-duration' => ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : 0, ) ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); - $l_obj_TemplateTooltip->reload(); + $l_str_footnote_replace_text .= $l_obj_template_tooltip->get_content(); + $l_obj_template_tooltip->reload(); } } - // replace the footnote with the template - $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); + // Replace the footnote with the template. + $p_str_content = substr_replace( $p_str_content, $l_str_footnote_replace_text, $l_int_pos_start, $l_int_length + strlen( $l_str_ending_tag ) ); - // add footnote only if not empty - if (!empty($l_str_FootnoteText)) { - // set footnote to the output box at the end - self::$a_arr_Footnotes[] = $l_str_FootnoteText; - // increase footnote index - $l_int_FootnoteIndex++; + // Add footnote only if not empty. + if ( ! empty( $l_str_footnote_text ) ) { + // Set footnote to the output box at the end. + self::$a_arr_footnotes[] = $l_str_footnote_text; + // Increase footnote index. + $l_int_footnote_index++; } /** @@ -1765,19 +1868,18 @@ class MCI_Footnotes_Task { * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. */ - // add offset to the new starting position - $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); + // Add offset to the new starting position. + $l_int_pos_start += $l_int_length + strlen( $l_str_ending_tag ); - } while (true); + } while ( true ); - // return content - return $p_str_Content; + // Return content. + return $p_str_content; } /** * Generates the reference container. * - * @author Stefan Herndler * @since 1.5.0 * @return string * @@ -1788,16 +1890,15 @@ class MCI_Footnotes_Task { * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. */ - public function ReferenceContainer() { + public function reference_container() { - // no footnotes have been replaced on this page: - if (empty(self::$a_arr_Footnotes)) { - return ""; + // No footnotes have been replaced on this page. + if ( empty( self::$a_arr_footnotes ) ) { + return ''; } - /** - * Footnote index backlink symbol + * Footnote index backlink symbol. * * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. * @@ -1806,37 +1907,36 @@ class MCI_Footnotes_Task { * @reporter @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * - * If the backlink symbol is enabled: + * If the backlink symbol is enabled. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) { - // get html arrow - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); - // set html arrow to the first one if invalid index defined - if (is_array($l_str_Arrow)) { - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); + // Get html arrow. + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW ) ); + // Set html arrow to the first one if invalid index defined. + if ( is_array( $l_str_arrow ) ) { + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( 0 ); } - // get user defined arrow - $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); - if (!empty($l_str_ArrowUserDefined)) { - $l_str_Arrow = $l_str_ArrowUserDefined; + // Get user defined arrow. + $l_str_arrow_user_defined = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ); + if ( ! empty( $l_str_arrow_user_defined ) ) { + $l_str_arrow = $l_str_arrow_user_defined; } - // wrap the arrow in a @media print { display:hidden } span: - $l_str_FootnoteArrow = ''; - $l_str_FootnoteArrow .= $l_str_Arrow . ''; + // Wrap the arrow in a @media print { display:hidden } span. + $l_str_footnote_arrow = ''; + $l_str_footnote_arrow .= $l_str_arrow . ''; } else { - // If the backlink symbol isn’t enabled, set it to empty: - $l_str_Arrow = ''; - $l_str_FootnoteArrow = ''; + // If the backlink symbol isn’t enabled, set it to empty. + $l_str_arrow = ''; + $l_str_footnote_arrow = ''; } - /** - * Backlink separator + * Backlink separator. * * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. * @@ -1852,59 +1952,69 @@ class MCI_Footnotes_Task { * Initially a comma was appended in this algorithm for enumerations. * The comma in enumerations is not generally preferred. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + // Check if it is input-configured. + $l_str_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ); - if (empty($l_str_Separator)) { + if ( empty( $l_str_separator ) ) { - // if it is not, check which option is on: - $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); - switch ($l_str_SeparatorOption) { - case 'comma' : $l_str_Separator = ','; break; - case 'semicolon': $l_str_Separator = ';'; break; - case 'en_dash' : $l_str_Separator = ' –'; break; + // If it is not, check which option is on. + $l_str_separator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); + switch ( $l_str_separator_option ) { + case 'comma': + $l_str_separator = ','; + break; + case 'semicolon': + $l_str_separator = ';'; + break; + case 'en_dash': + $l_str_separator = ' –'; + break; } } - } else { - $l_str_Separator = ''; + $l_str_separator = ''; } /** - * Backlink terminator + * Backlink terminator. * * Initially a dot was appended in the table row template. + * * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable: + * @since 2.1.4 the terminator is optional, has options, and is configurable. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + // Check if it is input-configured. + $l_str_terminator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ); - if (empty($l_str_Terminator)) { + if ( empty( $l_str_terminator ) ) { - // if it is not, check which option is on: - $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); - switch ($l_str_TerminatorOption) { - case 'period' : $l_str_Terminator = '.'; break; - case 'parenthesis': $l_str_Terminator = ')'; break; - case 'colon' : $l_str_Terminator = ':'; break; + // If it is not, check which option is on. + $l_str_terminator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); + switch ( $l_str_terminator_option ) { + case 'period': + $l_str_terminator = '.'; + break; + case 'parenthesis': + $l_str_terminator = ')'; + break; + case 'colon': + $l_str_terminator = ':'; + break; } } - } else { - $l_str_Terminator = ''; + $l_str_terminator = ''; } - /** - * Line breaks + * Line breaks. * * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * @@ -1916,18 +2026,19 @@ class MCI_Footnotes_Task { * Variable number length and proportional character width require explicit line breaks. * Otherwise, an ordinary space character offering a line break opportunity is inserted. */ - $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                    ' : ' '; + $l_str_line_break = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED ) ) ? '
                                                                                    ' : ' '; /** + * Line breaks for source readability. + * * For maintenance and support, table rows in the reference container should be * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below): + * Before the first table row (breaks between rows are ~200 lines below). */ - $l_str_Body = "\r\n\r\n"; - + $l_str_body = "\r\n\r\n"; /** - * Reference container table row template load + * Reference container table row template load. * * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * @@ -1935,34 +2046,34 @@ class MCI_Footnotes_Task { * @date 2020-11-16T2024+0100 */ - // when combining identical footnotes is turned on, another template is needed: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // the combining template allows for backlink clusters and supports cell clicking for single notes: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); + // When combining identical footnotes is turned on, another template is needed. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { + // The combining template allows for backlink clusters and supports cell clicking for single notes. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' ); } else { - // when 3-column layout is turned on (only available if combining is turned off): - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); + // When 3-column layout is turned on (only available if combining is turned off). + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' ); } else { - // when switch symbol and index is turned on, and combining and 3-columns are off: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); + // When switch symbol and index is turned on, and combining and 3-columns are off. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' ); } else { - // default is the standard template: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); + // Default is the standard template. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' ); } } } /** - * Switch backlink symbol and footnote number + * Switch backlink symbol and footnote number. * * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * @@ -1978,36 +2089,37 @@ class MCI_Footnotes_Task { * @since 2.1.4 * @date 2020-11-26T1633+0100 */ - $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); + $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); - // loop through all footnotes found in the page - for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { + // Loop through all footnotes found in the page. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_index = 0; $l_int_index < $num_footnotes; $l_int_index++ ) { - // get footnote text - $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; + // Get footnote text. + $l_str_footnote_text = self::$a_arr_footnotes[ $l_int_index ]; - // if footnote is empty, go to the next one; - // With combine identicals turned on, identicals will be deleted and are skipped: - if (empty($l_str_FootnoteText)) { + // If footnote is empty, go to the next one;. + // With combine identicals turned on, identicals will be deleted and are skipped. + if ( empty( $l_str_footnote_text ) ) { continue; } - // generate content of footnote index cell - $l_int_FirstFootnoteIndex = ($l_int_Index + 1); + // Generate content of footnote index cell. + $l_int_first_footnote_index = ( $l_int_index + 1 ); - // get the footnote index string and - // keep supporting legacy index placeholder: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Get the footnote index string and. + // Keep supporting legacy index placeholder. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); /** - * Case of only one backlink per table row + * Case of only one backlink per table row. * - * If enabled, and for the case the footnote is single, compose hard link: + * If enabled, and for the case the footnote is single, compose hard link. */ - // define anyway: - $l_str_HardLinkAddress = ''; + // Define anyway. + $l_str_hard_link_address = ''; - if (self::$a_bool_HardLinksEnable) { + if ( self::$a_bool_hard_links_enable ) { /** * Use-Backbutton-Hint tooltip, optional and configurable. @@ -2023,43 +2135,42 @@ class MCI_Footnotes_Task { * 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 */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_UseBackbuttonHint = ' title="'; - $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); - $l_str_UseBackbuttonHint .= '"'; + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_use_backbutton_hint = ' title="'; + $l_str_use_backbutton_hint .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ); + $l_str_use_backbutton_hint .= '"'; } else { - $l_str_UseBackbuttonHint = ''; + $l_str_use_backbutton_hint = ''; } /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_FootnoteAnchorElement = ''; + $l_str_footnote_anchor_element = ''; - // compose optional hard link address: - $l_str_HardLinkAddress = ' href="#'; - $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; - $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; - $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; - $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; + // Compose optional hard link address. + $l_str_hard_link_address = ' href="#'; + $l_str_hard_link_address .= self::$a_str_referrer_link_slug; + $l_str_hard_link_address .= self::$a_str_post_container_id_compound; + $l_str_hard_link_address .= $l_str_footnote_id . '"'; + $l_str_hard_link_address .= $l_str_use_backbutton_hint; - // compose optional opening link tag with optional hard link, mandatory for instance: - self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { - // ID, optional hard link address, and class: - $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; - $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= self::$a_int_PostId; - $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= ' href="#'; - $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; - $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; + // ID, optional hard link address, and class. + $l_str_footnote_reference = '<' . self::$a_str_link_span; + $l_str_footnote_reference .= ' id="footnote_plugin_reference_'; + $l_str_footnote_reference .= self::$a_int_post_id; + $l_str_footnote_reference .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_reference .= "_$l_str_footnote_id\""; + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= ' href="#'; + $l_str_footnote_reference .= self::$a_str_referrer_link_slug; + $l_str_footnote_reference .= self::$a_str_post_container_id_compound; + $l_str_footnote_reference .= $l_str_footnote_id . '"'; + $l_str_footnote_reference .= $l_str_use_backbutton_hint; } - $l_str_FootnoteReference .= ' class="footnote_backlink"'; + $l_str_footnote_reference .= ' class="footnote_backlink"'; - // the click event goes in the table cell if footnote remains single: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; + // The click event goes in the table cell if footnote remains single. + $l_str_backlink_event = ' onclick="footnote_move_to_anchor_'; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "('footnote_plugin_tooltip_"; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "_$l_str_footnote_id');\""; + // The dedicated template enumerating backlinks uses another variable. + $l_str_footnote_backlinks = $l_str_footnote_reference; - // the dedicated template enumerating backlinks uses another variable: - $l_str_FootnoteBacklinks = $l_str_FootnoteReference; + // Append the click event right to the backlink item for enumerations;. + // Else it goes in the table cell. + $l_str_footnote_backlinks .= $l_str_backlink_event . '>'; + $l_str_footnote_reference .= '>'; - // append the click event right to the backlink item for enumerations; - // else it goes in the table cell: - $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; - $l_str_FootnoteReference .= '>'; - - // append the optional offset anchor for hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; - $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; + // Append the optional offset anchor for hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= $l_str_footnote_anchor_element; + $l_str_footnote_backlinks .= $l_str_footnote_anchor_element; } - // continue both single note and notes cluster, depending on switch option status: - if ($l_bool_SymbolSwitch) { + // Continue both single note and notes cluster, depending on switch option status. + if ( $l_bool_symbol_switch ) { - $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_footnote_reference .= "$l_str_footnote_id$l_str_footnote_arrow"; + $l_str_footnote_backlinks .= "$l_str_footnote_id$l_str_footnote_arrow"; } else { - $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_footnote_reference .= "$l_str_footnote_arrow$l_str_footnote_id"; + $l_str_footnote_backlinks .= "$l_str_footnote_arrow$l_str_footnote_id"; } - // If that is the only footnote with this text, we’re almost done. + // If that is the only footnote with this text, we’re almost done.. - // check if it isn't the last footnote in the array: - if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { + // Check if it isn't the last footnote in the array. + if ( $l_int_first_footnote_index < count( self::$a_arr_footnotes ) ) { - // get all footnotes that haven't passed yet: - for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { + // Get all footnotes that haven't passed yet. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_check_index = $l_int_first_footnote_index; $l_int_check_index < $num_footnotes; $l_int_check_index++ ) { - // check if a further footnote is the same as the actual one: - if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { + // Check if a further footnote is the same as the actual one. + if ( self::$a_arr_footnotes[ $l_int_check_index ] === $l_str_footnote_text ) { - // if so, set the further footnote as empty so it won't be displayed later: - self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; + // If so, set the further footnote as empty so it won't be displayed later. + self::$a_arr_footnotes[ $l_int_check_index ] = ''; - // set the flag to true for the combined status: - $l_bool_FlagCombined = true; + // Set the flag to true for the combined status. + $l_bool_flag_combined = true; - // update the footnote ID: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Update the footnote ID. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // resume composing the backlinks enumeration: - $l_str_FootnoteBacklinks .= "$l_str_Separator'; - $l_str_FootnoteBacklinks .= $l_str_LineBreak; - $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; - $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; + // Resume composing the backlinks enumeration. + $l_str_footnote_backlinks .= "$l_str_separator'; + $l_str_footnote_backlinks .= $l_str_line_break; + $l_str_footnote_backlinks .= '<' . self::$a_str_link_span; + $l_str_footnote_backlinks .= ' id="footnote_plugin_reference_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id\""; - // insert the optional hard link address: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ' href="#'; - $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; - $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; + // Insert the optional hard link address. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ' href="#'; + $l_str_footnote_backlinks .= self::$a_str_referrer_link_slug; + $l_str_footnote_backlinks .= self::$a_str_post_container_id_compound; + $l_str_footnote_backlinks .= $l_str_footnote_id . '"'; + $l_str_footnote_backlinks .= $l_str_use_backbutton_hint; } - $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; - $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; + $l_str_footnote_backlinks .= ' class="footnote_backlink"'; + $l_str_footnote_backlinks .= ' onclick="footnote_move_to_anchor_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "('footnote_plugin_tooltip_"; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id');\">"; - // append the offset anchor for optional hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ''; + // Append the offset anchor for optional hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ''; } - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId; - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? '' : $l_str_footnote_arrow; + $l_str_footnote_backlinks .= $l_str_footnote_id; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? $l_str_footnote_arrow : ''; } } } - // append terminator and end tag: - $l_str_FootnoteReference .= $l_str_Terminator . ''; - $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; + // Append terminator and end tag. + $l_str_footnote_reference .= $l_str_terminator . ''; + $l_str_footnote_backlinks .= $l_str_terminator . ''; } - // line wrapping of URLs already fixed, see above + // Line wrapping of URLs already fixed, see above. - // get reference container item text if tooltip text goes separate: - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); - self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_MirrorTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); - $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; + // Get reference container item text if tooltip text goes separate. + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) ); + self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_mirror_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); + $l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ); + $l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text; } else { - $l_str_ReferenceText = $l_str_NotTooltipText; + $l_str_reference_text = $l_str_not_tooltip_text; } } else { - $l_str_ReferenceText = $l_str_FootnoteText; + $l_str_reference_text = $l_str_footnote_text; } - // replace all placeholders in table row template: - $l_obj_Template->replace( + // Replace all placeholders in table row template. + $l_obj_template->replace( array( - // placeholder used in all templates: - "text" => $l_str_ReferenceText, + // Placeholder used in all templates. + 'text' => $l_str_reference_text, - // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => self::$a_str_LinkOpenTag, - "link-end" => self::$a_str_LinkCloseTag, - "link-span" => self::$a_str_LinkSpan, - "terminator" => $l_str_Terminator, - "anchor-element" => $l_str_FootnoteAnchorElement, - "hard-link" => $l_str_HardLinkAddress, + // Used in standard layout W/O COMBINED FOOTNOTES. + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ), + 'link-start' => self::$a_str_link_open_tag, + 'link-end' => self::$a_str_link_close_tag, + 'link-span' => self::$a_str_link_span, + 'terminator' => $l_str_terminator, + 'anchor-element' => $l_str_footnote_anchor_element, + 'hard-link' => $l_str_hard_link_address, - // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => $l_bool_FlagCombined ? '' : ' pointer', - "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, - "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + // Used in standard layout WITH COMBINED IDENTICALS TURNED ON. + 'pointer' => $l_bool_flag_combined ? '' : ' pointer', + 'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event, + 'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference, - // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteId, + // Legacy placeholders for use in legacy layout templates. + 'arrow' => $l_str_footnote_arrow, + 'index' => $l_str_footnote_id, ) ); - $l_str_Body .= $l_obj_Template->getContent(); + $l_str_body .= $l_obj_template->get_content(); - // extra line breaks for page source readability: - $l_str_Body .= "\r\n\r\n"; + // Extra line breaks for page source readability. + $l_str_body .= "\r\n\r\n"; - $l_obj_Template->reload(); + $l_obj_template->reload(); } - // call again for robustness when priority levels don’t match any longer: - self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); + // Call again for robustness when priority levels don’t match any longer. + self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); - // streamline: - $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); + // Streamline. + $l_bool_collapse_default = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE ) ); /** - * Reference container label + * Reference container label. * * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. * @@ -2283,7 +2394,7 @@ class MCI_Footnotes_Task { * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. */ - $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); + $l_str_reference_container_label = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ); /** * Select the reference container template according to the script mode. @@ -2294,40 +2405,40 @@ class MCI_Footnotes_Task { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * @reporter @pkverma99 * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 */ - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - if ( $l_str_ScriptMode == 'jquery' ) { + $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); + + if ( 'jquery' === $l_str_script_mode ) { + + // Load 'templates/public/reference-container.html'. + $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container' ); - // load 'templates/public/reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); - } else { - - // load 'templates/public/js-reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); + + // Load 'templates/public/js-reference-container.html'. + $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'js-reference-container' ); } - - $l_obj_TemplateContainer->replace( + + $l_obj_template_container->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), - "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, - "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', - "style" => $l_bool_CollapseDefault ? 'display: none;' : '', - "content" => $l_str_Body, - "scroll-offset" => (self::$a_int_ScrollOffset / 100), - "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'element' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ), + 'name' => empty( $l_str_reference_container_label ) ? ' ' : $l_str_reference_container_label, + 'button-style' => ! $l_bool_collapse_default ? 'display: none;' : '', + 'style' => $l_bool_collapse_default ? 'display: none;' : '', + 'content' => $l_str_body, + 'scroll-offset' => ( self::$a_int_scroll_offset / 100 ), + 'scroll-duration' => intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) ), ) ); - // free all found footnotes if reference container will be displayed - self::$a_arr_Footnotes = array(); + // Free all found footnotes if reference container will be displayed. + self::$a_arr_footnotes = array(); - return $l_obj_TemplateContainer->getContent(); + return $l_obj_template_container->get_content(); } } diff --git a/class/template.php b/class/template.php index 2c0b8d4..236734c 100644 --- a/class/template.php +++ b/class/template.php @@ -1,39 +1,20 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); /** - * Modularize functions + * Modularize functions. * * @since 2.4.0d3 - * - * @author Patrizia Lutz @misfist */ - if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { + $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ); + if ( $template ) { $this->process_template( $template ); } else { return; @@ -133,124 +106,125 @@ class MCI_Footnotes_Template { /** * Replace all placeholders specified in array. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). + * @param array $p_arr_placeholders Placeholders (key = placeholder, value = value). * @return bool True on Success, False if Placeholders invalid. */ - public function replace($p_arr_Placeholders) { - // no placeholders set - if (empty($p_arr_Placeholders)) { + public function replace( $p_arr_placeholders ) { + // No placeholders set. + if ( empty( $p_arr_placeholders ) ) { return false; } - // template content is empty - if (empty($this->a_str_ReplacedContent)) { + // Template content is empty. + if ( empty( $this->a_str_replaced_content ) ) { return false; } - // iterate through each placeholder and replace it with its value - foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { - $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); + // Iterate through each placeholder and replace it with its value. + foreach ( $p_arr_placeholders as $l_str_placeholder => $l_str_value ) { + $this->a_str_replaced_content = str_replace( '[[' . $l_str_placeholder . ']]', $l_str_value, $this->a_str_replaced_content ); } - // success + // Success. return true; } /** * Reloads the original content of the template file. * - * @author Stefan Herndler * @since 1.5.0 */ public function reload() { - $this->a_str_ReplacedContent = $this->a_str_OriginalContent; + $this->a_str_replaced_content = $this->a_str_original_content; } /** * Returns the content of the template file with replaced placeholders. * - * @author Stefan Herndler * @since 1.5.0 * @return string Template content with replaced placeholders. */ - public function getContent() { - return $this->a_str_ReplacedContent; + public function get_content() { + return $this->a_str_replaced_content; } /** - * Process template file - * - * @author Patrizia Lutz @misfist + * Process template file. * * @since 2.4.0d3 * - * @param string $template + * @param string $template The template to be processed. * @return void * - * - * @since 2.0.3 replace tab with a space - * @since 2.0.3 replace 2 spaces with 1 - * @since 2.0.4 collapse multiple spaces - * @since 2.2.6 delete a space before a closing pointy bracket - * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) + * @since 2.0.3 Replace tab with a space. + * @since 2.0.3 Replace 2 spaces with 1. + * @since 2.0.4 Collapse multiple spaces. + * @since 2.2.6 Delete a space before a closing pointy bracket. + * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). */ public function process_template( $template ) { - $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); - $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); + // phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + $this->a_str_original_content = preg_replace( '##s', '', file_get_contents( $template ) ); + // phpcs:enable + $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\t", ' ', $this->a_str_original_content ); + $this->a_str_original_content = preg_replace( '# +#', ' ', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( ' >', '>', $this->a_str_original_content ); $this->reload(); } /** - * Get the template + * Get the template. * - * @author Patrizia Lutz @misfist + * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. * - * @since 2.4.0d3 + * @since 2.4.0d3 Contribution. + * @since 2.5.0 Release. * - * @param string $p_str_FileType - * @param string $p_str_FileName - * @param string $p_str_Extension + * @contributor @misfist + * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 + * + * @param string $p_str_file_type The file type of the template. + * @param string $p_str_file_name The file name of the template. + * @param string $p_str_extension The file extension of the template. * @return mixed false | template path */ - public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { + public function get_template( $p_str_file_type, $p_str_file_name, $p_str_extension = 'html' ) { $located = false; /** - * The directory change be modified - * @usage to change location of templates to `template_parts/footnotes/': + * The directory can be changed. + * + * @usage to change location of templates to 'template_parts/footnotes/': * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/; + * return 'template_parts/footnotes/'; * } ); */ $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension; /** - * Look in active (child) theme + * Look in active theme. */ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - /** - * Look in parent theme - */ + /** + * Look in parent theme in case active is child. + */ } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - /** - * Look in custom directory - */ + /** + * Look in custom plugin directory. + */ } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - /** - * Look in plugin - */ + /** + * Fall back to the templates shipped with the plugin. + */ } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { $located = $this->plugin_directory . 'templates/' . $template_name; } @@ -258,4 +232,4 @@ class MCI_Footnotes_Template { return $located; } -} // end of class +} diff --git a/class/widgets/base.php b/class/widgets/base.php index ad41077..6618f28 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,14 +1,12 @@ - __CLASS__, "description" => $this->getDescription()); - $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); - // registers the Widget + $l_arr_widget_options = array( + 'classname' => __CLASS__, + 'description' => $this->get_description(), + ); + $l_arr_control_options = array( + 'id_base' => strtolower( $this->get_id() ), + 'width' => $this->get_widget_width(), + ); + // Registers the Widget. parent::__construct( - strtolower($this->getID()), // unique ID for the widget, has to be lowercase - $this->getName(), // Plugin name to be displayed - $l_arr_WidgetOptions, // Optional Widget Options - $l_arr_ControlOptions // Optional Widget Control Options - ); + strtolower( $this->get_id() ), // Unique ID for the widget, has to be lowercase. + $this->get_name(), // Plugin name to be displayed. + $l_arr_widget_options, // Optional Widget Options. + $l_arr_control_options // Optional Widget Control Options. + ); } } diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 2e322ec..4a75d11 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,85 +1,81 @@ -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { - echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); + public function widget( $args, $instance ) { + global $g_obj_mci_footnotes; + // Reference container positioning is set to "widget area". + if ( 'widget' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $g_obj_mci_footnotes->a_obj_task->Reference_Container(); + // phpcs:enable } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 3a27477..898f133 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,83 +1,92 @@ -getContent(); + public static function new_plain_text_editor_button() { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'editor-button' ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** * Includes the Plugins WYSIWYG editor script. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Plugins Scripts to be included to the editor. + * @param array $p_arr_plugins Scripts to be included to the editor. * @return array */ - public static function includeScripts($p_arr_Plugins) { - $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); - return $p_arr_Plugins; + public static function include_scripts( $p_arr_plugins ) { + $p_arr_plugins[ MCI_Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor.js', __FILE__ ); + return $p_arr_plugins; } /** * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. * Returns an JSON encoded array with the Footnotes start and end short code. * - * @author Stefan Herndler * @since 1.5.0 */ - public static function ajaxCallback() { - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + public static function ajax_callback() { + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); + echo wp_json_encode( + array( + 'start' => htmlspecialchars( $l_str_starting_tag ), + 'end' => htmlspecialchars( $l_str_ending_tag ), + ) + ); exit; } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..85ecd48 --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "wp-coding-standards/wpcs": "^2.3" + }, + "scripts": { + "post-install-cmd": [ + "bash _tools/setup.sh" + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..9e0ee7c --- /dev/null +++ b/composer.lock @@ -0,0 +1,196 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3a147d50695956de52f7cbf827b47830", + "packages": [], + "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "time": "2020-05-13T23:57:56+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/contrib/pre-commit b/contrib/pre-commit new file mode 100644 index 0000000..0dc792f --- /dev/null +++ b/contrib/pre-commit @@ -0,0 +1,61 @@ +#!/bin/sh + +# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook +# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ + +PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` +STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` + +# Determine if a file list is passed +if [ "$#" -eq 1 ] +then + oIFS=$IFS + IFS=' + ' + SFILES="$1" + IFS=$oIFS +fi +SFILES=${SFILES:-$STAGED_FILES_CMD} + +echo "Checking PHP Lint..." +for FILE in $SFILES +do + php -l -d display_errors=0 $PROJECT/$FILE + if [ $? != 0 ] + then + echo "Fix the error before commit." + exit 1 + fi + FILES="$FILES $PROJECT/$FILE" +done + +if [ -f "$PROJECT/phpcs.ruleset.xml" ] +then + RULESET="$PROJECT/phpcs.ruleset.xml" +elif [ -f "$PROJECT/phpcs.xml.dist" ] +then + RULESET="$PROJECT/phpcs.xml.dist" +else + RULESET="WordPress" +fi + +if [ "$FILES" != "" ] +then + echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Coding standards errors have been detected. Running phpcbf..." + ./vendor/bin/phpcbf --standard="$RULESET" --encoding=utf-8 -n -p $FILES + git add $FILES + echo "Running Code Sniffer again..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Errors found not fixable automatically. You need to manually fix them." + exit 1 + fi + fi +fi + +exit $? diff --git a/footnotes.php b/footnotes.php index e05f2d9..dfaf104 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,27 +1,27 @@ run(); +// Initialize the Plugin. +$g_obj_mci_footnotes = new MCI_Footnotes(); +// Run the Plugin. +$g_obj_mci_footnotes->run(); /** * Sets the stylesheet enqueuing mode for production. - * + * * @since 2.5.5 * @var bool * @see class/init.php - * + * * In production, a minified CSS file tailored to the settings is enqueued. - * + * * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. - */ + */ define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index 732cfb9..9501097 100644 --- a/includes.php +++ b/includes.php @@ -3,36 +3,37 @@ * Includes all common files. * * @filesource - * @author Stefan Herndler + * @package footnotes * @since 1.5.0 14.09.14 13:40 */ /** - * Requires (require_once) all *.php files inside a specific Directory. + * Requires (`require_once`) all `*.php` files inside a specific Directory. * * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Directory Absolute Directory path to lookup for *.php files + * @param string $p_str_directory Absolute Directory path to lookup for `*.php` files. */ -function MCI_Footnotes_requirePhpFiles($p_str_Directory) { - // append slash at the end of the Directory if not exist - if (substr($p_str_Directory, -1) != "/") { - $p_str_Directory .= "/"; - +function mci_footnotes_require_php_files( $p_str_directory ) { + // Append slash at the end of the Directory if not exist. + if ( '/' !== substr( $p_str_directory, -1 ) ) { + $p_str_directory .= '/'; } - // get all PHP files inside Directory - $l_arr_Files = scandir($p_str_Directory); - // iterate through each class - foreach ($l_arr_Files as $l_str_FileName) { - // skip all non *.php files - if (strtolower(substr($l_str_FileName, -4)) != ".php") { + // Get all PHP files inside Directory. + $l_arr_files = scandir( $p_str_directory ); + // Iterate through each class. + foreach ( $l_arr_files as $l_str_file_name ) { + // Skip all non-PHP files. + if ( '.php' !== strtolower( substr( $l_str_file_name, -4 ) ) ) { continue; } + // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIncludeInspection */ - require_once($p_str_Directory . $l_str_FileName); + require_once $p_str_directory . $l_str_file_name; + // phpcs:enable } } -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets"); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/layout' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/widgets' ); diff --git a/readme.txt b/readme.txt index 82e80f3..72304f3 100755 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ === footnotes === -Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges +Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 -Stable Tag: 2.5.5 +Stable Tag: 2.5.6 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,7 +80,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.5.6 = - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. +- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. = 2.5.5 = - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. @@ -326,7 +326,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.4 = - Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: GDPR: Add jQuery UI from WordPress instead of third party. +- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - Bugfix: Reference container: remove inconvenient left/right cellpadding. - Bugfix: Tooltips: improve layout with inherited font size by lower line height. diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 91fc1e4..03ad002 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -54,7 +54,7 @@ type: 'POST', url: '/wp-admin/admin-ajax.php', data: { - action: 'footnotes_getPluginInfo', + action: 'footnotes_get_plugin_info', plugin: '[[plugin-name]]' }, dataType: 'json', diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index cb400de..4e70481 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -4,8 +4,8 @@ --> <[[link-span]] onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" [[hard-link]] @@ -17,7 +17,7 @@ >[[anchor-element]] Date: Fri, 26 Feb 2021 08:07:03 +0000 Subject: [PATCH 060/144] Revert "Update code to comply with WP Coding Standards (#38)" This reverts commit 02c6c1c362379eed8943c79b7d1495e8c9de5588. --- .gitignore | 3 - README.md | 6 +- _tools/setup.sh | 4 - class/config.php | 29 +- class/convert.php | 242 +-- class/dashboard/init.php | 212 +++ class/dashboard/layout.php | 552 ++++++ class/dashboard/subpage-diagnostics.php | 140 ++ class/dashboard/subpage-main.php | 1182 +++++++++++++ class/hooks.php | 79 +- class/init.php | 264 ++- class/language.php | 38 +- class/layout/abstract-engine.php | 563 ------ class/layout/diagnostics.php | 149 -- class/layout/init.php | 207 --- class/layout/settings.php | 1261 ------------- class/settings.php | 736 ++++---- class/task.php | 1845 +++++++++----------- class/template.php | 190 +- class/widgets/base.php | 49 +- class/widgets/reference-container.php | 56 +- class/wysiwyg.php | 77 +- composer.json | 11 - composer.lock | 196 --- contrib/pre-commit | 61 - footnotes.php | 58 +- includes.php | 37 +- readme.txt | 8 +- templates/dashboard/other-plugins.html | 2 +- templates/public/footnote-alternative.html | 6 +- 30 files changed, 3935 insertions(+), 4328 deletions(-) delete mode 100644 _tools/setup.sh create mode 100644 class/dashboard/init.php create mode 100644 class/dashboard/layout.php create mode 100644 class/dashboard/subpage-diagnostics.php create mode 100644 class/dashboard/subpage-main.php delete mode 100644 class/layout/abstract-engine.php delete mode 100644 class/layout/diagnostics.php delete mode 100644 class/layout/init.php delete mode 100644 class/layout/settings.php delete mode 100644 composer.json delete mode 100644 composer.lock delete mode 100644 contrib/pre-commit diff --git a/.gitignore b/.gitignore index b6fe4af..7fdc234 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ .phpdoc/ -vendor/ - -*.bak diff --git a/README.md b/README.md index f55c285..40216d0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) - - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) @@ -26,9 +25,8 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) 1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` - - You may have to enable double-wildcards in your console first (`shopt -s globstar`) + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` ## Updating Documentation diff --git a/_tools/setup.sh b/_tools/setup.sh deleted file mode 100644 index fd4c786..0000000 --- a/_tools/setup.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cp contrib/pre-commit .git/hooks/pre-commit -chmod +x .git/hooks/pre-commit diff --git a/class/config.php b/class/config.php index 8f02119..98a3245 100644 --- a/class/config.php +++ b/class/config.php @@ -1,44 +1,51 @@ -foot'; /** * Public Plugin name for dashboard heading - * + * * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * in WPv5.5 being torn apart as if the headline was text-align:justify and not * the last line. That ugly display bug badly affected the plugin’s communication. * The only working solution found so far is using position:fixed in one heading * that isn’t translated, and dropping the logo in another, translatable heading. @@ -51,6 +58,7 @@ class MCI_Footnotes_Config { /** * Html tag for the LOVE symbol. * + * @author Stefan Herndler * @since 1.5.0 * @var string */ @@ -67,6 +75,7 @@ class MCI_Footnotes_Config { /** * Short code to DON'T display the 'LOVE ME' slug on certain pages. * + * @author Stefan Herndler * @since 1.5.0 * @var string */ diff --git a/class/convert.php b/class/convert.php index 3adb313..e1823ad 100644 --- a/class/convert.php +++ b/class/convert.php @@ -3,16 +3,20 @@ * Includes the Convert Class. * * @filesource - * @package footnotes - * @since 1.5.0 - * @date 12.09.14 10:56 - * + * @author Stefan Herndler + * @since 1.5.0 12.09.14 10:56 + * + * Edited: * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 + * + * Last modified: 2020-12-12T1541+0100 */ + /** * Converts data types and Footnotes specific values. * + * @author Stefan Herndler * @since 1.5.0 */ class MCI_Footnotes_Convert { @@ -20,29 +24,30 @@ class MCI_Footnotes_Convert { /** * Converts a integer into the user-defined counter style for the footnotes. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Index to be converted. - * @param string $p_str_convert_style Style of the new/converted Index. + * @param int $p_int_Index Index to be converted. + * @param string $p_str_ConvertStyle Style of the new/converted Index. * @return string Converted Index as string in the defined counter style. - * + * * Edited: * @since 2.2.0 lowercase Roman numerals supported */ - public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) { - switch ( $p_str_convert_style ) { - case 'romanic': - return self::to_romanic( $p_int_index, true ); - case 'roman_low': - return self::to_romanic( $p_int_index, false ); - case 'latin_high': - return self::to_latin( $p_int_index, true ); - case 'latin_low': - return self::to_latin( $p_int_index, false ); - case 'arabic_leading': - return self::to_arabic_leading( $p_int_index ); - case 'arabic_plain': + public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") { + switch ($p_str_ConvertStyle) { + case "romanic": + return self::toRomanic($p_int_Index, true); + case "roman_low": + return self::toRomanic($p_int_Index, false); + case "latin_high": + return self::toLatin($p_int_Index, true); + case "latin_low": + return self::toLatin($p_int_Index, false); + case "arabic_leading": + return self::toArabicLeading($p_int_Index); + case "arabic_plain": default: - return $p_int_index; + return $p_int_Index; } } @@ -50,174 +55,175 @@ class MCI_Footnotes_Convert { * Converts an integer into latin ascii characters, either lower or upper-case. * Function available from A to ZZ ( means 676 footnotes at 1 page possible). * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. - * @param bool $p_bool_upper_case True to convert the value to upper case letter, otherwise to lower case. + * @param int $p_int_Value Value/Index to be converted. + * @param bool $p_bool_UpperCase True to convert the value to upper case letter, otherwise to lower case. * @return string */ - private static function to_latin( $p_int_value, $p_bool_upper_case ) { - // Output string. - $l_str_return = ''; - $l_int_offset = 0; - // Check if the value is higher then 26 = Z. - while ( $p_int_value > 26 ) { - // Increase offset and reduce counter. - $l_int_offset++; - $p_int_value -= 26; + private static function toLatin($p_int_Value, $p_bool_UpperCase) { + // output string + $l_str_Return = ""; + $l_int_Offset = 0; + // check if the value is higher then 26 = Z + while ($p_int_Value > 26) { + // increase offset and reduce counter + $l_int_Offset++; + $p_int_Value -= 26; } - // If offset set (more then Z), then add a new letter in front. - if ( $l_int_offset > 0 ) { - $l_str_return = chr( $l_int_offset + 64 ); + // if offset set (more then Z), then add a new letter in front + if ($l_int_Offset > 0) { + $l_str_Return = chr($l_int_Offset + 64); } - // Add the origin letter. - $l_str_return .= chr( $p_int_value + 64 ); - // Return the latin character representing the integer. - if ( $p_bool_upper_case ) { - return strtoupper( $l_str_return ); + // add the origin letter + $l_str_Return .= chr($p_int_Value + 64); + // return the latin character representing the integer + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); } - return strtolower( $l_str_return ); + return strtolower($l_str_Return); } /** * Converts an integer to a leading-0 integer. * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. + * @param int $p_int_Value Value/Index to be converted. * @return string Value with a leading zero. */ - private static function to_arabic_leading( $p_int_value ) { - // Add a leading 0 if number lower then 10. - if ( $p_int_value < 10 ) { - return '0' . $p_int_value; + private static function toArabicLeading($p_int_Value) { + // add a leading 0 if number lower then 10 + if ($p_int_Value < 10) { + return "0" . $p_int_Value; } - return $p_int_value; + return $p_int_Value; } /** * Converts an integer to a romanic letter. * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. - * @param bool $p_bool_upper_case Whether to uppercase. + * @param int $p_int_Value Value/Index to be converted. * @return string - * + * * Edited: * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 */ - private static function to_romanic( $p_int_value, $p_bool_upper_case ) { - // Table containing all necessary romanic letters. - $l_arr_romanic_letters = array( - 'M' => 1000, + private static function toRomanic($p_int_Value, $p_bool_UpperCase) { + // table containing all necessary romanic letters + $l_arr_RomanicLetters = array( + 'M' => 1000, 'CM' => 900, - 'D' => 500, + 'D' => 500, 'CD' => 400, - 'C' => 100, + 'C' => 100, 'XC' => 90, - 'L' => 50, + 'L' => 50, 'XL' => 40, - 'X' => 10, + 'X' => 10, 'IX' => 9, - 'V' => 5, + 'V' => 5, 'IV' => 4, - 'I' => 1, + 'I' => 1 ); - // Return value. - $l_str_return = ''; - // Iterate through integer value until it is reduced to 0. - while ( $p_int_value > 0 ) { - foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) { - if ( $p_int_value >= $l_int_arabic ) { - $p_int_value -= $l_int_arabic; - $l_str_return .= $l_str_romanic; + // return value + $l_str_Return = ''; + // iterate through integer value until it is reduced to 0 + while ($p_int_Value > 0) { + foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { + if ($p_int_Value >= $l_int_Arabic) { + $p_int_Value -= $l_int_Arabic; + $l_str_Return .= $l_str_Romanic; break; } } } - // Return romanic letters as string. - if ( $p_bool_upper_case ) { - return strtoupper( $l_str_return ); + // return romanic letters as string + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); } - return strtolower( $l_str_return ); + return strtolower($l_str_Return); } /** * Converts a string depending on its value to a boolean. * + * @author Stefan Herndler * @since 1.0-beta - * @param string $p_str_value String to be converted to boolean. + * @param string $p_str_Value String to be converted to boolean. * @return bool Boolean representing the string. */ - public static function to_bool( $p_str_value ) { - // Convert string to lower-case to make it easier. - $p_str_value = strtolower( $p_str_value ); - // Check if string seems to contain a "true" value. - switch ( $p_str_value ) { - case 'checked': - case 'yes': - case 'true': - case 'on': - case '1': + public static function toBool($p_str_Value) { + // convert string to lower-case to make it easier + $p_str_Value = strtolower($p_str_Value); + // check if string seems to contain a "true" value + switch ($p_str_Value) { + case "checked": + case "yes": + case "true": + case "on": + case "1": return true; } - // Nothing found that says "true", so we return false. + // nothing found that says "true", so we return false return false; } /** * Get a html Array short code depending on Arrow-Array key index. * + * @author Stefan Herndler * @since 1.3.2 - * @param int $p_int_index Index representing the Arrow. If empty all Arrows are specified. + * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. */ - public static function get_arrow( $p_int_index = -1 ) { - // Define all possible arrows. - $l_arr_arrows = array( '↑', '↥', '↟', '↩', '↲', '↵', '⇑', '⇡', '⇧', '↑' ); - // Convert index to an integer. - if ( ! is_int( $p_int_index ) ) { - $p_int_index = intval( $p_int_index ); + public static function getArrow($p_int_Index = -1) { + // define all possible arrows + $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); + // convert index to an integer + if (!is_int($p_int_Index)) { + $p_int_Index = intval($p_int_Index); } - // Return the whole arrow array. - if ( $p_int_index < 0 || $p_int_index > count( $l_arr_arrows ) ) { - return $l_arr_arrows; + // return the whole arrow array + if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { + return $l_arr_Arrows; } - // Return a single arrow. - return $l_arr_arrows[ $p_int_index ]; + // return a single arrow + return $l_arr_Arrows[$p_int_Index]; } - // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump - // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r /** * Displays a Variable. * + * @author Stefan Herndler * @since 1.5.0 - * @param mixed $p_mixed_value The variable to display. - * @return void + * @param mixed $p_mixed_Value */ - public static function debug( $p_mixed_value ) { - if ( empty( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + public static function debug($p_mixed_Value) { + if (empty($p_mixed_Value)) { + var_dump($p_mixed_Value); - } elseif ( is_array( $p_mixed_value ) ) { - printf( '
                                                                                    ' );
                                                                                    -			print_r( $p_mixed_value );
                                                                                    -			printf( '
                                                                                    ' ); + } else if (is_array($p_mixed_Value)) { + printf("
                                                                                    ");
                                                                                    +			print_r($p_mixed_Value);
                                                                                    +			printf("
                                                                                    "); - } elseif ( is_object( $p_mixed_value ) ) { - printf( '
                                                                                    ' );
                                                                                    -			print_r( $p_mixed_value );
                                                                                    -			printf( '
                                                                                    ' ); + } else if (is_object($p_mixed_Value)) { + printf("
                                                                                    ");
                                                                                    +			print_r($p_mixed_Value);
                                                                                    +			printf("
                                                                                    "); - } elseif ( is_numeric( $p_mixed_value ) || is_int( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { + var_dump($p_mixed_Value); - } elseif ( is_date( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + } else if (is_date($p_mixed_Value)) { + var_dump($p_mixed_Value); } else { - var_dump( $p_mixed_value ); + var_dump($p_mixed_Value); } - echo '
                                                                                    '; + echo "
                                                                                    "; } - // phpcs:disable } diff --git a/class/dashboard/init.php b/class/dashboard/init.php new file mode 100644 index 0000000..b18e77c --- /dev/null +++ b/class/dashboard/init.php @@ -0,0 +1,212 @@ +a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; + } + } + ksort($this->a_arr_SubPageClasses); + + // register hooks/actions + add_action('admin_init', array($this, 'initializeSettings')); + add_action('admin_menu', array($this, 'registerMainMenu')); + // register AJAX callbacks for Plugin information + add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function initializeSettings() { + MCI_Footnotes_Settings::instance()->RegisterSettings(); + // iterate though each sub class of the layout engine and register their sections + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @author Stefan Herndler + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function registerMainMenu() { + global $menu; + // iterate through each main menu + foreach($menu as $l_arr_MainMenu) { + // iterate through each main menu attribute + foreach($l_arr_MainMenu as $l_str_Attribute) { + // main menu already added, append sub pages and stop + if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { + $this->registerSubPages(); + return; + } + } + } + + // add a new main menu page to the WordPress dashboard + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // page title + self::C_STR_MAIN_MENU_TITLE, // menu title + 'manage_options', // capability + self::C_STR_MAIN_MENU_SLUG, // menu slug + array($this, "displayOtherPlugins"), // function + plugins_url('footnotes/img/main-menu.png'), // icon url + null // position + ); + $this->registerSubPages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function registerSubPages() { + // first registered sub menu page MUST NOT contain a unique slug suffix + // iterate though each sub class of the layout engine and register their sub page + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSubPage(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayOtherPlugins() { + printf("

                                                                                    "); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); + echo $l_obj_Template->getContent(); + + printf('visit Mark Cheret'); + printf("

                                                                                    "); + + printf(''); + } + + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function getPluginMetaInformation() { + // get plugin internal name from POST data + $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; + if (empty($l_str_PluginName)) { + echo json_encode(array("error" => "Plugin name invalid.")); + exit; + } + $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; + // call URL and collect data + $l_arr_Response = wp_remote_get($l_str_Url); + // check if response is valid + if (is_wp_error($l_arr_Response)) { + echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); + exit; + } + if (!array_key_exists("body", $l_arr_Response)) { + echo json_encode(array("error" => "Error reading WordPress API response message.")); + exit; + } + // get the body of the response + $l_str_Response = $l_arr_Response["body"]; + // get plugin object + $l_arr_Plugin = json_decode($l_str_Response, true); + if (empty($l_arr_Plugin)) { + echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                    URL: " . $l_str_Url . "
                                                                                    Response: " . $l_str_Response)); + exit; + } + + $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; + $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; + $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); + + // return Plugin information as JSON encoded string + echo json_encode( + array( + "error" => "", + "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", + "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", + "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", + "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", + "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", + "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", + "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", + "PluginRating" => $l_int_NumRatings, + "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", + "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" + ) + ); + exit; + } +} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php new file mode 100644 index 0000000..d16ad8b --- /dev/null +++ b/class/dashboard/layout.php @@ -0,0 +1,552 @@ + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); + } + + /** + * Returns an array describing a meta box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SectionID Parent Section ID. + * @param string $p_str_ID Unique ID suffix. + * @param string $p_str_Title Title for the meta box. + * @param string $p_str_CallbackFunctionName Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { + return array( + "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, + "id" => $p_str_ID, + "title" => $p_str_Title, + "callback" => $p_str_CallbackFunctionName + ); + } + + /** + * Registers a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSubPage() { + global $submenu; + // any sub menu for our main menu exists + if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { + // iterate through all sub menu entries of the ManFisher main menu + foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { + if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { + // remove that sub menu and add it again to move it to the bottom + remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); + } + } + } + + $this->a_str_SubPageHook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug + $this->getSubPageTitle(), // page title + $this->getSubPageTitle(), // menu title + 'manage_options', // capability + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug + array($this, 'displayContent') // function + ); + } + + /** + * Registers all sections for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSections() { + // iterate through each section + foreach($this->getSections() as $l_arr_Section) { + // append tab to the tab-array + $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; + add_settings_section( + $l_arr_Section["id"], // unique id + "", //$l_arr_Section["title"], // title + array($this, 'Description'), // callback function for the description + $l_arr_Section["id"] // parent sub page slug + ); + $this->registerMetaBoxes($l_arr_Section["id"]); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_ParentID Parent section unique id. + */ + private function registerMetaBoxes($p_str_ParentID) { + // iterate through each meta box + foreach($this->getMetaBoxes() as $l_arr_MetaBox) { + if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { + continue; + } + add_meta_box( + $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id + $l_arr_MetaBox["title"], // meta box title + array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content + $p_str_ParentID, // post type = parent section id + 'main' // context + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function appendScripts() { + // enable meta boxes layout and close functionality + wp_enqueue_script('postbox'); + // add WordPress color picker layout + wp_enqueue_style('wp-color-picker'); + // add WordPress color picker function + wp_enqueue_script('wp-color-picker'); + + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style('mci-footnotes-admin'); + } + + /** + * Displays the content of specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayContent() { + // register and enqueue scripts and styling + $this->appendScripts(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + // store settings + $l_bool_SettingsUpdated = false; + if (array_key_exists("save-settings", $_POST)) { + if ($_POST["save-settings"] == "save") { + unset($_POST["save-settings"]); + unset($_POST["submit"]); + $l_bool_SettingsUpdated = $this->saveSettings(); + } + } + + // display all sections and highlight the active section + echo '
                                                                                    '; + echo '
                                                                                    '; + + if ($l_bool_SettingsUpdated) { + echo sprintf('
                                                                                    %s
                                                                                    ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + } + + // form to submit the active section + echo '
                                                                                    '; + //settings_fields($l_arr_ActiveSection["container"]); + echo ''; + // outputs the settings field of the active section + do_settings_sections($l_arr_ActiveSection["id"]); + do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); + + // add submit button to active section if defined + if ($l_arr_ActiveSection["submit"]) { + submit_button(); + } + // close the form to submit data + echo ''; + // close container for the settings page + echo '
                                                                                    '; + // output special javascript for the expand/collapse function of the meta boxes + echo ''; + } + + /** + * Save all Plugin settings. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return bool + */ + private function saveSettings() { + $l_arr_newSettings = array(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + + // iterate through each value that has to be in the specific container + foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { + // setting is available in the POST array, use it + if (array_key_exists($l_str_Key, $_POST)) { + $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; + } else { + // setting is not defined in the POST array, define it to avoid the Default value + $l_arr_newSettings[$l_str_Key] = ""; + } + } + // update settings + return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); + } + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Description() { + // default no description will be displayed + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingKeyName Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function LoadSetting($p_str_SettingKeyName) { + // get current section + reset($this->a_arr_Sections); + $p_arr_Return = array(); + $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); + return $p_arr_Return; + } + + /** + * Returns a line break to start a new line. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addNewline() { + return '
                                                                                    '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addLineSpace() { + return '

                                                                                    '; + } + + /** + * Returns a simple text inside html text. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function addText($p_str_Text) { + return sprintf('%s', $p_str_Text); + } + + /** + * Returns the html tag for an input/select label. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_Caption Label caption. + * @return string + * + * Edited 2020-12-01T0159+0100.. + * @since 2.1.6 no colon + */ + protected function addLabel($p_str_SettingName, $p_str_Caption) { + if (empty($p_str_Caption)) { + return ""; + } + // remove the colon causing localization issues with French, + // and with languages not using punctuation at all, + // and with languages using other punctuation marks instead of colon, + // e.g. Greek using a raised dot. + // In French, colon is preceded by a space, forcibly non-breaking, + // and narrow per new school. + // Add colon to label strings for inclusion in localization. + // Colon after label is widely preferred best practice, mandatory per style guides. + // + return sprintf('', $p_str_SettingName, $p_str_Caption); + // ^ here deleted colon 2020-12-08T1546+0100 + } + + /** + * Returns the html tag for an input [type = text]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. + * @param bool $p_bool_Readonly Set the input to be read only, default false. + * @param bool $p_bool_Hidden Set the input to be hidden, default false. + * @return string + */ + protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { + $l_str_Style = ""; + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + if ($p_bool_Hidden) { + $l_str_Style .= 'display:none;'; + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, + $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addCheckbox($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], + MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); + } + + /** + * Returns the html tag for a select box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre select the current value. + * @param array $p_arr_Options Possible options to be selected. + * @return string + */ + protected function addSelectBox($p_str_SettingName, $p_arr_Options) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + $l_str_Options = ""; + + /* loop through all array keys */ + foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { + $l_str_Options .= sprintf('', + $l_str_Value, + $l_arr_Data["value"] == $l_str_Value ? "selected" : "", + $l_str_Caption); + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); + } + + /** + * Returns the html tag for a text area. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. + * @return string + */ + protected function addTextArea($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addColorSelection($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_in_Min Minimum value. + * @param int $p_int_Max Maximum value. + * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + + if ($p_bool_Deci) { + $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); + } else { + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); + } + } + +} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php new file mode 100644 index 0000000..33f327a --- /dev/null +++ b/class/dashboard/subpage-diagnostics.php @@ -0,0 +1,140 @@ +addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + */ + protected function getMetaBoxes() { + return array( + $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_PhpExtensions = ""; + // iterate through each PHP extension + foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { + if ($l_int_Index > 0) { + $l_str_PhpExtensions .= ' | '; + } + $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); + } + + /** @var WP_Theme $l_obj_CurrentTheme */ + $l_obj_CurrentTheme = wp_get_theme(); + + $l_str_WordPressPlugins = ""; + // iterate through each installed WordPress Plugin + foreach (get_plugins() as $l_arr_Plugin) { + $l_str_WordPressPlugins .= '
                                                                                    '; + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= ''; + } + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "server" => $_SERVER["SERVER_NAME"], + + "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php" => phpversion(), + + "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "user-agent" => $_SERVER["HTTP_USER_AGENT"], + + "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "memory-limit" => ini_get('memory_limit'), + + "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php-extensions" => $l_str_PhpExtensions, + + "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "wordpress" => $wp_version, + + "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", + + "plugins" => $l_str_WordPressPlugins + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php new file mode 100644 index 0000000..940a22b --- /dev/null +++ b/class/dashboard/subpage-main.php @@ -0,0 +1,1182 @@ +addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); + + // sync tab name with mirror in public function CustomCSSMigration(): + $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); + + $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); + $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); + $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); + + return $l_arr_Tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * HyperlinkArrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function getMetaBoxes() { + $l_arr_MetaBoxes = array(); + + // sync box name with mirror in task.php: + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); + } + + $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); + } + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); + + return $l_arr_MetaBoxes; + } + + /** + * Displays all settings for the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function ReferenceContainer() { + + // options for the label element: + $l_arr_LabelElement = array( + "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the positioning of the reference container + $l_arr_Positions = array( + "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), + "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // basic responsive page layout options: + $l_arr_PageLayoutOptions = array( + "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the separating punctuation between backlinks: + $l_arr_Separators = array( + // Unicode character names are conventionally uppercase. + "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the terminating punctuation after backlinks: + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because + // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_Terminators = array( + "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): + "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the first column width (per cent is a ratio, not a unit): + $l_arr_WidthUnits = array( + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for reference container script mode: + $l_arr_ScriptMode = array( + "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), + + "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), + + "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + + "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), + + "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), + "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), + "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), + + "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), + "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-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), + + "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), + "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), + "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), + "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), + "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), + "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), + + "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), + "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), + "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), + "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), + "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), + "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), + "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), + "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), + "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), + "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), + "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), + "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), + "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), + "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all options for the footnotes start and end tag short codes + * Displays all options for the footnotes numbering + * Displays all options for the scrolling behavior + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function StartEnd() { + // footnotes start tag short code options: + $l_arr_ShortCodeStart = array( + "((" => "((", + "(((" => "(((", + "{{" => "{{", + "{{{" => "{{{", + "[n]" => "[n]", + "[fn]" => "[fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[ref]" => "[ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // footnotes end tag short code options: + $l_arr_ShortCodeEnd = array( + "))" => "))", + ")))" => ")))", + "}}" => "}}", + "}}}" => "}}}", + "[/n]" => "[/n]", + "[/fn]" => "[/fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[/ref]" => "[/ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the syntax validation: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), + "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), + + "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), + "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), + + // for script showing/hiding user defined text boxes: + "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // option to enable syntax validation, label mirrored in task.php: + "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), + "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Numbering() { + // define some space for the output + $l_str_Space = "     "; + // options for the combination of identical footnotes + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the numbering style of the footnotes: + $l_arr_CounterStyle = array( + "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", + "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", + "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", + "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", + "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", + "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), + + // algorithmically combine identicals: + "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), + "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Support for Ibid. notation added thanks to @meglio in . + "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Scrolling() { + + // options for enabling hard links for AMP compat: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), + "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), + "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable hard links for AMP compat: + "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), + "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), + "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), + "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), + "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable backlink tooltips: + "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), + "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), + "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function Love() { + // options for the acknowledgment display in the footer: + $l_arr_Love = array( + // logo only: + "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // logo followed by heart symbol: + "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // logo preceded by heart symbol: + "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. + "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // "This website uses Footnotes." + "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the Footnotes plugin." + "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the awesome Footnotes plugin." + "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // "No display of any “Footnotes love” mention in the footer" + "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), + + "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the excerpt setting + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function Excerpts() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), + "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. + "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnote referrers + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function Superscript() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for superscript normalize scope: + $l_arr_NormalizeSuperscript = array( + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), + + "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + + "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), + "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnotes mouse-over box. + * + * @author Stefan Herndler + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function MouseOverBox() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), + "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), + "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the name of the plugin as logogram “footnotes”. + "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxPosition() { + + // options for the Mouse-over box position + $l_arr_Position = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the alternative Mouse-over box position + $l_arr_AlternativePosition = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), + "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), + "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxDimensions() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), + "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), + "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTiming() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), + "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), + "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), + "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), + "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTruncation() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), + + "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), + // The feature trims back until the last full word. + "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxText() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), + "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), + "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), + "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxAppearance() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the font size unit: + $l_arr_FontSizeUnits = array( + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), + "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), + "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), + "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), + // To use default: Clear or leave empty. + "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), + // To use default: Clear or leave empty. + "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), + "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), + // To use default: Clear or leave empty. + "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), + "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), + // To use default: Clear or leave empty. + "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the prepended symbol + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function HyperlinkArrow() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), + "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), + "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the custom css box. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function CustomCSS() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text", + // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-2" => ".footnote_tooltip", + // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-3" => ".footnote_plugin_index", + // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-4" => ".footnote_plugin_text", + // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSMigration() { + + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), + "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), + "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the “Referrers and tooltips” settings tab name. + "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSNew() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); + // replace all placeholders + $l_obj_Template->replace( + array( + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), + + "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @author Stefan Herndler + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function LookupHooks() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); + + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), + "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), + "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), + "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), + "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", + + "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), + "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), + "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", + + "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), + "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), + "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", + + "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), + "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), + "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", + + "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), + "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), + "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays a short introduction of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Help() { + global $g_obj_MCI_Footnotes; + // load footnotes starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + + if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { + // load user defined starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". + " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". + " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". + " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". + " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + . $l_arr_Footnote_EndingTag["value"] . " World!"; + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "start" => $l_arr_Footnote_StartingTag["value"], + + "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "end" => $l_arr_Footnote_EndingTag["value"], + + "example-code" => $l_str_Example, + "example-string" => "
                                                                                    " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), + + "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') + ) + ); + // call wp_head function to get the Styling of the mouse-over box + $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all Donate button to support the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Donate() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); + // replace all placeholders + $l_obj_Template->replace( + array( + "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} diff --git a/class/hooks.php b/class/hooks.php index 617a658..e86d106 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,18 +1,19 @@ -ClearAll(); } /** * Add Links to the Plugin in the "installed Plugins" page. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_links Current Links. - * @param string $p_str_plugin_file_name Plugins init file name. + * @param array $p_arr_Links Current Links. + * @param string $p_str_PluginFileName Plugins init file name. * @return array */ - public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { - // Append link to the WordPress Plugin page. - $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); - // Append link to the settings page. - $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); - // Append link to the PayPal donate function. - $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); - // Return new links. - return $p_arr_links; + public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { + // append link to the WordPress Plugin page + $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the Settings page + $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the PlayPal Donate function + $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // return new links + return $p_arr_Links; } } diff --git a/class/init.php b/class/init.php index 812bd13..e1001a3 100644 --- a/class/init.php +++ b/class/init.php @@ -1,11 +1,13 @@ -initialize_dashboard(); - // Initialize the Plugin Task. - $this->initialize_task(); + // initialize the Plugin Dashboard + $this->initializeDashboard(); + // initialize the Plugin Task + $this->initializeTask(); - // Register all Public Stylesheets and Scripts. - add_action( 'init', array( $this, 'register_public' ) ); - // Enqueue all Public Stylesheets and Scripts. - add_action( 'wp_enqueue_scripts', array( $this, 'register_public' ) ); - // Register all Widgets of the Plugin.. - add_action( 'widgets_init', array( $this, 'initialize_widgets' ) ); + // Register all Public Stylesheets and Scripts + add_action('init', array($this, 'registerPublic')); + // Enqueue all Public Stylesheets and Scripts + add_action('wp_enqueue_scripts', array($this, 'registerPublic')); + // Register all Widgets of the Plugin. + add_action('widgets_init', array($this, 'initializeWidgets')); } /** * Initializes all Widgets of the Plugin. * + * @author Stefan Herndler * @since 1.5.0 * + * * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution * * @since 1.6.5 @@ -124,34 +129,37 @@ class MCI_Footnotes { * and use the bare register_widget() here. * @see self::run() * - * Also, the visibility of initialize_widgets() is not private any longer. + * Also, the visibility of initializeWidgets() is not private any longer. */ - public function initialize_widgets() { - register_widget( 'MCI_Footnotes_Widget_Reference_container' ); + public function initializeWidgets() { + register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); } /** * Initializes the Dashboard of the Plugin and loads them. * + * @author Stefan Herndler * @since 1.5.0 */ - private function initialize_dashboard() { + private function initializeDashboard() { new MCI_Footnotes_Layout_Init(); } /** * Initializes the Plugin Task and registers the Task hooks. * + * @author Stefan Herndler * @since 1.5.0 */ - private function initialize_task() { - $this->a_obj_task = new MCI_Footnotes_Task(); - $this->a_obj_task->register_hooks(); + private function initializeTask() { + $this->a_obj_Task = new MCI_Footnotes_Task(); + $this->a_obj_Task->registerHooks(); } /** * Registers and enqueues scripts and stylesheets to the public pages. * + * @author Stefan Herndler * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. @@ -160,7 +168,7 @@ class MCI_Footnotes { * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ - public function register_public() { + public function registerPublic() { /** * Enqueues external scripts. @@ -173,10 +181,10 @@ class MCI_Footnotes { * * The condition about tooltips was missing, only the not-alternative-tooltips part was present. */ - // Set conditions re-used for stylesheet enqueuing. - self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); + // set conditions re-used for stylesheet enqueuing: + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); /** * Enqueues the jQuery library registered by WordPress. @@ -187,79 +195,68 @@ class MCI_Footnotes { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * jQuery is also used for animated scrolling, so it was loaded by default. * The function wp_enqueue_script() avoids loading the same library multiple times. * After adding the alternative reference container, jQuery has become optional, * but still enabled by default. */ - if ( 'jquery' === $l_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) { - + if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { + wp_enqueue_script( 'jquery' ); - + } - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { /** * Enqueues the jQuery Tools library shipped with the plugin. * - * Redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js. - * - * Add versioning. - * - * @since 2.1.2 - * @date 2020-11-18T2150+0100 - * - * No '-js' in the handle, is appended automatically. - * - * Deferring to the footer breaks jQuery tooltip display. - * @date 2021-02-23T1105+0100 + * redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js + * 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' ), + plugins_url('footnotes/js/jquery.tools.min.js'), array(), - '1.2.7.redacted.2', - false + '1.2.7.redacted.2' ); + /** + * Registers jQuery UI from the JavaScript Content Delivery Network. + * + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: + * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + * Used to add jQuery UI following @vonpiernik: + * : + * + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. + * + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: + * + * See + * + * This was enabled in Footnotes v2.0.0 through v2.0.3. + * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + */ + //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 + //wp_enqueue_script( 'jQueryUI' ); + /** + * This is then needed instead of the above first instance: + * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + */ + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + /** * Enqueues some jQuery UI libraries registered by WordPress. * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * - * @reporter @rajinderverma - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/ - * - * @reporter @ericcorbett2 - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 - * - * @reporter @honlapdavid - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 - * - * @reporter @mmallett - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 - * - * Fetch jQuery UI from cdnjs.cloudflare.com. - * @since 2.0.0 - * @date 2020-10-26T1907+0100 - * @contributor @vonpiernik - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 - * - * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. - * - * @since 2.0.4 - * @date 2020-11-01T1902+0100 - * @reporter @check2020de - * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ - * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui - * + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 * If alternative tooltips are enabled, these libraries are not needed. */ wp_enqueue_script( 'jquery-ui-core' ); @@ -311,43 +308,34 @@ class MCI_Footnotes { * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. */ - // Set tooltip mode for use in stylesheet name. - if ( self::$a_bool_tooltips_enabled ) { - if ( self::$a_bool_alternative_tooltips_enabled ) { - $l_str_tooltip_mode_short = 'al'; - $l_str_tooltip_mode_rest = 'ternative-tooltips'; + // set tooltip mode for use in stylesheet name: + if ( self::$a_bool_TooltipsEnabled ) { + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + $l_str_TooltipMode = 'al'; + $l_str_TComplement = 'ternative-tooltips'; } else { - $l_str_tooltip_mode_short = 'jq'; - $l_str_tooltip_mode_rest = 'uery-tooltips'; + $l_str_TooltipMode = 'jq'; + $l_str_TComplement = 'uery-tooltips'; } } else { - $l_str_tooltip_mode_short = 'no'; - $l_str_tooltip_mode_rest = '-tooltips'; + $l_str_TooltipMode = 'no'; + $l_str_TComplement = '-tooltips'; } - // Set basic responsive page layout mode for use in stylesheet name. - $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); - switch ( $l_str_page_layout_option ) { - case 'reference-container': - $l_str_layout_mode = '1'; - break; - case 'entry-content': - $l_str_layout_mode = '2'; - break; - case 'main-content': - $l_str_layout_mode = '3'; - break; - case 'none': - default: - $l_str_layout_mode = '0'; - break; + // set basic responsive page layout mode for use in stylesheet name: + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + switch ( $l_str_PageLayoutOption ) { + case "reference-container": $l_str_LayoutMode = '1'; break; + case "entry-content" : $l_str_LayoutMode = '2'; break; + case "main-content" : $l_str_LayoutMode = '3'; break; + case "none": default: $l_str_LayoutMode = '0'; break; } - // Enqueue the tailored united minified stylesheet. + // enqueue the tailored united minified stylesheet: wp_enqueue_style( - 'mci-footnotes-' . $l_str_tooltip_mode_short . $l_str_tooltip_mode_rest . '-pagelayout-' . $l_str_page_layout_option, + 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, @@ -368,12 +356,12 @@ class MCI_Footnotes { wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); - if ( 'none' !== $l_str_page_layout_option ) { + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + if ($l_str_PageLayoutOption != 'none') { wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_page_layout_option, + 'mci-footnotes-layout-' . $l_str_PageLayoutOption, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' ), array(), C_STR_FOOTNOTES_VERSION, diff --git a/class/language.php b/class/language.php index fd86a8c..fccf143 100644 --- a/class/language.php +++ b/class/language.php @@ -1,11 +1,13 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_id, - 'title' => $p_str_title, - 'submit' => $p_bool_has_submit_button, - 'container' => $p_int_settings_container_index, - ); - } - - /** - * Returns an array describing a meta box. - * - * @since 1.5.0 - * @param string $p_str_section_id Parent Section ID. - * @param string $p_str_id Unique ID suffix. - * @param string $p_str_title Title for the meta box. - * @param string $p_str_callback_function_name Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function add_meta_box( $p_str_section_id, $p_str_id, $p_str_title, $p_str_callback_function_name ) { - return array( - 'parent' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_section_id, - 'id' => $p_str_id, - 'title' => $p_str_title, - 'callback' => $p_str_callback_function_name, - ); - } - - /** - * Registers a sub page. - * - * @since 1.5.0 - */ - public function register_sub_page() { - global $submenu; - - if ( array_key_exists( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ), $submenu ) ) { - foreach ( $submenu[ plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ) ] as $l_arr_sub_menu ) { - if ( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ) === $l_arr_sub_menu[2] ) { - remove_submenu_page( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ); - } - } - } - - $this->a_str_sub_page_hook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, - $this->get_sub_page_title(), - $this->get_sub_page_title(), - 'manage_options', - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), - array( $this, 'display_content' ) - ); - } - - /** - * Registers all sections for a sub page. - * - * @since 1.5.0 - */ - public function register_sections() { - foreach ( $this->get_sections() as $l_arr_section ) { - // Append tab to the tab-array. - $this->a_arr_sections[ $l_arr_section['id'] ] = $l_arr_section; - add_settings_section( - $l_arr_section['id'], - '', - array( $this, 'Description' ), - $l_arr_section['id'] - ); - $this->register_meta_boxes( $l_arr_section['id'] ); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @since 1.5.0 - * @param string $p_str_parent_id Parent section unique id. - */ - private function register_meta_boxes( $p_str_parent_id ) { - // Iterate through each meta box. - foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) { - if ( $p_str_parent_id !== $l_arr_meta_box['parent'] ) { - continue; - } - add_meta_box( - $p_str_parent_id . '-' . $l_arr_meta_box['id'], - $l_arr_meta_box['title'], - array( $this, $l_arr_meta_box['callback'] ), - $p_str_parent_id, - 'main' - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @since 1.5.0 - */ - private function append_scripts() { - wp_enqueue_script( 'postbox' ); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker' ); - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style( 'mci-footnotes-admin' ); - } - - // phpcs:disable WordPress.Security.NonceVerification.Recommended - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * Displays the content of specific sub page. - * - * @since 1.5.0 - */ - public function display_content() { - $this->append_scripts(); - - // TODO: add nonce verification. - - // Get the current section. - reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); - $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; - - // Store settings. - $l_bool_settings_updated = false; - if ( array_key_exists( 'save-settings', $_POST ) ) { - if ( 'save' === $_POST['save-settings'] ) { - unset( $_POST['save-settings'] ); - unset( $_POST['submit'] ); - $l_bool_settings_updated = $this->save_settings(); - } - } - - // Display all sections and highlight the active section. - echo '
                                                                                    '; - echo '
                                                                                    '; - - if ( $l_bool_settings_updated ) { - echo sprintf( '
                                                                                    %s
                                                                                    ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); - } - - // Form to submit the active section. - echo '
                                                                                    '; - echo ''; - // Outputs the settings field of the active section. - do_settings_sections( $l_arr_active_section['id'] ); - do_meta_boxes( $l_arr_active_section['id'], 'main', null ); - - // Add submit button to active section if defined. - if ( $l_arr_active_section['submit'] ) { - submit_button(); - } - echo ''; - echo '
                                                                                    '; - - // Echo JavaScript for the expand/collapse function of the meta boxes. - echo ''; - } - // phpcs:enable - - // phpcs:disable WordPress.Security.NonceVerification.Recommended - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * Save all Plugin settings. - * - * @since 1.5.0 - * @return bool - */ - private function save_settings() { - $l_arr_new_settings = array(); - - // TODO: add nonce verification. - - // Get current section. - reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); - $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; - - foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { - if ( array_key_exists( $l_str_key, $_POST ) ) { - $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); - } else { - // Setting is not defined in the POST array, define it to avoid the Default value. - $l_arr_new_settings[ $l_str_key ] = ''; - } - } - // Update settings. - return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); - } - // phpcs:enable - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @since 1.5.0 - */ - public function description() { - // Default no description will be displayed. - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @since 1.5.0 - * @param string $p_str_setting_key_name Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function load_setting( $p_str_setting_key_name ) { - // Get current section. - reset( $this->a_arr_sections ); - $p_arr_return = array(); - $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); - $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); - $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); - return $p_arr_return; - } - - /** - * Returns a line break to start a new line. - * - * @since 1.5.0 - * @return string - */ - protected function add_newline() { - return '
                                                                                    '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @since 1.5.0 - * @return string - */ - protected function add_line_space() { - return '

                                                                                    '; - } - - /** - * Returns a simple text inside html text. - * - * @since 1.5.0 - * @param string $p_str_text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function add_text( $p_str_text ) { - return sprintf( '%s', $p_str_text ); - } - - /** - * Returns the html tag for an input/select label. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_caption Label caption. - * @return string - */ - protected function add_label( $p_str_setting_name, $p_str_caption ) { - if ( empty( $p_str_caption ) ) { - return ''; - } - - /* - * Remove the colon causing localization issues with French, and with - * languages not using punctuation at all, and with languages using other - * punctuation marks instead of colon, e.g. Greek using a raised dot. - * In French, colon is preceded by a space, forcibly non-breaking, and - * narrow per new school. - * Add colon to label strings for inclusion in localization. Colon after - * label is widely preferred best practice, mandatory per - * [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui). - */ - return sprintf( '', $p_str_setting_name, $p_str_caption ); - } - - /** - * Returns the html tag for an input [type = text]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @param int $p_str_max_length Maximum length of the input, default 999 characters. - * @param bool $p_bool_readonly Set the input to be read only, default false. - * @param bool $p_bool_hidden Set the input to be hidden, default false. - * @return string - */ - protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) { - $l_str_style = ''; - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - if ( $p_bool_hidden ) { - $l_str_style .= 'display:none;'; - } - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $p_str_max_length, - $l_str_style, - $l_arr_data['value'], - $p_bool_readonly ? 'readonly="readonly"' : '' - ); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @return string - */ - protected function add_checkbox( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : '' - ); - } - - /** - * Returns the html tag for a select box. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre select the current value. - * @param array $p_arr_options Possible options to be selected. - * @return string - */ - protected function add_select_box( $p_str_setting_name, $p_arr_options ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - $l_str_options = ''; - - foreach ( $p_arr_options as $l_str_value => $l_str_caption ) { - $l_str_options .= sprintf( - '', - $l_str_value, - $l_str_value === $l_arr_data['value'] ? 'selected' : '', - $l_str_caption - ); - } - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_str_options - ); - } - - /** - * Returns the html tag for a text area. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre fill the text area. - * @return string - */ - protected function add_textarea( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'] - ); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @since 1.5.6 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @return string - */ - protected function add_color_selection( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'] - ); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @param int $p_in_min Minimum value. - * @param int $p_int_max Maximum value. - * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - - if ( $p_bool_deci ) { - $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_str_value, - $p_in_min, - $p_int_max - ); - } else { - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'], - $p_in_min, - $p_int_max - ); - } - } - -} diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php deleted file mode 100644 index 502f293..0000000 --- a/class/layout/diagnostics.php +++ /dev/null @@ -1,149 +0,0 @@ -add_section( 'diagnostics', __( 'Diagnostics', 'footnotes' ), null, false ), - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @since 1.5.0 - * @return array - */ - protected function get_meta_boxes() { - return array( - $this->add_meta_box( 'diagnostics', 'diagnostics', __( 'Displays information about the web server, PHP and WordPress', 'footnotes' ), 'Diagnostics' ), - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_php_extensions = ''; - // Iterate through each PHP extension. - foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) { - if ( $l_int_index > 0 ) { - $l_str_php_extensions .= ' | '; - } - $l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension ); - } - - $l_obj_current_theme = wp_get_theme(); - - $l_str_wordpress_plugins = ''; - // Iterate through each installed WordPress Plugin. - foreach ( get_plugins() as $l_arr_plugin ) { - $l_str_wordpress_plugins .= '
                                                                                    '; - $l_str_wordpress_plugins .= ''; - // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found - $l_str_wordpress_plugins .= ''; - // phpcs:enable - $l_str_wordpress_plugins .= ''; - } - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' ); - - if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { - die; - } else { - $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); - } - if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { - die; - } else { - $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); - } - - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-server' => __( 'Server name', 'footnotes' ), - 'server' => $l_str_server_name, - - 'label-php' => __( 'PHP version', 'footnotes' ), - 'php' => phpversion(), - - 'label-user-agent' => __( 'User agent', 'footnotes' ), - 'user-agent' => $l_str_http_user_agent, - - 'label-max-execution-time' => __( 'Max execution time', 'footnotes' ), - 'max-execution-time' => ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'footnotes' ), - - 'label-memory-limit' => __( 'Memory limit', 'footnotes' ), - 'memory-limit' => ini_get( 'memory_limit' ), - - 'label-php-extensions' => __( 'PHP extensions', 'footnotes' ), - 'php-extensions' => $l_str_php_extensions, - - 'label-wordpress' => __( 'WordPress version', 'footnotes' ), - 'wordpress' => $wp_version, - - 'label-theme' => __( 'Active Theme', 'footnotes' ), - 'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']', - - 'plugins' => $l_str_wordpress_plugins, - ) - ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - // Display template with replaced placeholders. - echo $l_obj_template->get_content(); - // phpcs:enable - } -} diff --git a/class/layout/init.php b/class/layout/init.php deleted file mode 100644 index 72c347d..0000000 --- a/class/layout/init.php +++ /dev/null @@ -1,207 +0,0 @@ -a_arr_sub_page_classes[ $l_obj_class->get_priority() ] = $l_obj_class; - } - } - ksort( $this->a_arr_sub_page_classes ); - - // Register hooks/actions. - add_action( 'admin_init', array( $this, 'initialize_settings' ) ); - add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); - // Register AJAX callbacks for Plugin information. - add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); - add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @since 1.5.0 - */ - public function initialize_settings() { - MCI_Footnotes_Settings::instance()->register_settings(); - // Iterate though each sub class of the layout engine and register their sections. - foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { - $l_obj_layout_engine_sub_class->register_sections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function register_main_menu() { - global $menu; - // Iterate through each main menu. - foreach ( $menu as $l_arr_main_menu ) { - // 3terate through each main menu attribute. - foreach ( $l_arr_main_menu as $l_str_attribute ) { - // Main menu already added, append sub pages and stop. - if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { - $this->register_sub_pages(); - return; - } - } - } - - // Add a new main menu page to the WordPress dashboard. - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // Page title. - self::C_STR_MAIN_MENU_TITLE, // Menu title. - 'manage_options', // Capability. - self::C_STR_MAIN_MENU_SLUG, // Menu slug. - array( $this, 'display_other_plugins' ), // Function. - plugins_url( 'footnotes/img/main-menu.png' ), // Icon URL. - null // Position. - ); - $this->register_sub_pages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @since 1.5.0 - */ - private function register_sub_pages() { - // First registered sub menu page MUST NOT contain a unique slug suffix. - // Iterate though each sub class of the layout engine and register their sub page. - foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { - $l_obj_layout_engine_sub_class->register_sub_page(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @since 1.5.0 - */ - public function display_other_plugins() { - printf( '

                                                                                    ' ); - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - - printf( 'visit Mark Cheret' ); - printf( '

                                                                                    ' ); - - printf( '' ); - } - - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @since 1.5.0 - */ - public function get_plugin_meta_information() { - // TODO: add nonce verification. - - // Get plugin internal name from POST data. - if ( isset( $_POST['plugin'] ) ) { - $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); - } - - if ( empty( $l_str_plugin_name ) ) { - echo wp_json_encode( array( 'error' => 'Plugin name invalid.' ) ); - exit; - } - $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; - // Call URL and collect data. - $l_arr_response = wp_remote_get( $l_str_url ); - // Check if response is valid. - if ( is_wp_error( $l_arr_response ) ) { - echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); - exit; - } - if ( ! array_key_exists( 'body', $l_arr_response ) ) { - echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); - exit; - } - // Get the body of the response. - $l_str_response = $l_arr_response['body']; - // Get plugin object. - $l_arr_plugin = json_decode( $l_str_response, true ); - if ( empty( $l_arr_plugin ) ) { - echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                    URL: ' . $l_str_url . '
                                                                                    Response: ' . $l_str_response ) ); - exit; - } - - $l_int_num_ratings = array_key_exists( 'num_ratings', $l_arr_plugin ) ? intval( $l_arr_plugin['num_ratings'] ) : 0; - $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; - $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); - - // Return Plugin information as JSON encoded string. - echo wp_json_encode( - array( - 'error' => '', - 'PluginDescription' => array_key_exists( 'short_description', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['short_description'] ) : 'Error reading Plugin information', - 'PluginAuthor' => array_key_exists( 'author', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['author'] ) : 'unknown', - 'PluginRatingText' => $l_int_stars . ' ' . __( 'rating based on', 'footnotes' ) . ' ' . $l_int_num_ratings . ' ' . __( 'ratings', 'footnotes' ), - 'PluginRating1' => $l_int_stars >= 0.5 ? 'star-full' : 'star-empty', - 'PluginRating2' => $l_int_stars >= 1.5 ? 'star-full' : 'star-empty', - 'PluginRating3' => $l_int_stars >= 2.5 ? 'star-full' : 'star-empty', - 'PluginRating4' => $l_int_stars >= 3.5 ? 'star-full' : 'star-empty', - 'PluginRating5' => $l_int_stars >= 4.5 ? 'star-full' : 'star-empty', - 'PluginRating' => $l_int_num_ratings, - 'PluginLastUpdated' => array_key_exists( 'last_updated', $l_arr_plugin ) ? $l_arr_plugin['last_updated'] : 'unknown', - 'PluginDownloads' => array_key_exists( 'downloaded', $l_arr_plugin ) ? $l_arr_plugin['downloaded'] : '---', - ) - ); - exit; - } - // phpcs:enable -} diff --git a/class/layout/settings.php b/class/layout/settings.php deleted file mode 100644 index bfddc98..0000000 --- a/class/layout/settings.php +++ /dev/null @@ -1,1261 +0,0 @@ -add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true ); - - // Sync tab name with mirror in public function custom_css_migration(). - $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true ); - - $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true ); - $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true ); - $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false ); - - return $l_arr_tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * hyperlink_arrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function get_meta_boxes() { - $l_arr_meta_boxes = array(); - - // Sync box name with mirror in task.php. - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); - - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' ); - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' ); - } - - $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' ); - - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { - $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' ); - } - $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' ); - - $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction in how to use the plugin', 'footnotes' ), 'help' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' ); - - return $l_arr_meta_boxes; - } - - /** - * Displays all settings for the reference container. - * - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function reference_container() { - - // Options for the label element. - $l_arr_label_element = array( - 'p' => __( 'paragraph', 'footnotes' ), - 'h2' => __( 'heading 2', 'footnotes' ), - 'h3' => __( 'heading 3', 'footnotes' ), - 'h4' => __( 'heading 4', 'footnotes' ), - 'h5' => __( 'heading 5', 'footnotes' ), - 'h6' => __( 'heading 6', 'footnotes' ), - ); - // Options for the positioning of the reference container. - $l_arr_positions = array( - 'post_end' => __( 'at the end of the post', 'footnotes' ), - 'widget' => __( 'in the widget area', 'footnotes' ), - 'footer' => __( 'in the footer', 'footnotes' ), - ); - // Basic responsive page layout options. - $l_arr_page_layout_options = array( - 'none' => __( 'No', 'footnotes' ), - 'reference-container' => __( 'to the reference container exclusively', 'footnotes' ), - 'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ), - 'main-content' => __( 'to the main element including the post title', 'footnotes' ), - ); - // Options for the separating punctuation between backlinks. - $l_arr_separators = array( - // Unicode character names are conventionally uppercase. - 'comma' => __( 'COMMA', 'footnotes' ), - 'semicolon' => __( 'SEMICOLON', 'footnotes' ), - 'en_dash' => __( 'EN DASH', 'footnotes' ), - ); - // Options for the terminating punctuation after backlinks. - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. - // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_terminators = array( - 'period' => __( 'FULL STOP', 'footnotes' ), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts). - 'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ), - 'colon' => __( 'COLON', 'footnotes' ), - ); - // Options for the first column width (per cent is a ratio, not a unit). - $l_arr_width_units = array( - '%' => __( 'per cent', 'footnotes' ), - 'px' => __( 'pixels', 'footnotes' ), - 'rem' => __( 'root em', 'footnotes' ), - 'em' => __( 'em', 'footnotes' ), - 'vw' => __( 'viewport width', 'footnotes' ), - ); - // Options for reference container script mode. - $l_arr_script_mode = array( - 'jquery' => __( 'jQuery', 'footnotes' ), - 'js' => __( 'plain JavaScript', 'footnotes' ), - ); - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), - 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), - - 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), - 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), - - 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), - 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ), - - 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ), - 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ), - - 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), - 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), - 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), - - 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), - 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), - // Translators: %s: at the end of the post. - 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), - - 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), - 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ), - 'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ), - - 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ), - 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ), - - 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ), - 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ), - 'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ), - - 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ), - 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ), - 'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ), - - 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), - 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), - 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), - - 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), - 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), - 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), - - 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), - 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), - 'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ), - - 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ), - 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ), - - 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ), - '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ), - 'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ), - - 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ), - 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ), - 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ), - 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ), - 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ), - 'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ), - - 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ), - 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ), - 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ), - 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ), - 'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ), - - 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ), - 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), - 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), - 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), - 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - - 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), - 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), - 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), - 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), - 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - - 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), - 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), - 'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ), - - 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), - 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), - 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the footnotes start and end tag short codes. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function start_end() { - // Footnotes start tag short code options. - $l_arr_shortcode_start = array( - '((' => '((', - '(((' => '(((', - '{{' => '{{', - '{{{' => '{{{', - '[n]' => '[n]', - '[fn]' => '[fn]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - '[ref]' => '[ref]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - // Custom (user-defined) start and end tags bracketing the footnote text inline. - 'userdefined' => __( 'custom short code', 'footnotes' ), - ); - // Footnotes end tag short code options. - $l_arr_shortcode_end = array( - '))' => '))', - ')))' => ')))', - '}}' => '}}', - '}}}' => '}}}', - '[/n]' => '[/n]', - '[/fn]' => '[/fn]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - '[/ref]' => '[/ref]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - // Custom (user-defined) start and end tags bracketing the footnote text inline. - 'userdefined' => __( 'custom short code', 'footnotes' ), - ); - // Options for the syntax validation. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), - - 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), - 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), - 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ), - - 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ), - 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ), - 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), - - // For script showing/hiding user defined text boxes. - 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - 'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ), - - // Option to enable syntax validation, label mirrored in task.php. - 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ), - 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), - 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), - - 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the footnotes numbering. - * - * @since 2.2.0 - */ - public function numbering() { - // Define some space for the output. - $l_str_space = '     '; - // Options for the combination of identical footnotes. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for the numbering style of the footnotes. - $l_arr_counter_style = array( - 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', - 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', - 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', - 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', - 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', - 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ), - 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ), - - // Algorithmically combine identicals. - 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ), - 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ), - 'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ), - // Support for Ibid. notation added thanks to @meglio in . - 'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the scrolling behavior. - * - * @since 2.2.0 - */ - public function scrolling() { - - // Options for enabling hard links for AMP compat. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), - 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), - 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), - - 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), - 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), - 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), - - // Enable hard links for AMP compat. - 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), - 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), - 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), - - 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), - 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), - 'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ), - - 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ), - 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ), - 'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ), - 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ), - 'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ), - - // Enable backlink tooltips. - 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ), - 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ), - 'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead.', 'footnotes' ), - - 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), - 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), - 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function love() { - // Options for the acknowledgment display in the footer. - $l_arr_love = array( - // Logo only. - 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Logo followed by heart symbol. - 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // Logo preceded by heart symbol. - 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: 2: heart symbol 1: footnotes logogram. - 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // Translators: %s: Plugin logo. - 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. - 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. - 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - 'random' => __( 'randomly determined display of either mention', 'footnotes' ), - // Translators: 1: Plugin logo.2: heart symbol. - 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - // Translators: %s: Plugin logo. - 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), - 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), - // Translators: %s: Plugin logo. - 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), - 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the excerpt setting. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function excerpts() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), - 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), - 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), - // Translators: %s: link to the Advanced Excerpt Plugin. - 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for the footnote referrers. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function superscript() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for superscript normalize scope. - $l_arr_normalize_superscript = array( - 'no' => __( 'No', 'footnotes' ), - 'referrers' => __( 'Footnote referrers', 'footnotes' ), - 'all' => __( 'All superscript elements', 'footnotes' ), - ); - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), - 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), - - 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), - 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), - - 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ), - 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), - - 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), - - 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), - 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), - 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays enabled status for the footnotes mouse-over box. - * - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function mouseover_box() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ), - 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ), - 'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ), - - 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), - 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), - 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), - // Translators: %s: Plugin logo. - 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays position settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_position() { - - // Options for the Mouse-over box position. - $l_arr_position = array( - 'top left' => __( 'top left', 'footnotes' ), - 'top center' => __( 'top center', 'footnotes' ), - 'top right' => __( 'top right', 'footnotes' ), - 'center right' => __( 'center right', 'footnotes' ), - 'bottom right' => __( 'bottom right', 'footnotes' ), - 'bottom center' => __( 'bottom center', 'footnotes' ), - 'bottom left' => __( 'bottom left', 'footnotes' ), - 'center left' => __( 'center left', 'footnotes' ), - ); - // Options for the alternative Mouse-over box position. - $l_arr_alternative_position = array( - 'top left' => __( 'top left', 'footnotes' ), - 'top right' => __( 'top right', 'footnotes' ), - 'bottom right' => __( 'bottom right', 'footnotes' ), - 'bottom left' => __( 'bottom left', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ), - 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ), - 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ), - 'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ), - - 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ), - 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), - 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), - 'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ), - - 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ), - 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), - 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), - 'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays dimensions setting for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_dimensions() { - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ), - 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ), - 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ), - 'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays timing settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_timing() { - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ), - 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ), - 'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ), - 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ), - 'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ), - 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ), - 'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ), - 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ), - 'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays truncation settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_truncation() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ), - 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ), - - 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ), - 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ), - // The feature trims back until the last full word. - 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), - - 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), - 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays dedicated tooltip text settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_text() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'description-delimiter' => __( '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.', 'footnotes' ), - - 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ), - 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ), - 'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ), - - 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ), - 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ), - 'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ), - 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ), - 'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ), - - 'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays style settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_appearance() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for the font size unit. - $l_arr_font_size_units = array( - 'em' => __( 'em', 'footnotes' ), - 'rem' => __( 'rem', 'footnotes' ), - 'px' => __( 'pixels', 'footnotes' ), - 'pt' => __( 'points', 'footnotes' ), - 'pc' => __( 'picas', 'footnotes' ), - 'mm' => __( 'millimeters', 'footnotes' ), - '%' => __( 'per cent', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ), - 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ), - 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ), - 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ), - 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), - - 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), - 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), - 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), - // Translators: %s: Clear or leave empty. - 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), - 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), - 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), - - 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), - 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), - 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), - 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), - - 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), - 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for the backlink symbol. - * - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function hyperlink_arrow() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), - 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ), - 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), - 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), - 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the Custom CSS box. - * - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function custom_css() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), - 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ), - - // phpcs:disable Squiz.PHP.CommentedOutCode.Found - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text",. - // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-2" => ".footnote_tooltip",. - // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-3" => ".footnote_plugin_index",. - // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-4" => ".footnote_plugin_text",. - // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)). - // phpcs:enable - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays transitional legacy Custom CSS box. - * - * @since 2.2.2 - */ - public function custom_css_migration() { - - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), - 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ), - - 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), - 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), - 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), - // Translators: %s: Referres and tooltips. - 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the new Custom CSS box. - * - * @since 2.2.2 - */ - public function custom_css_new() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ), - - 'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function lookup_hooks() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' ); - - // Replace all placeholders. - $l_obj_template->replace( - array( - 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), - // Translators: 1: 99; 2: 1200. - 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), - // Translators: 1: PHP_INT_MAX; 2: 0; 3: -1; 4: 'PHP_INT_MAX'. - 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), - 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), - - 'head-hook' => __( 'WordPress hook function name', 'footnotes' ), - 'head-checkbox' => __( 'Activate', 'footnotes' ), - 'head-numbox' => __( 'Priority level', 'footnotes' ), - 'head-url' => __( 'WordPress documentation', 'footnotes' ), - - 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), - 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), - 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', - - 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), - 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), - 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', - - 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), - 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), - 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', - - 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), - 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), - 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', - - 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), - 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), - 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays a short introduction of the Plugin. - * - * @since 1.5.0 - */ - public function Help() { - global $g_obj_mci_footnotes; - // Load footnotes starting and end tag. - $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - - if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) { - // Load user defined starting and end tag. - $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); - } - $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] . - 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . - 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . - 'labore et dolore magna aliquyam erat, sed diam ' . - 'voluptua. At vero eos et accusam et justo duo dolores ' . - 'et ea rebum. Stet clita kasd gubergren, no sea ' . - 'takimata sanctus est Lorem ipsum dolor sit amet. ' . - 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . - 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . - 'labore et dolore magna aliquyam erat, sed diam ' . - 'voluptua. At vero eos et accusam et justo duo ' . - 'dolores et ea rebum. Stet clita kasd gubergren, no ' . - 'sea takimata sanctus est Lorem ipsum dolor sit amet.' . - $l_arr_footnote_ending_tag['value'] . ' World!'; - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), - 'start' => $l_arr_footnote_starting_tag['value'], - 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), - 'end' => $l_arr_footnote_ending_tag['value'], - 'example-code' => $l_str_example, - 'example-string' => '
                                                                                    ' . __( 'will be displayed as:', 'footnotes' ), - 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), - // Translators: 1: ; 2: . - 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), - ) - ); - // Call wp_head function to get the Styling of the mouse-over box. - $g_obj_mci_footnotes->a_obj_task->wp_head(); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all Donate button to support the developers. - * - * @since 1.5.0 - */ - public function donate() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'caption' => __( 'Donate now', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } -} diff --git a/class/settings.php b/class/settings.php index 7073a0e..2e8acaa 100644 --- a/class/settings.php +++ b/class/settings.php @@ -1,11 +1,13 @@ - array( + "footnotes_storage" => array( - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_STR_FOOTNOTES_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', + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - 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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - // 2.5.4 fast-tracked. - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - 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_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_STR_REFERENCE_CONTAINER_POSITION => 'post_end', + self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', + self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - // Whether to enqueue additional stylesheet. - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - // Top and bottom margins. - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - // Table cell borders. - self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - // Backlink symbol. - self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - // Backlink separators and terminators are often not preferred.. - // But a choice must be provided along with the ability to customize. - 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 => '', + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', - // Set backlinks column width. - self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - // Set backlinks column max. width. - self::C_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', + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', - // Whether a
                                                                                    tag is inserted. - self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // whether a
                                                                                    tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - // Whether to enable URL line wrapping. - self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - // Whether to use link elements. - self::C_STR_LINK_ELEMENT_ENABLED => 'yes', + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', - // Excerpt should be disabled. - self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', - self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', - self::C_STR_FOOTNOTES_LOVE => 'no', + self::C_STR_FOOTNOTES_LOVE => 'no', ), - 'footnotes_storage_custom' => array( + "footnotes_storage_custom" => array( - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - // 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. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - // The truncation length is raised from 150 to 200 chars. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - // 2.5.4 fast-tracked. - 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 => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - // 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. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover. - // The current line of text (web coordinates origin is top left). - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - // The width should be limited to start with, for the box to have shape. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - // Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - // Tooltip display durations. - // Called mouse over box not tooltip for consistency. - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - // Tooltip font size reset to legacy by default since 2.1.4;. - // Was set to inherit since 2.1.1 as it overrode custom CSS,. - // Is moved to settings since 2.1.4 2020-12-04T1023+0100. - self::C_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', + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background. - // By default, due to diverging user preferences. White is neutral. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - 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_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - // The mouse over box corners mustn’t be rounded as that is outdated. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - // Custom CSS migrates to a dedicated tab. - self::C_STR_CUSTOM_CSS => '', + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', ), - 'footnotes_storage_expert' => array( + "footnotes_storage_expert" => array( - // These are checkboxes; keyword 'checked' is converted to Boolean true,. - // Empty string to false (default). + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): - // Titles should all be enabled by default to prevent users from. - // Thinking at first that the feature is broken in post titles.. - // See . - // Yet in titles, footnotes are still buggy, because WordPress. - // Uses the title string in menus and in the title element.. - self::C_STR_EXPERT_LOOKUP_THE_TITLE => '', + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See + // Yet in titles, footnotes are still buggy, because WordPress + // uses the title string in menus and in the title element. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', - self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked', + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', - // And the_excerpt is disabled by default following @nikelaos in. - // . - // . - self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '', + // And the_excerpt is disabled by default following @nikelaos in + // + // + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', - self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', - // 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.. - self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '', + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', - // Initially hard-coded default. - // Shows "9223372036854780000" instead of 9223372036854775807 in the numbox. - // Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty. - // . - // Interpret -1 as PHP_INT_MAX instead. - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // 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.. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), - 'footnotes_storage_custom_css' => array( + "footnotes_storage_custom_css" => array( - self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', ), @@ -1032,123 +1074,130 @@ class MCI_Footnotes_Settings { /** * Contains all Settings from each Settings container as soon as this class is initialized. * + * @author Stefan Herndler * @since 1.5.0 * @var array */ - private $a_arr_settings = array(); + private $a_arr_Settings = array(); /** * Class Constructor. Loads all Settings from each WordPress Settings container. * + * @author Stefan Herndler * @since 1.5.0 */ private function __construct() { - $this->load_all(); + $this->loadAll(); } /** * Returns a singleton of this class. * + * @author Stefan Herndler * @since 1.5.0 * @return MCI_Footnotes_Settings */ public static function instance() { - // No instance defined yet, load it. - if ( ! self::$a_obj_instance ) { - self::$a_obj_instance = new self(); + // no instance defined yet, load it + if (self::$a_obj_Instance === null) { + self::$a_obj_Instance = new self(); } - // Return a singleton of this class. - return self::$a_obj_instance; + // return a singleton of this class + return self::$a_obj_Instance; } /** * Returns the name of a specified Settings Container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Settings Container Array Key Index. + * @param int $p_int_Index Settings Container Array Key Index. * @return str Settings Container name. */ - public function get_container( $p_int_index ) { - return $this->a_arr_container[ $p_int_index ]; + public function getContainer($p_int_Index) { + return $this->a_arr_Container[$p_int_Index]; } /** * Returns the default values of a specific Settings Container. * + * @author Stefan Herndler * @since 1.5.6 - * @param int $p_int_index Settings Container Aray Key Index. + * @param int $p_int_Index Settings Container Aray Key Index. * @return array */ - public function get_defaults( $p_int_index ) { - return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ]; + public function getDefaults($p_int_Index) { + return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; } /** * Loads all Settings from each Settings container. * + * @author Stefan Herndler * @since 1.5.0 */ - 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 ) ); + private function loadAll() { + // clear current settings + $this->a_arr_Settings = array(); + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // load settings + $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); } } /** * Loads all Settings from specified Settings Container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Settings Container Array Key Index. + * @param int $p_int_Index Settings Container Array Key Index. * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). * * @since ditched trimming whitespace from text box content in response to user request. * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 */ - 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 ) ]; + private function Load($p_int_Index) { + // load all settings from container + $l_arr_Options = get_option($this->getContainer($p_int_Index)); + // load all default settings + $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; - // No settings found, set them to their default value. - if ( empty( $l_arr_options ) ) { - return $l_arr_default; + // no settings found, set them to their default value + if (empty($l_arr_Options)) { + return $l_arr_Default; } - // 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; + // 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; } } - // Iterate through each setting in the container. - foreach ( $l_arr_options as $l_str_key => $l_str_value ) { - // Remove all whitespace at the beginning and end of a setting. - // Trimming whitespace is ditched. - // $l_str_value = trim($l_str_value);. - // Write the sanitized value back to the setting container. - $l_arr_options[ $l_str_key ] = $l_str_value; + // iterate through each setting in the container + foreach($l_arr_Options as $l_str_Key => $l_str_Value) { + // remove all whitespace at the beginning and end of a setting + // trimming whitespace is ditched: + //$l_str_Value = trim($l_str_Value); + // write the sanitized value back to the setting container + $l_arr_Options[$l_str_Key] = $l_str_Value; } - // Return settings loaded from Container. - return $l_arr_options; + // return settings loaded from Container + return $l_arr_Options; } /** * Updates a whole Settings container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Index of the Settings container. - * @param array $p_arr_new_values new Settings. + * @param int $p_int_Index Index of the Settings container. + * @param array $p_arr_newValues new Settings. * @return bool */ - 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(); + public function saveOptions($p_int_Index, $p_arr_newValues) { + if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { + $this->loadAll(); return true; } return false; @@ -1157,17 +1206,19 @@ class MCI_Footnotes_Settings { /** * Returns the value of specified Settings name. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_key Settings Array Key name. + * @param string $p_str_Key Settings Array Key name. * @return mixed Value of the Setting on Success or Null in Settings name is invalid. */ - 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; + 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; } /** * Deletes each Settings Container and loads the default values for each Settings Container. * + * @author Stefan Herndler * @since 1.5.0 * * Edit: This didn’t actually work. @@ -1176,28 +1227,27 @@ class MCI_Footnotes_Settings { * done by deleting and reinstalling (see the warning about database backup). * 2020-12-13T1353+0100 */ - 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 ) ); + public function ClearAll() { + // iterate through each Settings Container + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // delete the settings container + delete_option($this->getContainer($i)); } - // Set settings back to the default values. - $this->a_arr_settings = $this->a_arr_default; + // set settings back to the default values + $this->a_arr_Settings = $this->a_arr_Default; } /** * Register all Settings Container for the Plugin Settings Page in the Dashboard. * Settings Container Label will be the same as the Settings Container Name. * + * @author Stefan Herndler * @since 1.5.0 */ - 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 ) ); + public function RegisterSettings() { + // register all settings + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + register_setting($this->getContainer($i), $this->getContainer($i)); } } } diff --git a/class/task.php b/class/task.php index f477614..249636c 100644 --- a/class/task.php +++ b/class/task.php @@ -1,11 +1,14 @@ -get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) ); - $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) ); - $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) ); - $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) ); - $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) ); + // get values from settings: + $l_int_TheTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); + $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); + $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); + $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); + $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); - // PHP_INT_MAX can be set by -1. - $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority; - $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority; - $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority; - $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority; - $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority; + // PHP_INT_MAX can be set by -1: + $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; + $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; + $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; + $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; + $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; - // Append custom css to the header. - add_filter( 'wp_head', array( $this, 'wp_head' ), PHP_INT_MAX ); - // Append the love and share me slug to the footer. - add_filter( 'wp_footer', array( $this, 'wp_footer' ), PHP_INT_MAX ); + // append custom css to the header + add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { - add_filter( 'the_title', array( $this, 'the_title' ), $l_int_the_title_priority ); + // append the love and share me slug to the footer + add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { + add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); } - // Configurable priority level for reference container relative positioning; default 98. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { - add_filter( 'the_content', array( $this, 'the_content' ), $l_int_the_content_priority ); + // configurable priority level for reference container relative positioning; default 98: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { + add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); /** - * Hook for category pages. + * Hook for category pages * * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. * @@ -530,10 +462,10 @@ class MCI_Footnotes_Task { * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ */ - add_filter( 'term_description', array( $this, 'the_content' ), $l_int_the_content_priority ); + add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); /** - * Hook for popup maker popups. + * Hook for popup maker popups * * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @@ -543,21 +475,22 @@ class MCI_Footnotes_Task { * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ */ - add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority ); + add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) { - add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), $l_int_the_excerpt_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { + add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) { - add_filter( 'widget_title', array( $this, 'widget_title' ), $l_int_widget_title_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { + add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) { - add_filter( 'widget_text', array( $this, 'widget_text' ), $l_int_widget_text_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { + add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); } + /** - * The the_post hook. + * The the_post hook * * - Adding: Hooks: support 'the_post' in response to user request for custom post types. * @@ -622,16 +555,18 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges */ - // Reset stored footnotes when displaying the header. - self::$a_arr_footnotes = array(); - self::$a_bool_allow_love_me = true; + // reset stored footnotes when displaying the header + self::$a_arr_Footnotes = array(); + self::$a_bool_AllowLoveMe = true; } /** * Outputs the custom css to the header of the public page. * + * @author Stefan Herndler * @since 1.5.0 * + * * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. * @since 2.1.3 raise settings priority to override theme stylesheets @@ -644,7 +579,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // Insert start tag without switching out of PHP. + // insert start tag without switching out of PHP: echo "\r\n\r\n"; /** @@ -1003,206 +921,184 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified, - * for transparency. It isn’t indented though (the PHP open tag neither). + * The script for alternative tooltips is printed formatted, not minified: */ - if ( self::$a_bool_alternative_tooltips_enabled ) { - - // Start internal script. + if ( self::$a_bool_AlternativeTooltipsEnabled ) { ?> get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $this->reference_container(); - // phpcs:enable + if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { + echo $this->ReferenceContainer(); } - // Get setting for love and share this plugin. - $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); - // Check if the admin allows to add a link to the footer. - if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) { + // get setting for love and share this plugin + $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); + // check if the admin allows to add a link to the footer + if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { return; } - // Set a hyperlink to the word "footnotes" in the Love slug. - $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ); - // Get random love me text. - if ( 'random' === strtolower( $l_str_love_me_index ) ) { - $l_str_love_me_index = 'text-' . wp_rand( 1, 7 ); + // set a hyperlink to the word "footnotes" in the Love slug + $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); + // get random love me text + if (strtolower($l_str_LoveMeIndex) == "random") { + $l_str_LoveMeIndex = "text-" . rand(1,7); } - switch ( $l_str_love_me_index ) { - // Options named wrt backcompat, simplest is default. - case 'text-1': - /* Translators: 2: Link to plugin page 1: Love heart symbol */ - $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); - break; - case 'text-2': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-4': - /* Translators: 1: Link to plugin page 2: Love heart symbol */ - $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); - break; - case 'text-5': - /* Translators: 1: Love heart symbol 2: Link to plugin page */ - $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); - break; - case 'text-6': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-7': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-3': - default: - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); - break; + switch ($l_str_LoveMeIndex) { + // options named wrt backcompat, simplest is default: + case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; + case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; } - echo sprintf( '
                                                                                    %s
                                                                                    ', esc_html( $l_str_love_me_text ) ); + echo sprintf('
                                                                                    %s
                                                                                    ', $l_str_LoveMeText); } /** * Replaces footnotes in the post/page title. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function the_title( $p_str_content ) { - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, false ); + public function the_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); } /** * Replaces footnotes in the content of the current page/post. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Page/Post content. + * @param string $p_str_Content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_content( $p_str_content ) { - // phpcs:disable WordPress.PHP.YodaConditions.NotYoda - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ); - // phpcs:enable + public function the_content($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); } /** * Replaces footnotes in the excerpt of the current page/post. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Page/Post content. + * @param string $p_str_Content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_excerpt( $p_str_content ) { - return $this->exec( $p_str_content, false, ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT ) ) ); + public function the_excerpt($p_str_Content) { + return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); } /** * Replaces footnotes in the widget title. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function widget_title( $p_str_content ) { - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, false ); + public function widget_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); } /** * Replaces footnotes in the content of the current widget. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function widget_text( $p_str_content ) { - // phpcs:disable WordPress.PHP.YodaConditions.NotYoda - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); - // phpcs:enable + public function widget_text($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); } /** * Replaces footnotes in each Content var of the current Post object. * + * @author Stefan Herndler * @since 1.5.4 - * @param array|WP_Post $p_mixed_posts The current Post object. + * @param array|WP_Post $p_mixed_Posts */ - public function the_post( &$p_mixed_posts ) { - // Single WP_Post object received. - if ( ! is_array( $p_mixed_posts ) ) { - $p_mixed_posts = $this->replace_post_object( $p_mixed_posts ); + public function the_post(&$p_mixed_Posts) { + // single WP_Post object received + if (!is_array($p_mixed_Posts)) { + $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); return; } - $num_posts = count( $p_mixed_posts ); - // Array of WP_Post objects received. - for ( $l_int_index = 0; $l_int_index < $num_posts; $l_int_index++ ) { - $p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] ); + // array of WP_Post objects received + for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { + $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); } } /** * Replace all Footnotes in a WP_Post object. * + * @author Stefan Herndler * @since 1.5.6 - * @param WP_Post $p_obj_post The Post object. + * @param WP_Post $p_obj_Post * @return WP_Post */ - private function replace_post_object( $p_obj_post ) { - $p_obj_post->post_content = $this->exec( $p_obj_post->post_content ); - $p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered ); - $p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt ); - return $p_obj_post; + private function replacePostObject($p_obj_Post) { + //MCI_Footnotes_Convert::debug($p_obj_Post); + $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); + $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); + $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); + return $p_obj_Post; } /** * Replaces all footnotes that occur in the given content. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. + * @param string $p_str_Content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. * @return string * + * * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. */ - public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) { + public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { - // Replace all footnotes in the content, settings are converted to html characters. - $p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text ); - // Replace all footnotes in the content, settings are NOT converted to html characters. - $p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text ); + // replace all footnotes in the content, settings are converted to html characters + $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); + // replace all footnotes in the content, settings are NOT converted to html characters + $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); /** - * Reference container customized positioning through shortcode. + * Reference container customized positioning through shortcode * * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @@ -1220,48 +1116,50 @@ class MCI_Footnotes_Task { * * @reporter @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 + * */ - // Append the reference container or insert at shortcode. - $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); - if ( empty( $l_str_reference_container_position_shortcode ) ) { - $l_str_reference_container_position_shortcode = '[[references]]'; + // append the reference container or insert at shortcode: + $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); + if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { + $l_str_ReferenceContainerPositionShortcode = '[[references]]'; } - if ( $p_bool_output_references ) { + if ( $p_bool_OutputReferences ) { - if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) { + if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { - $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content ); + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); } else { - $p_str_content .= $this->reference_container(); + $p_str_Content .= $this->ReferenceContainer(); } - // Increment the container ID. - self::$a_int_reference_container_id++; + // increment the container ID: + self::$a_int_ReferenceContainerId++; } - // Delete position shortcode should any remain. - $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content ); + // delete position shortcode should any remain: + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); - // Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. - if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) { - self::$a_bool_allow_love_me = false; - $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content ); + // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found + if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { + self::$a_bool_AllowLoveMe = false; + $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); } - // Return the content with replaced footnotes and optional reference container appended. - return $p_str_content; + // return the content with replaced footnotes and optional reference container appended: + return $p_str_Content; } /** * Replaces all footnotes in the given content and appends them to the static property. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Content to be searched for footnotes. - * @param bool $p_bool_convert_html_chars html encode settings, default true. - * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. + * @param string $p_str_Content Content to be searched for footnotes. + * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. * @return string * * @since 2.0.0 various. @@ -1270,37 +1168,37 @@ class MCI_Footnotes_Task { * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. */ - public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) { + public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { - // Post ID to make everything unique wrt infinite scroll and archive view. - self::$a_int_post_id = get_the_id(); + // post ID to make everything unique wrt infinite scroll and archive view + self::$a_int_PostId = get_the_id(); - // Contains the index for the next footnote on this page. - $l_int_footnote_index = count( self::$a_arr_footnotes ) + 1; + // contains the index for the next footnote on this page + $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; - // Contains the starting position for the lookup of a footnote. - $l_int_pos_start = 0; + // contains the starting position for the lookup of a footnote + $l_int_PosStart = 0; - // Get start and end tag for the footnotes short code. - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); } - // Decode html special chars. - if ( $p_bool_convert_html_chars ) { - $l_str_starting_tag = htmlspecialchars( $l_str_starting_tag ); - $l_str_ending_tag = htmlspecialchars( $l_str_ending_tag ); + // decode html special chars + if ($p_bool_ConvertHtmlChars) { + $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); + $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); } - // If footnotes short code is empty, return the content without changes. - if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) { - return $p_str_content; + // if footnotes short code is empty, return the content without changes + if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { + return $p_str_Content; } /** - * Footnote delimiter syntax validation. + * Footnote delimiter syntax validation * * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * @@ -1321,74 +1219,74 @@ class MCI_Footnotes_Task { * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { - // Make shortcodes conform to regex syntax. - $l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag ); - $l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag ); + // make shortcodes conform to regex syntax: + $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); + $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); - // Apply different regex depending on whether start shortcode is double/triple opening parenthesis. - if ( '((' === $l_str_starting_tag || '(((' === $l_str_starting_tag ) { + // apply different regex depending on whether start shortcode is double/triple opening parenthesis: + if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { - // This prevents from catching a script containing e.g. a double opening parenthesis. - $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ')[^\{\}])*?)(' . $l_str_start_tag_regex . '|$)#s'; + // this prevents from catching a script containing e.g. a double opening parenthesis: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; } else { - // Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. - $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ').)*?)(' . $l_str_start_tag_regex . '|$)#s'; + // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; } - // Check syntax and get error locations. - preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location ); - if ( empty( $p_arr_error_location ) ) { - self::$a_bool_syntax_error_flag = false; + // check syntax and get error locations: + preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); + if ( empty( $p_arr_ErrorLocation ) ) { + self::$a_bool_SyntaxErrorFlag = false; } - // Prevent generating and inserting the warning multiple times. - if ( self::$a_bool_syntax_error_flag ) { + // prevent generating and inserting the warning multiple times: + if ( self::$a_bool_SyntaxErrorFlag ) { - // Get plain text string for error location. - $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] ); + // get plain text string for error location: + $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); - // Limit string length to 300 characters. - if ( strlen( $l_str_error_spot_string ) > 300 ) { - $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…'; + // limit string length to 300 characters: + if ( strlen( $l_str_ErrorSpotString ) > 300 ) { + $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; } - // Compose warning box. - $l_str_syntax_error_warning = '

                                                                                    '; - $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); - $l_str_syntax_error_warning .= '

                                                                                    '; + // compose warning box: + $l_str_SyntaxErrorWarning = '

                                                                                    '; + $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                    '; - // Syntax validation setting in the dashboard under the General settings tab. - /* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */ - $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); + // syntax validation setting in the dashboard under the General settings tab: + $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); - $l_str_syntax_error_warning .= '

                                                                                    '; - $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); - $l_str_syntax_error_warning .= '

                                                                                    “'; - $l_str_syntax_error_warning .= $l_str_error_spot_string; - $l_str_syntax_error_warning .= '”

                                                                                    '; + $l_str_SyntaxErrorWarning .= '

                                                                                    '; + $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                    “'; + $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; + $l_str_SyntaxErrorWarning .= '”

                                                                                    '; - // Prepend the warning box to the content. - $p_str_content = $l_str_syntax_error_warning . $p_str_content; + // prepend the warning box to the content: + $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; - // Checked, set flag to false to prevent duplicate warning. - self::$a_bool_syntax_error_flag = false; + // checked, set flag to false to prevent duplicate warning: + self::$a_bool_SyntaxErrorFlag = false; - return $p_str_content; + return $p_str_Content; } } - // Load referrer templates if footnotes text not hidden. - if ( ! $p_bool_hide_footnotes_text ) { - // Load footnote referrer template file. - if ( self::$a_bool_alternative_tooltips_enabled ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' ); + // load referrer templates if footnotes text not hidden: + if (!$p_bool_HideFootnotesText) { + + // load footnote referrer template file: + if (self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); } else { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' ); + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); } /** @@ -1397,57 +1295,56 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. * * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority) + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) */ - self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); - // Load tooltip inline script if jQuery tooltips are enabled. - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { - $l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' ); + // load tooltip inline script if jQuery tooltips are enabled: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); } + } else { - $l_obj_template = null; - $l_obj_template_tooltip = null; + $l_obj_Template = null; + $l_obj_TemplateTooltip = null; } - // Search footnotes short codes in the content. + // search footnotes short codes in the content do { - // Get first occurrence of the footnote start tag short code. - $i_int_len_content = strlen( $p_str_content ); - if ( $l_int_pos_start > $i_int_len_content ) { - $l_int_pos_start = $i_int_len_content; - } - $l_int_pos_start = strpos( $p_str_content, $l_str_starting_tag, $l_int_pos_start ); - // No short code found, stop here. - if ( ! $l_int_pos_start ) { + // get first occurrence of the footnote start tag short code: + $i_int_LenContent = strlen($p_str_Content); + if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; + $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosStart === false) { break; } - // Get first occurrence of the footnote end tag short code. - $l_int_pos_end = strpos( $p_str_content, $l_str_ending_tag, $l_int_pos_start ); - // No short code found, stop here. - if ( ! $l_int_pos_end ) { + // get first occurrence of the footnote end tag short code: + $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosEnd === false) { break; } - // Calculate the length of the footnote. - $l_int_length = $l_int_pos_end - $l_int_pos_start; + // calculate the length of the footnote + $l_int_Length = $l_int_PosEnd - $l_int_PosStart; - // Get footnote text. - $l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) ); + // get footnote text + $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); - // Get tooltip text if present. - self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ); - self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode ); - $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); - $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; - if ( $l_bool_has_tooltip_text ) { - $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); + // get tooltip text if present: + self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); + self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); } else { - $l_str_tooltip_text = ''; + $l_str_TooltipText = ''; } /** - * URL line wrapping for Unicode non conformant browsers. + * URL line wrapping for Unicode non conformant browsers * * @since 2.1.1 (CSS) * @since 2.1.4 (PHP) @@ -1540,6 +1437,7 @@ class MCI_Footnotes_Task { * @reporter @bernardzit * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * + * * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * @date 2020-12-23T1107+0100 * @@ -1580,48 +1478,48 @@ class MCI_Footnotes_Task { * Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces. * But given they can occur on WP-powered websites, some page builders may probably not. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - $l_str_footnote_text = preg_replace( + $l_str_FootnoteText = preg_replace( '#(?$1', - $l_str_footnote_text + $l_str_FootnoteText ); } - // Text to be displayed instead of the footnote. - $l_str_footnote_replace_text = ''; + // Text to be displayed instead of the footnote + $l_str_FootnoteReplaceText = ""; - // Whether hard links are enabled. - if ( self::$a_bool_hard_links_enable ) { + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { - // Get the configurable parts. - self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ); - self::$a_str_footnote_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ); - self::$a_str_link_ids_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ); + // get the configurable parts: + self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); + self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); + self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); - // Streamline ID concatenation. - self::$a_str_post_container_id_compound = self::$a_str_link_ids_separator; - self::$a_str_post_container_id_compound .= self::$a_int_post_id; - self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; - self::$a_str_post_container_id_compound .= self::$a_int_reference_container_id; - self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; + // streamline ID concatenation: + self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; } - // Display the footnote referrers and the tooltips. - if ( ! $p_bool_hide_footnotes_text ) { - $l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // display the footnote referrers and the tooltips: + if (!$p_bool_HideFootnotesText) { + $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - // Display only a truncated footnote text if option enabled. - $l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) ); - $l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) ); + // display only a truncated footnote text if option enabled: + $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); + $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); - // Define excerpt text as footnote text by default. - $l_str_excerpt_text = $l_str_footnote_text; + // define excerpt text as footnote text by default: + $l_str_ExcerptText = $l_str_FootnoteText; /** - * Tooltip truncation. + * Tooltip truncation * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1636,34 +1534,34 @@ class MCI_Footnotes_Task { * This is equivalent to the WordPress default excerpt generation, i.e. without a * custom excerpt and without a delimiter. But WordPress does word count, usually 55. */ - if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) { - $l_str_dummy_text = wp_strip_all_tags( $l_str_footnote_text ); - if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) { - $l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length ); - $l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) ); - $l_str_excerpt_text .= ' … <'; - $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span'; - $l_str_excerpt_text .= ' class="footnote_tooltip_continue" '; - $l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id; - $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; - $l_str_excerpt_text .= '(\'footnote_plugin_reference_' . self::$a_int_post_id; - $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; - $l_str_excerpt_text .= "_$l_int_index');\""; + if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { + $l_str_DummyText = strip_tags($l_str_FootnoteText); + if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { + $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); + $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); + $l_str_ExcerptText .= ' … <'; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; + $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; + $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= "_$l_int_Index');\""; - // If enabled, add the hard link fragment ID. - if ( self::$a_bool_hard_links_enable ) { + // if enabled, add the hard link fragment ID: + if (self::$a_bool_HardLinksEnable) { - $l_str_excerpt_text .= ' href="#'; - $l_str_excerpt_text .= self::$a_str_footnote_link_slug; - $l_str_excerpt_text .= self::$a_str_post_container_id_compound; - $l_str_excerpt_text .= $l_int_index; - $l_str_excerpt_text .= '"'; + $l_str_ExcerptText .= ' href="#'; + $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; + $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; + $l_str_ExcerptText .= $l_int_Index; + $l_str_ExcerptText .= '"'; } - $l_str_excerpt_text .= '>'; + $l_str_ExcerptText .= '>'; /** - * Configurable read-on button label. + * Configurable read-on button label * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1673,56 +1571,55 @@ class MCI_Footnotes_Task { * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ */ - $l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); + $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); - $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '' : ''; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; } } /** - * Referrers element superscript or baseline. + * Referrers element superscript or baseline * * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report - * * @since 2.1.1 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * - * define the HTML element to use for the referrers. + * define the HTML element to use for the referrers: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { - $l_str_sup_span = 'sup'; + $l_str_SupSpan = 'sup'; } else { - $l_str_sup_span = 'span'; + $l_str_SupSpan = 'span'; } - // Whether hard links are enabled. - if ( self::$a_bool_hard_links_enable ) { + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { - self::$a_str_link_span = 'a'; - self::$a_str_link_close_tag = ''; - // Self::$a_str_link_open_tag will be defined as needed. + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkCloseTag = ''; + // self::$a_str_LinkOpenTag will be defined as needed - // Compose hyperlink address (leading space is in template). - $l_str_footnote_link_argument = 'href="#'; - $l_str_footnote_link_argument .= self::$a_str_footnote_link_slug; - $l_str_footnote_link_argument .= self::$a_str_post_container_id_compound; - $l_str_footnote_link_argument .= $l_int_index; - $l_str_footnote_link_argument .= '" class="footnote_hard_link"'; + // compose hyperlink address (leading space is in template): + $l_str_FootnoteLinkArgument = 'href="#'; + $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; + $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteLinkArgument .= $l_int_Index; + $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_referrer_anchor_element = ''; + $l_str_ReferrerAnchorElement = ''; } else { @@ -1739,101 +1636,101 @@ class MCI_Footnotes_Task { * * If no hyperlink nor offset anchor is needed, initialize as empty. */ - $l_str_footnote_link_argument = ''; - $l_str_referrer_anchor_element = ''; + $l_str_FootnoteLinkArgument = ''; + $l_str_ReferrerAnchorElement = ''; - // The link element is set independently as it may be needed for styling. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED ) ) ) { + // The link element is set independently as it may be needed for styling: + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { - self::$a_str_link_span = 'a'; - self::$a_str_link_open_tag = ''; - self::$a_str_link_close_tag = ''; + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkOpenTag = ''; + self::$a_str_LinkCloseTag = ''; } } - // Determine tooltip content. - if ( self::$a_bool_tooltips_enabled ) { - $l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text; + // determine tooltip content: + if ( self::$a_bool_TooltipsEnabled ) { + $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; } else { - $l_str_tooltip_content = ''; + $l_str_TooltipContent = ''; } - + /** * Determine shrink width if alternative tooltips are enabled. - * + * * @since 2.5.6 */ - $l_str_tooltip_style = ''; - if ( self::$a_bool_alternative_tooltips_enabled && self::$a_bool_tooltips_enabled ) { - $l_int_tooltip_length = strlen( wp_strip_all_tags( $l_str_tooltip_content ) ); - if ( $l_int_tooltip_length < 70 ) { - $l_str_tooltip_style = ' style="width: '; - $l_str_tooltip_style .= ( $l_int_tooltip_length * .7 ); - $l_str_tooltip_style .= 'em;"'; + $l_str_TooltipStyle = ''; + if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { + $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); + if ( $l_int_TooltipLength < 70 ) { + $l_str_TooltipStyle = ' style="width: '; + $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); + $l_str_TooltipStyle .= 'em;"'; } } - // Fill in 'templates/public/footnote.html'. - $l_obj_template->replace( + // fill in 'templates/public/footnote.html': + $l_obj_Template->replace( array( - 'link-span' => self::$a_str_link_span, - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => $l_int_index, - 'hard-link' => $l_str_footnote_link_argument, - 'sup-span' => $l_str_sup_span, - 'before' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), - 'index' => $l_int_index, - 'after' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), - 'anchor-element' => $l_str_referrer_anchor_element, - 'style' => $l_str_tooltip_style, - 'text' => $l_str_tooltip_content, + "link-span" => self::$a_str_LinkSpan, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "hard-link" => $l_str_FootnoteLinkArgument, + "sup-span" => $l_str_SupSpan, + "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + "index" => $l_int_Index, + "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + "anchor-element" => $l_str_ReferrerAnchorElement, + "style" => $l_str_TooltipStyle, + "text" => $l_str_TooltipContent, ) ); - $l_str_footnote_replace_text = $l_obj_template->get_content(); + $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); - // Reset the template. - $l_obj_template->reload(); + // reset the template + $l_obj_Template->reload(); - // If standard tooltips are enabled but alternative are not. - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + // if standard tooltips are enabled but alternative are not: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) ); - $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) ); - $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); - $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); - $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); - $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); + $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); + $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); + $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); + $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); + $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); + $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); - // Fill in 'templates/public/tooltip.html'. - $l_obj_template_tooltip->replace( + // fill in 'templates/public/tooltip.html': + $l_obj_TemplateTooltip->replace( array( - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => $l_int_index, - 'position' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION ), - 'offset-y' => ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0, - 'offset-x' => ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0, - 'fade-in-delay' => ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : 0, - 'fade-in-duration' => ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : 0, - 'fade-out-delay' => ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : 0, - 'fade-out-duration' => ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : 0, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), + "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, + "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, + "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, + "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, + "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, + "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, ) ); - $l_str_footnote_replace_text .= $l_obj_template_tooltip->get_content(); - $l_obj_template_tooltip->reload(); + $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + $l_obj_TemplateTooltip->reload(); } } - // Replace the footnote with the template. - $p_str_content = substr_replace( $p_str_content, $l_str_footnote_replace_text, $l_int_pos_start, $l_int_length + strlen( $l_str_ending_tag ) ); + // replace the footnote with the template + $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); - // Add footnote only if not empty. - if ( ! empty( $l_str_footnote_text ) ) { - // Set footnote to the output box at the end. - self::$a_arr_footnotes[] = $l_str_footnote_text; - // Increase footnote index. - $l_int_footnote_index++; + // add footnote only if not empty + if (!empty($l_str_FootnoteText)) { + // set footnote to the output box at the end + self::$a_arr_Footnotes[] = $l_str_FootnoteText; + // increase footnote index + $l_int_FootnoteIndex++; } /** @@ -1868,18 +1765,19 @@ class MCI_Footnotes_Task { * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. */ - // Add offset to the new starting position. - $l_int_pos_start += $l_int_length + strlen( $l_str_ending_tag ); + // add offset to the new starting position + $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); - } while ( true ); + } while (true); - // Return content. - return $p_str_content; + // return content + return $p_str_Content; } /** * Generates the reference container. * + * @author Stefan Herndler * @since 1.5.0 * @return string * @@ -1890,15 +1788,16 @@ class MCI_Footnotes_Task { * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. */ - public function reference_container() { + public function ReferenceContainer() { - // No footnotes have been replaced on this page. - if ( empty( self::$a_arr_footnotes ) ) { - return ''; + // no footnotes have been replaced on this page: + if (empty(self::$a_arr_Footnotes)) { + return ""; } + /** - * Footnote index backlink symbol. + * Footnote index backlink symbol * * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. * @@ -1907,36 +1806,37 @@ class MCI_Footnotes_Task { * @reporter @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * - * If the backlink symbol is enabled. + * If the backlink symbol is enabled: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { - // Get html arrow. - $l_str_arrow = MCI_Footnotes_Convert::get_arrow( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW ) ); - // Set html arrow to the first one if invalid index defined. - if ( is_array( $l_str_arrow ) ) { - $l_str_arrow = MCI_Footnotes_Convert::get_arrow( 0 ); + // get html arrow + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); + // set html arrow to the first one if invalid index defined + if (is_array($l_str_Arrow)) { + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); } - // Get user defined arrow. - $l_str_arrow_user_defined = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ); - if ( ! empty( $l_str_arrow_user_defined ) ) { - $l_str_arrow = $l_str_arrow_user_defined; + // get user defined arrow + $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); + if (!empty($l_str_ArrowUserDefined)) { + $l_str_Arrow = $l_str_ArrowUserDefined; } - // Wrap the arrow in a @media print { display:hidden } span. - $l_str_footnote_arrow = ''; - $l_str_footnote_arrow .= $l_str_arrow . ''; + // wrap the arrow in a @media print { display:hidden } span: + $l_str_FootnoteArrow = ''; + $l_str_FootnoteArrow .= $l_str_Arrow . ''; } else { - // If the backlink symbol isn’t enabled, set it to empty. - $l_str_arrow = ''; - $l_str_footnote_arrow = ''; + // If the backlink symbol isn’t enabled, set it to empty: + $l_str_Arrow = ''; + $l_str_FootnoteArrow = ''; } + /** - * Backlink separator. + * Backlink separator * * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. * @@ -1952,69 +1852,59 @@ class MCI_Footnotes_Task { * Initially a comma was appended in this algorithm for enumerations. * The comma in enumerations is not generally preferred. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { - // Check if it is input-configured. - $l_str_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ); + // check if it is input-configured: + $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); - if ( empty( $l_str_separator ) ) { + if (empty($l_str_Separator)) { - // If it is not, check which option is on. - $l_str_separator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); - switch ( $l_str_separator_option ) { - case 'comma': - $l_str_separator = ','; - break; - case 'semicolon': - $l_str_separator = ';'; - break; - case 'en_dash': - $l_str_separator = ' –'; - break; + // if it is not, check which option is on: + $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); + switch ($l_str_SeparatorOption) { + case 'comma' : $l_str_Separator = ','; break; + case 'semicolon': $l_str_Separator = ';'; break; + case 'en_dash' : $l_str_Separator = ' –'; break; } } + } else { - $l_str_separator = ''; + $l_str_Separator = ''; } /** - * Backlink terminator. + * Backlink terminator * * Initially a dot was appended in the table row template. - * * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable. + * @since 2.1.4 the terminator is optional, has options, and is configurable: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { - // Check if it is input-configured. - $l_str_terminator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ); + // check if it is input-configured: + $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); - if ( empty( $l_str_terminator ) ) { + if (empty($l_str_Terminator)) { - // If it is not, check which option is on. - $l_str_terminator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); - switch ( $l_str_terminator_option ) { - case 'period': - $l_str_terminator = '.'; - break; - case 'parenthesis': - $l_str_terminator = ')'; - break; - case 'colon': - $l_str_terminator = ':'; - break; + // if it is not, check which option is on: + $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); + switch ($l_str_TerminatorOption) { + case 'period' : $l_str_Terminator = '.'; break; + case 'parenthesis': $l_str_Terminator = ')'; break; + case 'colon' : $l_str_Terminator = ':'; break; } } + } else { - $l_str_terminator = ''; + $l_str_Terminator = ''; } + /** - * Line breaks. + * Line breaks * * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * @@ -2026,19 +1916,18 @@ class MCI_Footnotes_Task { * Variable number length and proportional character width require explicit line breaks. * Otherwise, an ordinary space character offering a line break opportunity is inserted. */ - $l_str_line_break = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED ) ) ? '
                                                                                    ' : ' '; + $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                    ' : ' '; /** - * Line breaks for source readability. - * * For maintenance and support, table rows in the reference container should be * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below). + * Before the first table row (breaks between rows are ~200 lines below): */ - $l_str_body = "\r\n\r\n"; + $l_str_Body = "\r\n\r\n"; + /** - * Reference container table row template load. + * Reference container table row template load * * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * @@ -2046,34 +1935,34 @@ class MCI_Footnotes_Task { * @date 2020-11-16T2024+0100 */ - // When combining identical footnotes is turned on, another template is needed. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { - // The combining template allows for backlink clusters and supports cell clicking for single notes. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' ); + // when combining identical footnotes is turned on, another template is needed: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + // the combining template allows for backlink clusters and supports cell clicking for single notes: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); } else { - // When 3-column layout is turned on (only available if combining is turned off). - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' ); + // when 3-column layout is turned on (only available if combining is turned off): + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); } else { - // When switch symbol and index is turned on, and combining and 3-columns are off. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' ); + // when switch symbol and index is turned on, and combining and 3-columns are off: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); } else { - // Default is the standard template. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' ); + // default is the standard template: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); } } } /** - * Switch backlink symbol and footnote number. + * Switch backlink symbol and footnote number * * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * @@ -2089,37 +1978,36 @@ class MCI_Footnotes_Task { * @since 2.1.4 * @date 2020-11-26T1633+0100 */ - $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); + $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); - // Loop through all footnotes found in the page. - $num_footnotes = count( self::$a_arr_footnotes ); - for ( $l_int_index = 0; $l_int_index < $num_footnotes; $l_int_index++ ) { + // loop through all footnotes found in the page + for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { - // Get footnote text. - $l_str_footnote_text = self::$a_arr_footnotes[ $l_int_index ]; + // get footnote text + $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; - // If footnote is empty, go to the next one;. - // With combine identicals turned on, identicals will be deleted and are skipped. - if ( empty( $l_str_footnote_text ) ) { + // if footnote is empty, go to the next one; + // With combine identicals turned on, identicals will be deleted and are skipped: + if (empty($l_str_FootnoteText)) { continue; } - // Generate content of footnote index cell. - $l_int_first_footnote_index = ( $l_int_index + 1 ); + // generate content of footnote index cell + $l_int_FirstFootnoteIndex = ($l_int_Index + 1); - // Get the footnote index string and. - // Keep supporting legacy index placeholder. - $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // get the footnote index string and + // keep supporting legacy index placeholder: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); /** - * Case of only one backlink per table row. + * Case of only one backlink per table row * - * If enabled, and for the case the footnote is single, compose hard link. + * If enabled, and for the case the footnote is single, compose hard link: */ - // Define anyway. - $l_str_hard_link_address = ''; + // define anyway: + $l_str_HardLinkAddress = ''; - if ( self::$a_bool_hard_links_enable ) { + if (self::$a_bool_HardLinksEnable) { /** * Use-Backbutton-Hint tooltip, optional and configurable. @@ -2135,42 +2023,43 @@ class MCI_Footnotes_Task { * 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 */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_use_backbutton_hint = ' title="'; - $l_str_use_backbutton_hint .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ); - $l_str_use_backbutton_hint .= '"'; + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_UseBackbuttonHint = ' title="'; + $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); + $l_str_UseBackbuttonHint .= '"'; } else { - $l_str_use_backbutton_hint = ''; + $l_str_UseBackbuttonHint = ''; } /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_footnote_anchor_element = ''; + $l_str_FootnoteAnchorElement = ''; - // Compose optional hard link address. - $l_str_hard_link_address = ' href="#'; - $l_str_hard_link_address .= self::$a_str_referrer_link_slug; - $l_str_hard_link_address .= self::$a_str_post_container_id_compound; - $l_str_hard_link_address .= $l_str_footnote_id . '"'; - $l_str_hard_link_address .= $l_str_use_backbutton_hint; + // compose optional hard link address: + $l_str_HardLinkAddress = ' href="#'; + $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; + $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; + $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; + $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; - // Compose optional opening link tag with optional hard link, mandatory for instance. - self::$a_str_link_open_tag = 'get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // ID, optional hard link address, and class. - $l_str_footnote_reference = '<' . self::$a_str_link_span; - $l_str_footnote_reference .= ' id="footnote_plugin_reference_'; - $l_str_footnote_reference .= self::$a_int_post_id; - $l_str_footnote_reference .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_reference .= "_$l_str_footnote_id\""; - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_reference .= ' href="#'; - $l_str_footnote_reference .= self::$a_str_referrer_link_slug; - $l_str_footnote_reference .= self::$a_str_post_container_id_compound; - $l_str_footnote_reference .= $l_str_footnote_id . '"'; - $l_str_footnote_reference .= $l_str_use_backbutton_hint; + // ID, optional hard link address, and class: + $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; + $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteReference .= self::$a_int_PostId; + $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= ' href="#'; + $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; + $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; } - $l_str_footnote_reference .= ' class="footnote_backlink"'; + $l_str_FootnoteReference .= ' class="footnote_backlink"'; - // The click event goes in the table cell if footnote remains single. - $l_str_backlink_event = ' onclick="footnote_move_to_anchor_'; - $l_str_backlink_event .= self::$a_int_post_id; - $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; - $l_str_backlink_event .= "('footnote_plugin_tooltip_"; - $l_str_backlink_event .= self::$a_int_post_id; - $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; - $l_str_backlink_event .= "_$l_str_footnote_id');\""; + // the click event goes in the table cell if footnote remains single: + $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; - // The dedicated template enumerating backlinks uses another variable. - $l_str_footnote_backlinks = $l_str_footnote_reference; - // Append the click event right to the backlink item for enumerations;. - // Else it goes in the table cell. - $l_str_footnote_backlinks .= $l_str_backlink_event . '>'; - $l_str_footnote_reference .= '>'; + // the dedicated template enumerating backlinks uses another variable: + $l_str_FootnoteBacklinks = $l_str_FootnoteReference; - // Append the optional offset anchor for hard links. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_reference .= $l_str_footnote_anchor_element; - $l_str_footnote_backlinks .= $l_str_footnote_anchor_element; + // append the click event right to the backlink item for enumerations; + // else it goes in the table cell: + $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; + $l_str_FootnoteReference .= '>'; + + // append the optional offset anchor for hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; + $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; } - // Continue both single note and notes cluster, depending on switch option status. - if ( $l_bool_symbol_switch ) { + // continue both single note and notes cluster, depending on switch option status: + if ($l_bool_SymbolSwitch) { - $l_str_footnote_reference .= "$l_str_footnote_id$l_str_footnote_arrow"; - $l_str_footnote_backlinks .= "$l_str_footnote_id$l_str_footnote_arrow"; + $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; } else { - $l_str_footnote_reference .= "$l_str_footnote_arrow$l_str_footnote_id"; - $l_str_footnote_backlinks .= "$l_str_footnote_arrow$l_str_footnote_id"; + $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; } - // If that is the only footnote with this text, we’re almost done.. + // If that is the only footnote with this text, we’re almost done. - // Check if it isn't the last footnote in the array. - if ( $l_int_first_footnote_index < count( self::$a_arr_footnotes ) ) { + // check if it isn't the last footnote in the array: + if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { - // Get all footnotes that haven't passed yet. - $num_footnotes = count( self::$a_arr_footnotes ); - for ( $l_int_check_index = $l_int_first_footnote_index; $l_int_check_index < $num_footnotes; $l_int_check_index++ ) { + // get all footnotes that haven't passed yet: + for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { - // Check if a further footnote is the same as the actual one. - if ( self::$a_arr_footnotes[ $l_int_check_index ] === $l_str_footnote_text ) { + // check if a further footnote is the same as the actual one: + if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { - // If so, set the further footnote as empty so it won't be displayed later. - self::$a_arr_footnotes[ $l_int_check_index ] = ''; + // if so, set the further footnote as empty so it won't be displayed later: + self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; - // Set the flag to true for the combined status. - $l_bool_flag_combined = true; + // set the flag to true for the combined status: + $l_bool_FlagCombined = true; - // Update the footnote ID. - $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // update the footnote ID: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - // Resume composing the backlinks enumeration. - $l_str_footnote_backlinks .= "$l_str_separator'; - $l_str_footnote_backlinks .= $l_str_line_break; - $l_str_footnote_backlinks .= '<' . self::$a_str_link_span; - $l_str_footnote_backlinks .= ' id="footnote_plugin_reference_'; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "_$l_str_footnote_id\""; + // resume composing the backlinks enumeration: + $l_str_FootnoteBacklinks .= "$l_str_Separator'; + $l_str_FootnoteBacklinks .= $l_str_LineBreak; + $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; + $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; - // Insert the optional hard link address. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_backlinks .= ' href="#'; - $l_str_footnote_backlinks .= self::$a_str_referrer_link_slug; - $l_str_footnote_backlinks .= self::$a_str_post_container_id_compound; - $l_str_footnote_backlinks .= $l_str_footnote_id . '"'; - $l_str_footnote_backlinks .= $l_str_use_backbutton_hint; + // insert the optional hard link address: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ' href="#'; + $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; + $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; } - $l_str_footnote_backlinks .= ' class="footnote_backlink"'; - $l_str_footnote_backlinks .= ' onclick="footnote_move_to_anchor_'; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "('footnote_plugin_tooltip_"; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "_$l_str_footnote_id');\">"; + $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; + $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; - // Append the offset anchor for optional hard links. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_backlinks .= ''; + // append the offset anchor for optional hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ''; } - $l_str_footnote_backlinks .= $l_bool_symbol_switch ? '' : $l_str_footnote_arrow; - $l_str_footnote_backlinks .= $l_str_footnote_id; - $l_str_footnote_backlinks .= $l_bool_symbol_switch ? $l_str_footnote_arrow : ''; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; } } } - // Append terminator and end tag. - $l_str_footnote_reference .= $l_str_terminator . ''; - $l_str_footnote_backlinks .= $l_str_terminator . ''; + // append terminator and end tag: + $l_str_FootnoteReference .= $l_str_Terminator . ''; + $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; } - // Line wrapping of URLs already fixed, see above. + // line wrapping of URLs already fixed, see above - // Get reference container item text if tooltip text goes separate. - $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); - $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; - if ( $l_bool_has_tooltip_text ) { - $l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) ); - self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_mirror_tooltip_text ) { - $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); - $l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ); - $l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text; + // get reference container item text if tooltip text goes separate: + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); + self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_MirrorTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); + $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; } else { - $l_str_reference_text = $l_str_not_tooltip_text; + $l_str_ReferenceText = $l_str_NotTooltipText; } } else { - $l_str_reference_text = $l_str_footnote_text; + $l_str_ReferenceText = $l_str_FootnoteText; } - // Replace all placeholders in table row template. - $l_obj_template->replace( + // replace all placeholders in table row template: + $l_obj_Template->replace( array( - // Placeholder used in all templates. - 'text' => $l_str_reference_text, + // placeholder used in all templates: + "text" => $l_str_ReferenceText, - // Used in standard layout W/O COMBINED FOOTNOTES. - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ), - 'link-start' => self::$a_str_link_open_tag, - 'link-end' => self::$a_str_link_close_tag, - 'link-span' => self::$a_str_link_span, - 'terminator' => $l_str_terminator, - 'anchor-element' => $l_str_footnote_anchor_element, - 'hard-link' => $l_str_hard_link_address, + // used in standard layout W/O COMBINED FOOTNOTES: + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "link-start" => self::$a_str_LinkOpenTag, + "link-end" => self::$a_str_LinkCloseTag, + "link-span" => self::$a_str_LinkSpan, + "terminator" => $l_str_Terminator, + "anchor-element" => $l_str_FootnoteAnchorElement, + "hard-link" => $l_str_HardLinkAddress, - // Used in standard layout WITH COMBINED IDENTICALS TURNED ON. - 'pointer' => $l_bool_flag_combined ? '' : ' pointer', - 'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event, - 'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference, + // used in standard layout WITH COMBINED IDENTICALS TURNED ON: + "pointer" => $l_bool_FlagCombined ? '' : ' pointer', + "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, + "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, - // Legacy placeholders for use in legacy layout templates. - 'arrow' => $l_str_footnote_arrow, - 'index' => $l_str_footnote_id, + // Legacy placeholders for use in legacy layout templates: + "arrow" => $l_str_FootnoteArrow, + "index" => $l_str_FootnoteId, ) ); - $l_str_body .= $l_obj_template->get_content(); + $l_str_Body .= $l_obj_Template->getContent(); - // Extra line breaks for page source readability. - $l_str_body .= "\r\n\r\n"; + // extra line breaks for page source readability: + $l_str_Body .= "\r\n\r\n"; - $l_obj_template->reload(); + $l_obj_Template->reload(); } - // Call again for robustness when priority levels don’t match any longer. - self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); + // call again for robustness when priority levels don’t match any longer: + self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); - // Streamline. - $l_bool_collapse_default = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE ) ); + // streamline: + $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); /** - * Reference container label. + * Reference container label * * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. * @@ -2394,7 +2283,7 @@ class MCI_Footnotes_Task { * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. */ - $l_str_reference_container_label = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ); + $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); /** * Select the reference container template according to the script mode. @@ -2405,40 +2294,40 @@ class MCI_Footnotes_Task { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * @reporter @pkverma99 * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 */ - $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); - - if ( 'jquery' === $l_str_script_mode ) { - - // Load 'templates/public/reference-container.html'. - $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container' ); + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + + if ( $l_str_ScriptMode == 'jquery' ) { + // load 'templates/public/reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); + } else { - - // Load 'templates/public/js-reference-container.html'. - $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'js-reference-container' ); + + // load 'templates/public/js-reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); } - - $l_obj_template_container->replace( + + $l_obj_TemplateContainer->replace( array( - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'element' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ), - 'name' => empty( $l_str_reference_container_label ) ? ' ' : $l_str_reference_container_label, - 'button-style' => ! $l_bool_collapse_default ? 'display: none;' : '', - 'style' => $l_bool_collapse_default ? 'display: none;' : '', - 'content' => $l_str_body, - 'scroll-offset' => ( self::$a_int_scroll_offset / 100 ), - 'scroll-duration' => intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) ), + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), + "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, + "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', + "style" => $l_bool_CollapseDefault ? 'display: none;' : '', + "content" => $l_str_Body, + "scroll-offset" => (self::$a_int_ScrollOffset / 100), + "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), ) ); - // Free all found footnotes if reference container will be displayed. - self::$a_arr_footnotes = array(); + // free all found footnotes if reference container will be displayed + self::$a_arr_Footnotes = array(); - return $l_obj_template_container->get_content(); + return $l_obj_TemplateContainer->getContent(); } } diff --git a/class/template.php b/class/template.php index 236734c..2c0b8d4 100644 --- a/class/template.php +++ b/class/template.php @@ -1,20 +1,39 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); /** - * Modularize functions. + * Modularize functions * * @since 2.4.0d3 + * + * @author Patrizia Lutz @misfist */ - $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ); - if ( $template ) { + if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { $this->process_template( $template ); } else { return; @@ -106,125 +133,124 @@ class MCI_Footnotes_Template { /** * Replace all placeholders specified in array. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_placeholders Placeholders (key = placeholder, value = value). + * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). * @return bool True on Success, False if Placeholders invalid. */ - public function replace( $p_arr_placeholders ) { - // No placeholders set. - if ( empty( $p_arr_placeholders ) ) { + public function replace($p_arr_Placeholders) { + // no placeholders set + if (empty($p_arr_Placeholders)) { return false; } - // Template content is empty. - if ( empty( $this->a_str_replaced_content ) ) { + // template content is empty + if (empty($this->a_str_ReplacedContent)) { return false; } - // Iterate through each placeholder and replace it with its value. - foreach ( $p_arr_placeholders as $l_str_placeholder => $l_str_value ) { - $this->a_str_replaced_content = str_replace( '[[' . $l_str_placeholder . ']]', $l_str_value, $this->a_str_replaced_content ); + // iterate through each placeholder and replace it with its value + foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { + $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); } - // Success. + // success return true; } /** * Reloads the original content of the template file. * + * @author Stefan Herndler * @since 1.5.0 */ public function reload() { - $this->a_str_replaced_content = $this->a_str_original_content; + $this->a_str_ReplacedContent = $this->a_str_OriginalContent; } /** * Returns the content of the template file with replaced placeholders. * + * @author Stefan Herndler * @since 1.5.0 * @return string Template content with replaced placeholders. */ - public function get_content() { - return $this->a_str_replaced_content; + public function getContent() { + return $this->a_str_ReplacedContent; } /** - * Process template file. + * Process template file + * + * @author Patrizia Lutz @misfist * * @since 2.4.0d3 * - * @param string $template The template to be processed. + * @param string $template * @return void * - * @since 2.0.3 Replace tab with a space. - * @since 2.0.3 Replace 2 spaces with 1. - * @since 2.0.4 Collapse multiple spaces. - * @since 2.2.6 Delete a space before a closing pointy bracket. - * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). + * + * @since 2.0.3 replace tab with a space + * @since 2.0.3 replace 2 spaces with 1 + * @since 2.0.4 collapse multiple spaces + * @since 2.2.6 delete a space before a closing pointy bracket + * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) */ public function process_template( $template ) { - // phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents - $this->a_str_original_content = preg_replace( '##s', '', file_get_contents( $template ) ); - // phpcs:enable - $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\t", ' ', $this->a_str_original_content ); - $this->a_str_original_content = preg_replace( '# +#', ' ', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( ' >', '>', $this->a_str_original_content ); + $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); + $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); $this->reload(); } /** - * Get the template. + * Get the template * - * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. + * @author Patrizia Lutz @misfist * - * @since 2.4.0d3 Contribution. - * @since 2.5.0 Release. + * @since 2.4.0d3 * - * @contributor @misfist - * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 - * - * @param string $p_str_file_type The file type of the template. - * @param string $p_str_file_name The file name of the template. - * @param string $p_str_extension The file extension of the template. + * @param string $p_str_FileType + * @param string $p_str_FileName + * @param string $p_str_Extension * @return mixed false | template path */ - public function get_template( $p_str_file_type, $p_str_file_name, $p_str_extension = 'html' ) { + public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { $located = false; /** - * The directory can be changed. - * - * @usage to change location of templates to 'template_parts/footnotes/': + * The directory change be modified + * @usage to change location of templates to `template_parts/footnotes/': * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/'; + * return 'template_parts/footnotes/; * } ); */ $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension; + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; /** - * Look in active theme. + * Look in active (child) theme */ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - /** - * Look in parent theme in case active is child. - */ + /** + * Look in parent theme + */ } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - /** - * Look in custom plugin directory. - */ + /** + * Look in custom directory + */ } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - /** - * Fall back to the templates shipped with the plugin. - */ + /** + * Look in plugin + */ } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { $located = $this->plugin_directory . 'templates/' . $template_name; } @@ -232,4 +258,4 @@ class MCI_Footnotes_Template { return $located; } -} +} // end of class diff --git a/class/widgets/base.php b/class/widgets/base.php index 6618f28..ad41077 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,12 +1,14 @@ - __CLASS__, - 'description' => $this->get_description(), - ); - $l_arr_control_options = array( - 'id_base' => strtolower( $this->get_id() ), - 'width' => $this->get_widget_width(), - ); - // Registers the Widget. + $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); + $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); + // registers the Widget parent::__construct( - strtolower( $this->get_id() ), // Unique ID for the widget, has to be lowercase. - $this->get_name(), // Plugin name to be displayed. - $l_arr_widget_options, // Optional Widget Options. - $l_arr_control_options // Optional Widget Control Options. - ); + strtolower($this->getID()), // unique ID for the widget, has to be lowercase + $this->getName(), // Plugin name to be displayed + $l_arr_WidgetOptions, // Optional Widget Options + $l_arr_ControlOptions // Optional Widget Control Options + ); } } diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 4a75d11..2e322ec 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,81 +1,85 @@ -get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $g_obj_mci_footnotes->a_obj_task->Reference_Container(); - // phpcs:enable + public function widget($args, $instance) { + global $g_obj_MCI_Footnotes; + // reference container positioning is set to "widget area" + if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { + echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 898f133..3a27477 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,92 +1,83 @@ -get_content(); - // phpcs:enable + public static function newPlainTextEditorButton() { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "editor-button"); + echo $l_obj_Template->getContent(); } /** * Includes the Plugins WYSIWYG editor script. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_plugins Scripts to be included to the editor. + * @param array $p_arr_Plugins Scripts to be included to the editor. * @return array */ - public static function include_scripts( $p_arr_plugins ) { - $p_arr_plugins[ MCI_Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor.js', __FILE__ ); - return $p_arr_plugins; + public static function includeScripts($p_arr_Plugins) { + $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); + return $p_arr_Plugins; } /** * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. * Returns an JSON encoded array with the Footnotes start and end short code. * + * @author Stefan Herndler * @since 1.5.0 */ - public static function ajax_callback() { - // Get start and end tag for the footnotes short code. - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + public static function ajaxCallback() { + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); } - echo wp_json_encode( - array( - 'start' => htmlspecialchars( $l_str_starting_tag ), - 'end' => htmlspecialchars( $l_str_ending_tag ), - ) - ); + echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); exit; } -} +} \ No newline at end of file diff --git a/composer.json b/composer.json deleted file mode 100644 index 85ecd48..0000000 --- a/composer.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", - "wp-coding-standards/wpcs": "^2.3" - }, - "scripts": { - "post-install-cmd": [ - "bash _tools/setup.sh" - ] - } -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 9e0ee7c..0000000 --- a/composer.lock +++ /dev/null @@ -1,196 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "3a147d50695956de52f7cbf827b47830", - "packages": [], - "packages-dev": [ - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2020-12-07T18:04:37+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.5.8", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2020-10-23T02:01:07+00:00" - }, - { - "name": "wp-coding-standards/wpcs", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", - "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Contributors", - "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", - "keywords": [ - "phpcs", - "standards", - "wordpress" - ], - "support": { - "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", - "source": "https://github.com/WordPress/WordPress-Coding-Standards", - "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" - }, - "time": "2020-05-13T23:57:56+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/contrib/pre-commit b/contrib/pre-commit deleted file mode 100644 index 0dc792f..0000000 --- a/contrib/pre-commit +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook -# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ - -PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` -STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` - -# Determine if a file list is passed -if [ "$#" -eq 1 ] -then - oIFS=$IFS - IFS=' - ' - SFILES="$1" - IFS=$oIFS -fi -SFILES=${SFILES:-$STAGED_FILES_CMD} - -echo "Checking PHP Lint..." -for FILE in $SFILES -do - php -l -d display_errors=0 $PROJECT/$FILE - if [ $? != 0 ] - then - echo "Fix the error before commit." - exit 1 - fi - FILES="$FILES $PROJECT/$FILE" -done - -if [ -f "$PROJECT/phpcs.ruleset.xml" ] -then - RULESET="$PROJECT/phpcs.ruleset.xml" -elif [ -f "$PROJECT/phpcs.xml.dist" ] -then - RULESET="$PROJECT/phpcs.xml.dist" -else - RULESET="WordPress" -fi - -if [ "$FILES" != "" ] -then - echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." - ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Coding standards errors have been detected. Running phpcbf..." - ./vendor/bin/phpcbf --standard="$RULESET" --encoding=utf-8 -n -p $FILES - git add $FILES - echo "Running Code Sniffer again..." - ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Errors found not fixable automatically. You need to manually fix them." - exit 1 - fi - fi -fi - -exit $? diff --git a/footnotes.php b/footnotes.php index dfaf104..e05f2d9 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,27 +1,27 @@ run(); +// initialize the Plugin +$g_obj_MCI_Footnotes = new MCI_Footnotes(); +// run the Plugin +$g_obj_MCI_Footnotes->run(); /** * Sets the stylesheet enqueuing mode for production. - * + * * @since 2.5.5 * @var bool * @see class/init.php - * + * * In production, a minified CSS file tailored to the settings is enqueued. - * + * * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. - */ + */ define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index 9501097..732cfb9 100644 --- a/includes.php +++ b/includes.php @@ -3,37 +3,36 @@ * Includes all common files. * * @filesource - * @package footnotes + * @author Stefan Herndler * @since 1.5.0 14.09.14 13:40 */ /** - * Requires (`require_once`) all `*.php` files inside a specific Directory. + * Requires (require_once) all *.php files inside a specific Directory. * * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_directory Absolute Directory path to lookup for `*.php` files. + * @param string $p_str_Directory Absolute Directory path to lookup for *.php files */ -function mci_footnotes_require_php_files( $p_str_directory ) { - // Append slash at the end of the Directory if not exist. - if ( '/' !== substr( $p_str_directory, -1 ) ) { - $p_str_directory .= '/'; +function MCI_Footnotes_requirePhpFiles($p_str_Directory) { + // append slash at the end of the Directory if not exist + if (substr($p_str_Directory, -1) != "/") { + $p_str_Directory .= "/"; + } - // Get all PHP files inside Directory. - $l_arr_files = scandir( $p_str_directory ); - // Iterate through each class. - foreach ( $l_arr_files as $l_str_file_name ) { - // Skip all non-PHP files. - if ( '.php' !== strtolower( substr( $l_str_file_name, -4 ) ) ) { + // get all PHP files inside Directory + $l_arr_Files = scandir($p_str_Directory); + // iterate through each class + foreach ($l_arr_Files as $l_str_FileName) { + // skip all non *.php files + if (strtolower(substr($l_str_FileName, -4)) != ".php") { continue; } - // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIncludeInspection */ - require_once $p_str_directory . $l_str_file_name; - // phpcs:enable + require_once($p_str_Directory . $l_str_FileName); } } -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class' ); -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/layout' ); -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/widgets' ); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class"); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard"); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets"); diff --git a/readme.txt b/readme.txt index 72304f3..82e80f3 100755 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ === footnotes === -Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges +Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 -Stable Tag: 2.5.6 +Stable Tag: 2.5.5 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,7 +80,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.5.6 = - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. +- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. = 2.5.5 = - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. @@ -326,7 +326,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.4 = - Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. +- Update: GDPR: Add jQuery UI from WordPress instead of third party. - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - Bugfix: Reference container: remove inconvenient left/right cellpadding. - Bugfix: Tooltips: improve layout with inherited font size by lower line height. diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 03ad002..91fc1e4 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -54,7 +54,7 @@ type: 'POST', url: '/wp-admin/admin-ajax.php', data: { - action: 'footnotes_get_plugin_info', + action: 'footnotes_getPluginInfo', plugin: '[[plugin-name]]' }, dataType: 'json', diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index 4e70481..cb400de 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -4,8 +4,8 @@ --> <[[link-span]] onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" [[hard-link]] @@ -17,7 +17,7 @@ >[[anchor-element]] Date: Fri, 26 Feb 2021 14:40:23 +0000 Subject: [PATCH 061/144] Remove custom CSS output escaping --- class/task.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/class/task.php b/class/task.php index f477614..26dad9d 100644 --- a/class/task.php +++ b/class/task.php @@ -973,6 +973,7 @@ class MCI_Footnotes_Task { } } + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped /** * Custom CSS. * @@ -985,10 +986,11 @@ class MCI_Footnotes_Task { * Legacy Custom CSS is used until it’s set to disappear after dashboard tab migration. */ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { - echo esc_html( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ) ); + echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ); echo "\r\n"; } - echo esc_html( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ) ); + echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ); + // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped // Insert end tag without switching out of PHP. echo "\r\n\r\n"; @@ -1020,7 +1022,7 @@ class MCI_Footnotes_Task { document.getElementById(footnote_tooltip_id).classList.add('hidden'); } - Date: Sat, 20 Feb 2021 18:47:11 +0000 Subject: [PATCH 062/144] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From b1c6f2fe62e995e953471cc6872dc577f1d39bb0 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:18:41 +0000 Subject: [PATCH 063/144] Create README.md --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..6a3e29e --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# footnotes + +## Description + +Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. + +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. + +## Main Features + +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + +## Example Usage + +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + +## Where to get footnotes? + +The current version is available on the [WordPress.org Plugin Directory](https://wordpress.org/plugins/footnotes/). + +## Acknowledgements + +Huge thanks to every footnotes user, contributor, bug reporter, feature requester and fan! From 5ce214cf10fe2ed15ccee40394b0f539415780b5 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:55:46 +0000 Subject: [PATCH 064/144] Add getting started instructions to README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 6a3e29e..d57f0f6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,21 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor **footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +## Getting Started + +1. Read the contributing guidelines +1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Install [Composer](https://getcomposer.org/download/), if you don't have it already +1. Install dependencies (`composer install`) +1. Create a new branch from `main` (`git checkout -b `) +1. When you're finished, commit your changes to the remote version of your branch + and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + +## Updating Documentation + +1. Install [phpDocumentor](https://phpdoc.org/) +1. Run it (`phpDocumentor -d . -t docs`) + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From 09b065b463e48c48b3b2202c900e228c17729f18 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:07:48 +0000 Subject: [PATCH 065/144] Add footnotes header image --- img/footnotes.png | Bin 0 -> 4964 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 img/footnotes.png diff --git a/img/footnotes.png b/img/footnotes.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d82f6c4b6b704625dbf3ee328e81bd0cc2e38b GIT binary patch literal 4964 zcmbVPdpy(s_g{%ViAu~}pGA@DHq2!%xtH8;V`7<^8D`9ciRdETmdbK#Mm54*r^ux! zS+0pLNGfxgB9d!vzo}23-|vs_Nf1I87c|Fhdbd8)8Up|V zL3npBvX_HB977~%p*JyFF@$iwHUMCJI3^s83Bi&<{#YD7%tUdz?ujA@A7G;B33Grr zgj-^R@JA^mtQ*DA9YYDh7zQXFHU$~S!1)FUSTY(ELkJCvgvXdD{;~__^P6I@BIp-{ z9AcvQJ18#)XOJb4gayI0AetD69u%afs|D4C80s2ofV3e{2pFmjhUjZTA#j*J90CRX z^Hbz|BLxJ)U9D{X@x^~KQ4AuJ!{K0Xbab>4M z$7qH{D*drwg^k3J@Zn@UF$}b65$#WmBAY1kBmJEMA>6^?U&CRM{}hT}GH?t!91PWh zfC+@nyndl0$*$P{4dXweBi&=ev0zthBr%GF;qOPF(jR4h?f$!?O&~uSxDyG_-xPGH z6%i9fz=n}+txOd8D_Q~g0Jx30z6}(ruM5%FhUghUq2}7=*4FxZRyq)vjirvY^&cDm zNmtL%+(OsNT*nFq(}qH=bu9D^&CP9ebf6a2Py-z(?2oQ(SR@%8hQa>vi|70OM_2p5 z>cTBaSTvbPawif)|8#(J5Rpub3?hbuEZtyQP>=%}gAd!3Y;Mr+e66q~{7Gzp4T(qq z{i-k={~scNKnx)NJ@enX0so(>f%(CJH{0X?w96k6zXvzjf198G@bCCw!}v2p;t$8} zM;QKG?Y?1aW$qp`FiAHdac#tt<2VxP+;Dq>Jj<+w#8Ia5-cQiZP7CuJLfHzqr zDQ&l7I!eNmm}=w7PJXl7ej0pS$S6T3ZZlh*15CS}ue^2Z=t(X;wr=}rA_|52i|?Yl zLy&(Y004o4d~&<>eU;S5wdHohX~RJxdrfk(8cMvI_AzdV_h4ZJ^lj^>+msD3}kmpf}(^ z<|k1+CDSm zyVW{4CZ|;#XzVesvsZQ=o)=4Za;zG9*h!yllnJPJ z>YHumTC%S95?+_4Hy{tQfaMo*Wi;;y5PA7)2jV@+Y1;iF<8 z#I$t&$Q+eRRbSW0e!2boK$Iv$pyBnA#_#r4<7+u5$_6yV6F%fiMXQ0 zn4Vke+-t)RVm;bH-F7AC#~y4JPu_jrKCF*rUBbRtU@RC*0`E><|e4Cf##GJ+L3$nJe|i=Ag>LHF7|IQA_Ju zS1S(LDMF{NKW4^rsb>x86&j_lSjk;}rzB|sy`iy+HPKcQAjBJumlBCp?Y~@g`>Ro6@s}RpMf=^7{!X(uJzjA4Qmzy%*{^fM zkSe(sC0Z`zQ^V~IK#=?&c{q#V9E>Z~YE+S`i>hz+imDYR;C)ZX zwZ;4Adeks*A4av3f*rPCHnV!>2B)TKB49$o2bJYvRkr)D;Lp>0r6R_p9_M}+h^6NZFSj)}8qM;00oLRW}&x=;fQ^?$7 zJU5nujyP@B_4DHKTM%^~ld=`A0X(b*ZhWEY=m=EHs#ANGwaYF$-873i)c5T>prAw!|DEQ24_=HzWw_V7O zs}nyFIiosVnJ;}EeNmr~V;i^kwpX0dbeF!coFGPv zfzO`b`<;w66H0jitMzy9wu=``L~|<;EHP0k*`Wf1;FgM9((4S)auHqf`EI`_u|Qfn8aUYI<`hWNTZ>Azmzt;CRJ%3ngip;ca5@ z7TU_*r{dn^Mp+3(43t%w9RnY|}tyvMWF6jq=j`IprPwNhj{F3Mjlny6973BU7x}ed>*U-S?%8 zDv0pZmnFPgj_4~BCJLnu+8Nm<8_!p;pWT{bUsc8g%*Nx=UB1t$B1F&jMdzk}$t2%* z(=6JtGBS3YQ)Ta%@SeC)9$`Ij*-4&V^!Uu}IRk_y@RTQ9ohK;h0EB<6l#%KEdGrF) z3h$#o7}3w^*Qm;TcYG@#F~LuHxbcT{izE7nJ7oPJag1o$bwNY1W8#}1A0hVD5^SW5 zz-rE8Eh*FPuUwyGF}d}EwFPkYP~}A`kiPkPuKrr79FS2dBdAJ$cdj~w(h%Sk`%aL( z6)<-`ZuW=rL*#+B4m&Lwt^RVwBA$U1|Ha=uuhmqUANIl0_4qij=W~E4#%Dn~Pj#>4 z_(^Yq0(;B~-V>werp~{}cQ*LC|F)E-5N-#&@>#xW z#k?jWu_6x%wtP{1@-4YWC%Jx4KiQixaisvo4Q>1)4MG5NrDjeXk&DQiJ%rL%@ozTG z^ysPh0)3HELaf+&Mf57A;^yeVkvGQ*u)5)3RCe!IPR4z`;s;BygGmb7UH_nXg7?JW z$@6kRsqu@n@1?&)LaVBT0u(tn~5EcMqnT@Kg6fx-JNw%`PpbMR>D~Wm*W{*(<`)@W_ zY_8K$_Anyjv+j2ThI#Uql@@QFQT3yT@pKw+rm!`GBRpn!1zHRcJIa{QczW$qbP3stDpmOdySI6xOu`}@QO4pLWT=f;QRB4;Epz+ zqy5j_ds{4wtKBC*Mf}2M&G{>n<0J=~?`j=rgAD4j6?fOR>{lp#(*7ap#G$>{8-l{` z)l>96x@bYI=_x?J(3rbYnTP+LtIvHV6L~EyzG0vZTAW9s-^*l41!AKw`9?P=)3=** z9I@iAkLH(5pHo720L;J+Uk{$FRqt$1vgG(&1FD6%ycS9000T2v`hgGfiB8dUHSw-v z8WDqT%R3cTBtm3k{MF}r@=+EXK-CxMNfM=KClW5$<%RdemPzSwib*F1SyP`ctHTFv z5*m$gMF9|HvKKDCG?&CbSNXdrezEs_vv6HJ=FUmmsGB+k%B4rd(jV4!h|s?osm*d^ z84~hvi{Lot+Ow}TINN}l5&Yu>2^5;y$75m}&dpH_A&7?z;_a}2; zO`0Kf!Nh}2uJ-G_8Sx<;bvMgj?nhkN#C$|GyKcHVN934#7W2NTR;&tfX@hfcFEsG` zg{Nz_?pJmOuRntNUVF3ahM~f(ay|L!-s{tj=j3=6;Q0ycbNc&Z&2i7)n>_J!b+Okg z^X&Q>El;G45uYr&p2~rh$mv}NZaDTYZSC^SLWH`A)8$@dr>CbAQKuHi!Lb{rVzjr} zLdVBm6wVALRpmb;pmKQSUDL|Zsk4i638zKHG3glkcR<^UarOpSe{GFhw$U)-wiJ1w zs9OIXBhler z`&0l0?+v!2Mw^#SgANbxBIam6Du_^fw|f<7d-ms1t9QnB%T%QyExUx4vwfa4t=)|G zNIY6i?P&zn>hR?+`}g|_o%g!-iHs;$;V}zKyTZn0M+C;n*6^@dBMDiVA9|f)<5ZZx z(R`10>w6?K3kWa;u(xXZsr)F+7-V~0)|{?HPyf0u@ Date: Sun, 21 Feb 2021 11:08:04 +0000 Subject: [PATCH 066/144] Add linting instructions and header image --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d57f0f6..6bd1e8d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![footnotes](https://raw.githubusercontent.com/media-competence-institute/footnotes/main/img/footnotes.png) + # footnotes ## Description @@ -18,11 +20,21 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. When you're finished, commit your changes to the remote version of your branch and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). +## Checking WP Coding Standard Compliance + +1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) +1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -n -p `) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `*/**/*.php` + ## Updating Documentation 1. Install [phpDocumentor](https://phpdoc.org/) 1. Run it (`phpDocumentor -d . -t docs`) +## Testing + +Unit tests are TODO. + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From 947a64844a2a28b3bfbe568ace793c6881cfae8c Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:20:11 +0000 Subject: [PATCH 067/144] Add more PHPCS tips --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6bd1e8d..2ff05d5 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,10 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor ## Checking WP Coding Standard Compliance 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) -1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -n -p `) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `*/**/*.php` +1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) + - Add the `-n` flag to ignore warnings (i.e., show only errors) + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` ## Updating Documentation From 8cf193005957ef6ab34f9d496ed8735b902d3e29 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:04:22 +0000 Subject: [PATCH 068/144] Create CONTRIBUTING.md --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..73fa4de --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +footnotes welcomes contributions! + +Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: + +# Branching + +- footnotes uses [GitHub Flow](https://githubflow.github.io/) +- branch off of `main` to start developing +- give your new branch a descriptive name +- when ready, submit a pull request to merge your branch with `main` + +# Commits + +- footnotes uses [Conventional Commits](https://www.conventionalcommits.org) +- keep individual commits as small as possible + +# Versioning + +- footnotes uses [Semantic Versioning](https://semver.org/) From c93271ee65663bcab3e33e8634f007e7f023fb25 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:55:52 +0000 Subject: [PATCH 069/144] Generate HTML documentation using phpDocumentor --- docs/classes/MCI-Footnotes-Config.html | 504 ++ docs/classes/MCI-Footnotes-Convert.html | 759 ++ docs/classes/MCI-Footnotes-Hooks.html | 526 ++ docs/classes/MCI-Footnotes-Language.html | 493 ++ .../MCI-Footnotes-Layout-Diagnostics.html | 2290 ++++++ docs/classes/MCI-Footnotes-Layout-Init.html | 759 ++ .../MCI-Footnotes-Layout-Settings.html | 3757 ++++++++++ docs/classes/MCI-Footnotes-LayoutEngine.html | 2222 ++++++ docs/classes/MCI-Footnotes-Settings.html | 6221 +++++++++++++++++ docs/classes/MCI-Footnotes-Task.html | 2902 ++++++++ docs/classes/MCI-Footnotes-Template.html | 1044 +++ docs/classes/MCI-Footnotes-WYSIWYG.html | 492 ++ ...I-Footnotes-Widget-ReferenceContainer.html | 688 ++ docs/classes/MCI-Footnotes-WidgetBase.html | 529 ++ docs/classes/MCI-Footnotes.html | 873 +++ docs/css/base.css | 1002 +++ docs/css/normalize.css | 427 ++ docs/css/template.css | 169 + docs/files/class-config.html | 121 + docs/files/class-convert.html | 121 + docs/files/class-dashboard-init.html | 121 + docs/files/class-dashboard-layout.html | 121 + .../class-dashboard-subpage-diagnostics.html | 121 + docs/files/class-dashboard-subpage-main.html | 121 + docs/files/class-hooks.html | 121 + docs/files/class-init.html | 121 + docs/files/class-language.html | 121 + docs/files/class-settings.html | 121 + docs/files/class-task.html | 121 + docs/files/class-template.html | 121 + docs/files/class-widgets-base.html | 121 + .../class-widgets-reference-container.html | 121 + docs/files/class-wysiwyg.html | 121 + docs/files/footnotes.html | 110 + docs/files/includes.html | 190 + docs/graphs/classes.html | 97 + docs/index.html | 223 + docs/indices/files.html | 142 + docs/js/search.js | 173 + docs/js/searchIndex.js | 1419 ++++ docs/namespaces/default.html | 227 + docs/packages/Default.html | 227 + docs/packages/default.html | 116 + docs/reports/deprecated.html | 106 + docs/reports/errors.html | 174 + docs/reports/markers.html | 128 + 46 files changed, 30804 insertions(+) create mode 100644 docs/classes/MCI-Footnotes-Config.html create mode 100644 docs/classes/MCI-Footnotes-Convert.html create mode 100644 docs/classes/MCI-Footnotes-Hooks.html create mode 100644 docs/classes/MCI-Footnotes-Language.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Diagnostics.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Init.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Settings.html create mode 100644 docs/classes/MCI-Footnotes-LayoutEngine.html create mode 100644 docs/classes/MCI-Footnotes-Settings.html create mode 100644 docs/classes/MCI-Footnotes-Task.html create mode 100644 docs/classes/MCI-Footnotes-Template.html create mode 100644 docs/classes/MCI-Footnotes-WYSIWYG.html create mode 100644 docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html create mode 100644 docs/classes/MCI-Footnotes-WidgetBase.html create mode 100644 docs/classes/MCI-Footnotes.html create mode 100644 docs/css/base.css create mode 100644 docs/css/normalize.css create mode 100644 docs/css/template.css create mode 100644 docs/files/class-config.html create mode 100644 docs/files/class-convert.html create mode 100644 docs/files/class-dashboard-init.html create mode 100644 docs/files/class-dashboard-layout.html create mode 100644 docs/files/class-dashboard-subpage-diagnostics.html create mode 100644 docs/files/class-dashboard-subpage-main.html create mode 100644 docs/files/class-hooks.html create mode 100644 docs/files/class-init.html create mode 100644 docs/files/class-language.html create mode 100644 docs/files/class-settings.html create mode 100644 docs/files/class-task.html create mode 100644 docs/files/class-template.html create mode 100644 docs/files/class-widgets-base.html create mode 100644 docs/files/class-widgets-reference-container.html create mode 100644 docs/files/class-wysiwyg.html create mode 100644 docs/files/footnotes.html create mode 100644 docs/files/includes.html create mode 100644 docs/graphs/classes.html create mode 100644 docs/index.html create mode 100644 docs/indices/files.html create mode 100644 docs/js/search.js create mode 100644 docs/js/searchIndex.js create mode 100644 docs/namespaces/default.html create mode 100644 docs/packages/Default.html create mode 100644 docs/packages/default.html create mode 100644 docs/reports/deprecated.html create mode 100644 docs/reports/errors.html create mode 100644 docs/reports/markers.html diff --git a/docs/classes/MCI-Footnotes-Config.html b/docs/classes/MCI-Footnotes-Config.html new file mode 100644 index 0000000..57b1506 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Config.html @@ -0,0 +1,504 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                    +

                                                                                    Documentation

                                                                                    + + + + + +
                                                                                    + +
                                                                                    +
                                                                                    + + + + +
                                                                                    + + +
                                                                                    +

                                                                                    + MCI_Footnotes_Config + + + + +

                                                                                    + + + +

                                                                                    Contains all Plugin Constants. Contains no Method or Property.

                                                                                    + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + author +
                                                                                    +
                                                                                    + +

                                                                                    Stefan Herndler

                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 1.5.0 + +
                                                                                    + +
                                                                                    +
                                                                                    + + + + + + +

                                                                                    + Table of Contents + +

                                                                                    + +
                                                                                    +
                                                                                    + C_STR_LOVE_SYMBOL + +  = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' +
                                                                                    +
                                                                                    Html tag for the LOVE symbol.
                                                                                    + +
                                                                                    + C_STR_LOVE_SYMBOL_HEADING + +  = '<span class="footnotes_heart_heading">&hearts;</span>' +
                                                                                    +
                                                                                    HTML code for the 'love' symbol used in dashboard heading
                                                                                    + +
                                                                                    + C_STR_NO_LOVE_SLUG + +  = '[[no footnotes: love]]' +
                                                                                    +
                                                                                    Short code to DON'T display the 'LOVE ME' slug on certain pages.
                                                                                    + +
                                                                                    + C_STR_PLUGIN_HEADING_NAME + +  = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' +
                                                                                    +
                                                                                    Public Plugin name for dashboard heading
                                                                                    + +
                                                                                    + C_STR_PLUGIN_NAME + +  = "footnotes" +
                                                                                    +
                                                                                    Internal Plugin name.
                                                                                    + +
                                                                                    + C_STR_PLUGIN_PUBLIC_NAME + +  = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' +
                                                                                    +
                                                                                    Public Plugin name.
                                                                                    + +
                                                                                    + + + + +
                                                                                    +

                                                                                    + Constants + +

                                                                                    +
                                                                                    +

                                                                                    + C_STR_LOVE_SYMBOL + +

                                                                                    + + + +

                                                                                    Html tag for the LOVE symbol.

                                                                                    + + + public + string + C_STR_LOVE_SYMBOL + = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' + + + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + author +
                                                                                    +
                                                                                    + +

                                                                                    Stefan Herndler

                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 1.5.0 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    + C_STR_LOVE_SYMBOL_HEADING + +

                                                                                    + + + +

                                                                                    HTML code for the 'love' symbol used in dashboard heading

                                                                                    + + + public + string + C_STR_LOVE_SYMBOL_HEADING + = '<span class="footnotes_heart_heading">&hearts;</span>' + + + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 2.0.4 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    + C_STR_NO_LOVE_SLUG + +

                                                                                    + + + +

                                                                                    Short code to DON'T display the 'LOVE ME' slug on certain pages.

                                                                                    + + + public + string + C_STR_NO_LOVE_SLUG + = '[[no footnotes: love]]' + + + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + author +
                                                                                    +
                                                                                    + +

                                                                                    Stefan Herndler

                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 1.5.0 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    + C_STR_PLUGIN_HEADING_NAME + +

                                                                                    + + + +

                                                                                    Public Plugin name for dashboard heading

                                                                                    + + + public + string + C_STR_PLUGIN_HEADING_NAME + = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' + + + +

                                                                                    After properly displaying in dashboard headings until WPv5.4, the above started +in WPv5.5 being torn apart as if the headline was text-align:justify and not +the last line. That ugly display bug badly affected the plugin’s communication. +The only working solution found so far is using position:fixed in one heading +that isn’t translated, and dropping the logo in another, translatable heading.

                                                                                    +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 2.0.4 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    + C_STR_PLUGIN_NAME + +

                                                                                    + + + +

                                                                                    Internal Plugin name.

                                                                                    + + + public + string + C_STR_PLUGIN_NAME + = "footnotes" + + + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + author +
                                                                                    +
                                                                                    + +

                                                                                    Stefan Herndler

                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 1.5.0 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    + C_STR_PLUGIN_PUBLIC_NAME + +

                                                                                    + + + +

                                                                                    Public Plugin name.

                                                                                    + + + public + string + C_STR_PLUGIN_PUBLIC_NAME + = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' + + + +
                                                                                    + + +
                                                                                    + Tags + +
                                                                                    +
                                                                                    +
                                                                                    + author +
                                                                                    +
                                                                                    + +

                                                                                    Stefan Herndler

                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + since +
                                                                                    +
                                                                                    + 1.5.0 + +
                                                                                    + +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + + + + +
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    +

                                                                                    Search results

                                                                                    + +
                                                                                    +
                                                                                    +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      + + +
                                                                                      + + + + diff --git a/docs/classes/MCI-Footnotes-Convert.html b/docs/classes/MCI-Footnotes-Convert.html new file mode 100644 index 0000000..ebb56d9 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Convert.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                      +

                                                                                      Documentation

                                                                                      + + + + + +
                                                                                      + +
                                                                                      +
                                                                                      + + + + +
                                                                                      + + +
                                                                                      +

                                                                                      + MCI_Footnotes_Convert + + + + +

                                                                                      + + + +

                                                                                      Converts data types and Footnotes specific values.

                                                                                      + +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.5.0 + +
                                                                                      + +
                                                                                      +
                                                                                      + + + + + + +

                                                                                      + Table of Contents + +

                                                                                      + +
                                                                                      +
                                                                                      + debug() + +  : mixed +
                                                                                      +
                                                                                      Displays a Variable.
                                                                                      + +
                                                                                      + getArrow() + +  : array<string|int, mixed>|string +
                                                                                      +
                                                                                      Get a html Array short code depending on Arrow-Array key index.
                                                                                      + +
                                                                                      + Index() + +  : string +
                                                                                      +
                                                                                      Converts a integer into the user-defined counter style for the footnotes.
                                                                                      + +
                                                                                      + toBool() + +  : bool +
                                                                                      +
                                                                                      Converts a string depending on its value to a boolean.
                                                                                      + +
                                                                                      + toArabicLeading() + +  : string +
                                                                                      +
                                                                                      Converts an integer to a leading-0 integer.
                                                                                      + +
                                                                                      + toLatin() + +  : string +
                                                                                      +
                                                                                      Converts an integer into latin ascii characters, either lower or upper-case.
                                                                                      + +
                                                                                      + toRomanic() + +  : string +
                                                                                      +
                                                                                      Converts an integer to a romanic letter.
                                                                                      + +
                                                                                      + + + + + + + +
                                                                                      +

                                                                                      + Methods + +

                                                                                      +
                                                                                      +

                                                                                      + debug() + +

                                                                                      + + +

                                                                                      Displays a Variable.

                                                                                      + + + public + static debug(mixed $p_mixed_Value) : mixed + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_mixed_Value + : mixed +
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.5.0 + +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + mixed + — +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + getArrow() + +

                                                                                      + + +

                                                                                      Get a html Array short code depending on Arrow-Array key index.

                                                                                      + + + public + static getArrow([int $p_int_Index = -1 ]) : array<string|int, mixed>|string + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_int_Index + : int + = -1
                                                                                      +
                                                                                      +

                                                                                      Index representing the Arrow. If empty all Arrows are specified.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.3.2 + +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + array<string|int, mixed>|string + — +

                                                                                      Array of all Arrows if Index is empty otherwise html tag of a specific arrow.

                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + Index() + +

                                                                                      + + +

                                                                                      Converts a integer into the user-defined counter style for the footnotes.

                                                                                      + + + public + static Index(int $p_int_Index[, string $p_str_ConvertStyle = "arabic_plain" ]) : string + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_int_Index + : int +
                                                                                      +
                                                                                      +

                                                                                      Index to be converted.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + $p_str_ConvertStyle + : string + = "arabic_plain"
                                                                                      +
                                                                                      +

                                                                                      Style of the new/converted Index.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.5.0 + +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 2.2.0 + +

                                                                                      lowercase Roman numerals supported

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + string + — +

                                                                                      Converted Index as string in the defined counter style.

                                                                                      +

                                                                                      Edited:

                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + toBool() + +

                                                                                      + + +

                                                                                      Converts a string depending on its value to a boolean.

                                                                                      + + + public + static toBool(string $p_str_Value) : bool + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_str_Value + : string +
                                                                                      +
                                                                                      +

                                                                                      String to be converted to boolean.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.0-beta + +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + bool + — +

                                                                                      Boolean representing the string.

                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + toArabicLeading() + +

                                                                                      + + +

                                                                                      Converts an integer to a leading-0 integer.

                                                                                      + + + private + static toArabicLeading(int $p_int_Value) : string + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_int_Value + : int +
                                                                                      +
                                                                                      +

                                                                                      Value/Index to be converted.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.0-gamma + +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + string + — +

                                                                                      Value with a leading zero.

                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + toLatin() + +

                                                                                      + + +

                                                                                      Converts an integer into latin ascii characters, either lower or upper-case.

                                                                                      + + + private + static toLatin(int $p_int_Value, bool $p_bool_UpperCase) : string + +

                                                                                      Function available from A to ZZ ( means 676 footnotes at 1 page possible).

                                                                                      +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_int_Value + : int +
                                                                                      +
                                                                                      +

                                                                                      Value/Index to be converted.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + $p_bool_UpperCase + : bool +
                                                                                      +
                                                                                      +

                                                                                      True to convert the value to upper case letter, otherwise to lower case.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.0-gamma + +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + string + — +
                                                                                      + + +
                                                                                      +
                                                                                      +

                                                                                      + toRomanic() + +

                                                                                      + + +

                                                                                      Converts an integer to a romanic letter.

                                                                                      + + + private + static toRomanic(int $p_int_Value, mixed $p_bool_UpperCase) : string + +
                                                                                      + +
                                                                                      Parameters
                                                                                      +
                                                                                      +
                                                                                      + $p_int_Value + : int +
                                                                                      +
                                                                                      +

                                                                                      Value/Index to be converted.

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + $p_bool_UpperCase + : mixed +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + Tags + +
                                                                                      +
                                                                                      +
                                                                                      + author +
                                                                                      +
                                                                                      + +

                                                                                      Stefan Herndler

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 1.0-gamma + +
                                                                                      + +
                                                                                      +
                                                                                      + since +
                                                                                      +
                                                                                      + 2.2.0 + +

                                                                                      optionally lowercase (code from Latin) 2020-12-12T1538+0100

                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + +
                                                                                      Return values
                                                                                      + string + — +

                                                                                      Edited:

                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      Search results

                                                                                      + +
                                                                                      +
                                                                                      +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + + +
                                                                                        + + + + diff --git a/docs/classes/MCI-Footnotes-Hooks.html b/docs/classes/MCI-Footnotes-Hooks.html new file mode 100644 index 0000000..eb710f1 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Hooks.html @@ -0,0 +1,526 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                        +

                                                                                        Documentation

                                                                                        + + + + + +
                                                                                        + +
                                                                                        +
                                                                                        + + + + +
                                                                                        + + +
                                                                                        +

                                                                                        + MCI_Footnotes_Hooks + + + + +

                                                                                        + + + +

                                                                                        Registers all WordPress Hooks and executes them on demand.

                                                                                        + +
                                                                                        + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + +

                                                                                        + Table of Contents + +

                                                                                        + +
                                                                                        +
                                                                                        + activatePlugin() + +  : mixed +
                                                                                        +
                                                                                        Executed when the Plugin gets activated.
                                                                                        + +
                                                                                        + deactivatePlugin() + +  : mixed +
                                                                                        +
                                                                                        Executed when the Plugin gets deactivated.
                                                                                        + +
                                                                                        + PluginLinks() + +  : array<string|int, mixed> +
                                                                                        +
                                                                                        Add Links to the Plugin in the "installed Plugins" page.
                                                                                        + +
                                                                                        + registerHooks() + +  : mixed +
                                                                                        +
                                                                                        Registers all WordPress hooks.
                                                                                        + +
                                                                                        + uninstallPlugin() + +  : mixed +
                                                                                        +
                                                                                        Executed when the Plugin gets uninstalled.
                                                                                        + +
                                                                                        + + + + + + + +
                                                                                        +

                                                                                        + Methods + +

                                                                                        +
                                                                                        +

                                                                                        + activatePlugin() + +

                                                                                        + + +

                                                                                        Executed when the Plugin gets activated.

                                                                                        + + + public + static activatePlugin() : mixed + +
                                                                                        + + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        Return values
                                                                                        + mixed + — +
                                                                                        + + +
                                                                                        +
                                                                                        +

                                                                                        + deactivatePlugin() + +

                                                                                        + + +

                                                                                        Executed when the Plugin gets deactivated.

                                                                                        + + + public + static deactivatePlugin() : mixed + +
                                                                                        + + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        Return values
                                                                                        + mixed + — +
                                                                                        + + +
                                                                                        +
                                                                                        + + + +

                                                                                        Add Links to the Plugin in the "installed Plugins" page.

                                                                                        + + + public + static PluginLinks(array<string|int, mixed> $p_arr_Links, string $p_str_PluginFileName) : array<string|int, mixed> + +
                                                                                        + +
                                                                                        Parameters
                                                                                        +
                                                                                        +
                                                                                        + $p_arr_Links + : array<string|int, mixed> +
                                                                                        +
                                                                                        +

                                                                                        Current Links.

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + $p_str_PluginFileName + : string +
                                                                                        +
                                                                                        +

                                                                                        Plugins init file name.

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        Return values
                                                                                        + array<string|int, mixed> + — +
                                                                                        + + +
                                                                                        +
                                                                                        +

                                                                                        + registerHooks() + +

                                                                                        + + +

                                                                                        Registers all WordPress hooks.

                                                                                        + + + public + static registerHooks() : mixed + +
                                                                                        + + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        Return values
                                                                                        + mixed + — +
                                                                                        + + +
                                                                                        +
                                                                                        +

                                                                                        + uninstallPlugin() + +

                                                                                        + + +

                                                                                        Executed when the Plugin gets uninstalled.

                                                                                        + + + public + static uninstallPlugin() : mixed + +
                                                                                        + + + +
                                                                                        + Tags + +
                                                                                        +
                                                                                        +
                                                                                        + author +
                                                                                        +
                                                                                        + +

                                                                                        Stefan Herndler

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 1.5.0 + +

                                                                                        Edit: ClearAll didn’t actually work.

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + since +
                                                                                        +
                                                                                        + 2.2.0 + +

                                                                                        this function is not called any longer when deleting the plugin

                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + +
                                                                                        Return values
                                                                                        + mixed + — +
                                                                                        + + +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        +

                                                                                        Search results

                                                                                        + +
                                                                                        +
                                                                                        +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + + +
                                                                                          + + + + diff --git a/docs/classes/MCI-Footnotes-Language.html b/docs/classes/MCI-Footnotes-Language.html new file mode 100644 index 0000000..ebf670f --- /dev/null +++ b/docs/classes/MCI-Footnotes-Language.html @@ -0,0 +1,493 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                          +

                                                                                          Documentation

                                                                                          + + + + + +
                                                                                          + +
                                                                                          +
                                                                                          + + + + +
                                                                                          + + +
                                                                                          +

                                                                                          + MCI_Footnotes_Language + + + + +

                                                                                          + + + +

                                                                                          Loads text domain of current or default language for localization.

                                                                                          + +
                                                                                          + + +
                                                                                          + Tags + +
                                                                                          +
                                                                                          +
                                                                                          + author +
                                                                                          +
                                                                                          + +

                                                                                          Stefan Herndler

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 1.5.0 + +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + +

                                                                                          + Table of Contents + +

                                                                                          + +
                                                                                          +
                                                                                          + loadTextDomain() + +  : mixed +
                                                                                          +
                                                                                          Loads the text domain for current WordPress language if exists.
                                                                                          + +
                                                                                          + registerHooks() + +  : mixed +
                                                                                          +
                                                                                          Register WordPress Hook.
                                                                                          + +
                                                                                          + load() + +  : bool +
                                                                                          +
                                                                                          Loads a specific text domain.
                                                                                          + +
                                                                                          + + + + + + + +
                                                                                          +

                                                                                          + Methods + +

                                                                                          +
                                                                                          +

                                                                                          + loadTextDomain() + +

                                                                                          + + +

                                                                                          Loads the text domain for current WordPress language if exists.

                                                                                          + + + public + static loadTextDomain() : mixed + +

                                                                                          Otherwise fallback "en_GB" will be loaded.

                                                                                          +
                                                                                          + + + +
                                                                                          + Tags + +
                                                                                          +
                                                                                          +
                                                                                          + author +
                                                                                          +
                                                                                          + +

                                                                                          Stefan Herndler

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 1.5.0 + +
                                                                                            +
                                                                                          • Bugfix: Correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution.
                                                                                          • +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 2.0.0 + +
                                                                                          + +
                                                                                          +
                                                                                          + date +
                                                                                          +
                                                                                          + +

                                                                                          2020-10-26T1609+0100

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + contributor +
                                                                                          +
                                                                                          + +

                                                                                          @matkus2

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + link +
                                                                                          +
                                                                                          +

                                                                                          Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error: +“Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters()”

                                                                                          +

                                                                                          Yet get_locale() is defined w/o parameters in wp-includes/l10n.php:30, and +apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugin.php:181.

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + link +
                                                                                          +
                                                                                          +

                                                                                          But apply_filters() is defined with a 3rd parameter (and w/o the first one) in +wp-includes/class-wp-hook.php:264, as public function apply_filters( $value, $args ).

                                                                                          +

                                                                                          Taking it all together, probably the full function definition would be: +public function apply_filters( $tag, $value, $args ). +In the case of get_locale(), $args is empty.

                                                                                          +

                                                                                          The bug was lurking in WP. PHP 7.1 promoted the warning to an error.

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + link +
                                                                                          +
                                                                                          + https://www.php.net/manual/en/migration71.incompatible.php + +
                                                                                          +
                                                                                          + link +
                                                                                          +
                                                                                          + https://www.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.too-few-arguments-exception + +
                                                                                          +
                                                                                          + +
                                                                                          Return values
                                                                                          + mixed + — +
                                                                                          + + +
                                                                                          +
                                                                                          +

                                                                                          + registerHooks() + +

                                                                                          + + +

                                                                                          Register WordPress Hook.

                                                                                          + + + public + static registerHooks() : mixed + +
                                                                                          + + + +
                                                                                          + Tags + +
                                                                                          +
                                                                                          +
                                                                                          + author +
                                                                                          +
                                                                                          + +

                                                                                          Stefan Herndler

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 1.5.0 + +
                                                                                          + +
                                                                                          +
                                                                                          + +
                                                                                          Return values
                                                                                          + mixed + — +
                                                                                          + + +
                                                                                          +
                                                                                          +

                                                                                          + load() + +

                                                                                          + + +

                                                                                          Loads a specific text domain.

                                                                                          + + + private + static load(string $p_str_LanguageCode) : bool + +
                                                                                          + +
                                                                                          Parameters
                                                                                          +
                                                                                          +
                                                                                          + $p_str_LanguageCode + : string +
                                                                                          +
                                                                                          +

                                                                                          Language Code to load a specific text domain.

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + +
                                                                                          + Tags + +
                                                                                          +
                                                                                          +
                                                                                          + author +
                                                                                          +
                                                                                          + +

                                                                                          Stefan Herndler

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 1.5.1 + +
                                                                                          + +
                                                                                          +
                                                                                          + since +
                                                                                          +
                                                                                          + 2.1.6 + +
                                                                                          + +
                                                                                          +
                                                                                          + date +
                                                                                          +
                                                                                          + +

                                                                                          2020-12-08T1931+0100

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + reporter +
                                                                                          +
                                                                                          + +

                                                                                          @nikelaos

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + link +
                                                                                          +
                                                                                          +

                                                                                          That is done by using load_plugin_textdomain(): +“The .mo file should be named based on the text domain with a dash, and then the locale exactly.”

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + see +
                                                                                          +
                                                                                          + +

                                                                                          wp-includes/l10n.php:857

                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + +
                                                                                          Return values
                                                                                          + bool + — +
                                                                                            +
                                                                                          • Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report.
                                                                                          • +
                                                                                          +
                                                                                          + + +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          +

                                                                                          Search results

                                                                                          + +
                                                                                          +
                                                                                          +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + + +
                                                                                            + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Diagnostics.html b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html new file mode 100644 index 0000000..d00152d --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html @@ -0,0 +1,2290 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                            +

                                                                                            Documentation

                                                                                            + + + + + +
                                                                                            + +
                                                                                            +
                                                                                            + + + + +
                                                                                            + + +
                                                                                            +

                                                                                            + MCI_Footnotes_Layout_Diagnostics + + + extends MCI_Footnotes_LayoutEngine + + + + +

                                                                                            + + + +

                                                                                            Displays Diagnostics of the web server, PHP and WordPress.

                                                                                            + +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + +

                                                                                            + Table of Contents + +

                                                                                            + +
                                                                                            +
                                                                                            + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Stores all Sections for the child sub page.
                                                                                            + +
                                                                                            + $a_str_SubPageHook + +  : null|string +
                                                                                            +
                                                                                            Stores the Hook connection string for the child sub page.
                                                                                            + +
                                                                                            + Description() + +  : mixed +
                                                                                            +
                                                                                            Output the Description of a section. May be overwritten in any section.
                                                                                            + +
                                                                                            + Diagnostics() + +  : mixed +
                                                                                            +
                                                                                            Displays a diagnostics about the web server, php and WordPress.
                                                                                            + +
                                                                                            + displayContent() + +  : mixed +
                                                                                            +
                                                                                            Displays the content of specific sub page.
                                                                                            + +
                                                                                            + getPriority() + +  : int +
                                                                                            +
                                                                                            Returns a Priority index. Lower numbers have a higher Priority.
                                                                                            + +
                                                                                            + registerSections() + +  : mixed +
                                                                                            +
                                                                                            Registers all sections for a sub page.
                                                                                            + +
                                                                                            + registerSubPage() + +  : mixed +
                                                                                            +
                                                                                            Registers a sub page.
                                                                                            + +
                                                                                            + addCheckbox() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for an input [type = checkbox].
                                                                                            + +
                                                                                            + addColorSelection() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for an input [type = text] with color selection class.
                                                                                            + +
                                                                                            + addLabel() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for an input/select label.
                                                                                            + +
                                                                                            + addLineSpace() + +  : string +
                                                                                            +
                                                                                            Returns a line break to have a space between two lines.
                                                                                            + +
                                                                                            + addMetaBox() + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Returns an array describing a meta box.
                                                                                            + +
                                                                                            + addNewline() + +  : string +
                                                                                            +
                                                                                            Returns a line break to start a new line.
                                                                                            + +
                                                                                            + addNumBox() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for an input [type = num].
                                                                                            + +
                                                                                            + addSection() + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Returns an array describing a sub page section.
                                                                                            + +
                                                                                            + addSelectBox() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for a select box.
                                                                                            + +
                                                                                            + addText() + +  : string +
                                                                                            +
                                                                                            Returns a simple text inside html <span> text.
                                                                                            + +
                                                                                            + addTextArea() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for a text area.
                                                                                            + +
                                                                                            + addTextBox() + +  : string +
                                                                                            +
                                                                                            Returns the html tag for an input [type = text].
                                                                                            + +
                                                                                            + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Returns an array of all registered meta boxes for each section of the sub page.
                                                                                            + +
                                                                                            + getSections() + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Returns an array of all registered sections for the sub page.
                                                                                            + +
                                                                                            + getSubPageSlug() + +  : string +
                                                                                            +
                                                                                            Returns the unique slug of the sub page.
                                                                                            + +
                                                                                            + getSubPageTitle() + +  : string +
                                                                                            +
                                                                                            Returns the title of the sub page.
                                                                                            + +
                                                                                            + LoadSetting() + +  : array<string|int, mixed> +
                                                                                            +
                                                                                            Loads specific setting and returns an array with the keys [id, name, value].
                                                                                            + +
                                                                                            + appendScripts() + +  : mixed +
                                                                                            +
                                                                                            Append javascript and css files for specific sub page.
                                                                                            + +
                                                                                            + registerMetaBoxes() + +  : mixed +
                                                                                            +
                                                                                            Registers all Meta boxes for a sub page.
                                                                                            + +
                                                                                            + saveSettings() + +  : bool +
                                                                                            +
                                                                                            Save all Plugin settings.
                                                                                            + +
                                                                                            + + + + + + +
                                                                                            +

                                                                                            + Properties + +

                                                                                            +
                                                                                            +

                                                                                            + $a_arr_Sections + + + +

                                                                                            + + +

                                                                                            Stores all Sections for the child sub page.

                                                                                            + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            +

                                                                                            + $a_str_SubPageHook + + + +

                                                                                            + + +

                                                                                            Stores the Hook connection string for the child sub page.

                                                                                            + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            +

                                                                                            + Methods + +

                                                                                            +
                                                                                            +

                                                                                            + Description() + +

                                                                                            + + +

                                                                                            Output the Description of a section. May be overwritten in any section.

                                                                                            + + + public + Description() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + Diagnostics() + +

                                                                                            + + +

                                                                                            Displays a diagnostics about the web server, php and WordPress.

                                                                                            + + + public + Diagnostics() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + displayContent() + +

                                                                                            + + +

                                                                                            Displays the content of specific sub page.

                                                                                            + + + public + displayContent() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + getPriority() + +

                                                                                            + + +

                                                                                            Returns a Priority index. Lower numbers have a higher Priority.

                                                                                            + + + public + getPriority() : int + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + int + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + registerSections() + +

                                                                                            + + +

                                                                                            Registers all sections for a sub page.

                                                                                            + + + public + registerSections() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + registerSubPage() + +

                                                                                            + + +

                                                                                            Registers a sub page.

                                                                                            + + + public + registerSubPage() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addCheckbox() + +

                                                                                            + + +

                                                                                            Returns the html tag for an input [type = checkbox].

                                                                                            + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre load the input field.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addColorSelection() + +

                                                                                            + + +

                                                                                            Returns the html tag for an input [type = text] with color selection class.

                                                                                            + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre load the input field.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.6 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addLabel() + +

                                                                                            + + +

                                                                                            Returns the html tag for an input/select label.

                                                                                            + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to connect the Label with the input/select field.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_Caption + : string +
                                                                                            +
                                                                                            +

                                                                                            Label caption.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 2.1.6 + +

                                                                                            no colon

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +

                                                                                            Edited 2020-12-01T0159+0100..

                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addLineSpace() + +

                                                                                            + + +

                                                                                            Returns a line break to have a space between two lines.

                                                                                            + + + protected + addLineSpace() : string + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addMetaBox() + +

                                                                                            + + +

                                                                                            Returns an array describing a meta box.

                                                                                            + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SectionID + : string +
                                                                                            +
                                                                                            +

                                                                                            Parent Section ID.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_ID + : string +
                                                                                            +
                                                                                            +

                                                                                            Unique ID suffix.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_Title + : string +
                                                                                            +
                                                                                            +

                                                                                            Title for the meta box.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_CallbackFunctionName + : string +
                                                                                            +
                                                                                            +

                                                                                            Class method name for callback.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + array<string|int, mixed> + — +

                                                                                            meta box description to be able to append a meta box to the output.

                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addNewline() + +

                                                                                            + + +

                                                                                            Returns a line break to start a new line.

                                                                                            + + + protected + addNewline() : string + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addNumBox() + +

                                                                                            + + +

                                                                                            Returns the html tag for an input [type = num].

                                                                                            + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre load the input field.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_in_Min + : int +
                                                                                            +
                                                                                            +

                                                                                            Minimum value.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_int_Max + : int +
                                                                                            +
                                                                                            +

                                                                                            Maximum value.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_bool_Deci + : bool + = false
                                                                                            +
                                                                                            +

                                                                                            true if 0.1 steps and floating to string, false if integer (default)

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 2.1.4 + +

                                                                                            step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +

                                                                                            Edited:

                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addSection() + +

                                                                                            + + +

                                                                                            Returns an array describing a sub page section.

                                                                                            + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_ID + : string +
                                                                                            +
                                                                                            +

                                                                                            Unique ID suffix.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_Title + : string +
                                                                                            +
                                                                                            +

                                                                                            Title of the section.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_int_SettingsContainerIndex + : int +
                                                                                            +
                                                                                            +

                                                                                            Settings Container Index.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_bool_hasSubmitButton + : bool + = true
                                                                                            +
                                                                                            +

                                                                                            Should a Submit Button be displayed for this section, default: true.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + array<string|int, mixed> + — +

                                                                                            Array describing the section.

                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addSelectBox() + +

                                                                                            + + +

                                                                                            Returns the html tag for a select box.

                                                                                            + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre select the current value.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_arr_Options + : array<string|int, mixed> +
                                                                                            +
                                                                                            +

                                                                                            Possible options to be selected.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addText() + +

                                                                                            + + +

                                                                                            Returns a simple text inside html <span> text.

                                                                                            + + + protected + addText(string $p_str_Text) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_Text + : string +
                                                                                            +
                                                                                            +

                                                                                            Message to be surrounded with simple html tag (span).

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addTextArea() + +

                                                                                            + + +

                                                                                            Returns the html tag for a text area.

                                                                                            + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre fill the text area.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + addTextBox() + +

                                                                                            + + +

                                                                                            Returns the html tag for an input [type = text].

                                                                                            + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingName + : string +
                                                                                            +
                                                                                            +

                                                                                            Name of the Settings key to pre load the input field.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_str_MaxLength + : int + = 999
                                                                                            +
                                                                                            +

                                                                                            Maximum length of the input, default 999 characters.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_bool_Readonly + : bool + = false
                                                                                            +
                                                                                            +

                                                                                            Set the input to be read only, default false.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + $p_bool_Hidden + : bool + = false
                                                                                            +
                                                                                            +

                                                                                            Set the input to be hidden, default false.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + getMetaBoxes() + +

                                                                                            + + +

                                                                                            Returns an array of all registered meta boxes for each section of the sub page.

                                                                                            + + + protected + getMetaBoxes() : array<string|int, mixed> + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + array<string|int, mixed> + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + getSections() + +

                                                                                            + + +

                                                                                            Returns an array of all registered sections for the sub page.

                                                                                            + + + protected + getSections() : array<string|int, mixed> + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + array<string|int, mixed> + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + getSubPageSlug() + +

                                                                                            + + +

                                                                                            Returns the unique slug of the sub page.

                                                                                            + + + protected + getSubPageSlug() : string + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + getSubPageTitle() + +

                                                                                            + + +

                                                                                            Returns the title of the sub page.

                                                                                            + + + protected + getSubPageTitle() : string + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + string + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + LoadSetting() + +

                                                                                            + + +

                                                                                            Loads specific setting and returns an array with the keys [id, name, value].

                                                                                            + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_SettingKeyName + : string +
                                                                                            +
                                                                                            +

                                                                                            Settings Array key name.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + array<string|int, mixed> + — +

                                                                                            Contains Settings ID, Settings Name and Settings Value.

                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + appendScripts() + +

                                                                                            + + +

                                                                                            Append javascript and css files for specific sub page.

                                                                                            + + + private + appendScripts() : mixed + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + registerMetaBoxes() + +

                                                                                            + + +

                                                                                            Registers all Meta boxes for a sub page.

                                                                                            + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                            + +
                                                                                            Parameters
                                                                                            +
                                                                                            +
                                                                                            + $p_str_ParentID + : string +
                                                                                            +
                                                                                            +

                                                                                            Parent section unique id.

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + mixed + — +
                                                                                            + + +
                                                                                            +
                                                                                            +

                                                                                            + saveSettings() + +

                                                                                            + + +

                                                                                            Save all Plugin settings.

                                                                                            + + + private + saveSettings() : bool + +
                                                                                            + + + +
                                                                                            + Tags + +
                                                                                            +
                                                                                            +
                                                                                            + author +
                                                                                            +
                                                                                            + +

                                                                                            Stefan Herndler

                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + since +
                                                                                            +
                                                                                            + 1.5.0 + +
                                                                                            + +
                                                                                            +
                                                                                            + +
                                                                                            Return values
                                                                                            + bool + — +
                                                                                            + + +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            +

                                                                                            Search results

                                                                                            + +
                                                                                            +
                                                                                            +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + + +
                                                                                              + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Init.html b/docs/classes/MCI-Footnotes-Layout-Init.html new file mode 100644 index 0000000..0ec0d29 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Init.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                              +

                                                                                              Documentation

                                                                                              + + + + + +
                                                                                              + +
                                                                                              +
                                                                                              + + + + +
                                                                                              + + +
                                                                                              +

                                                                                              + MCI_Footnotes_Layout_Init + + + + +

                                                                                              + + + +

                                                                                              Handles the Settings interface of the Plugin.

                                                                                              + +
                                                                                              + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + +

                                                                                              + Table of Contents + +

                                                                                              + +
                                                                                              +
                                                                                              + C_STR_MAIN_MENU_SLUG + +  = "mfmmf" +
                                                                                              +
                                                                                              Slug for the Plugin main menu.
                                                                                              + +
                                                                                              + C_STR_MAIN_MENU_TITLE + +  = "ManFisher" +
                                                                                              +
                                                                                              Plugin main menu name.
                                                                                              + +
                                                                                              + $a_arr_SubPageClasses + +  : array<string|int, mixed> +
                                                                                              +
                                                                                              + +
                                                                                              + __construct() + +  : mixed +
                                                                                              +
                                                                                              Class Constructor. Initializes all WordPress hooks for the Plugin Settings.
                                                                                              + +
                                                                                              + displayOtherPlugins() + +  : mixed +
                                                                                              +
                                                                                              Displays other Plugins from the developers.
                                                                                              + +
                                                                                              + getPluginMetaInformation() + +  : mixed +
                                                                                              +
                                                                                              AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.
                                                                                              + +
                                                                                              + initializeSettings() + +  : mixed +
                                                                                              +
                                                                                              Initializes all sub pages and registers the settings.
                                                                                              + +
                                                                                              + registerMainMenu() + +  : mixed +
                                                                                              +
                                                                                              Registers the new main menu for the WordPress dashboard.
                                                                                              + +
                                                                                              + registerSubPages() + +  : mixed +
                                                                                              +
                                                                                              Registers all SubPages for this Plugin.
                                                                                              + +
                                                                                              + + + + +
                                                                                              +

                                                                                              + Constants + +

                                                                                              +
                                                                                              +

                                                                                              + C_STR_MAIN_MENU_SLUG + +

                                                                                              + + + +

                                                                                              Slug for the Plugin main menu.

                                                                                              + + + public + string + C_STR_MAIN_MENU_SLUG + = "mfmmf" + + + +
                                                                                              + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              +

                                                                                              + C_STR_MAIN_MENU_TITLE + +

                                                                                              + + + +

                                                                                              Plugin main menu name.

                                                                                              + + + public + string + C_STR_MAIN_MENU_TITLE + = "ManFisher" + + + +
                                                                                              + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + +
                                                                                              +

                                                                                              + Properties + +

                                                                                              +
                                                                                              +

                                                                                              + $a_arr_SubPageClasses + + + +

                                                                                              + + + + + private + array<string|int, mixed> + $a_arr_SubPageClasses + = array() + +
                                                                                              + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              +

                                                                                              + Methods + +

                                                                                              +
                                                                                              +

                                                                                              + __construct() + +

                                                                                              + + +

                                                                                              Class Constructor. Initializes all WordPress hooks for the Plugin Settings.

                                                                                              + + + public + __construct() : mixed + +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              +

                                                                                              + displayOtherPlugins() + +

                                                                                              + + +

                                                                                              Displays other Plugins from the developers.

                                                                                              + + + public + displayOtherPlugins() : mixed + +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              +

                                                                                              + getPluginMetaInformation() + +

                                                                                              + + +

                                                                                              AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.

                                                                                              + + + public + getPluginMetaInformation() : mixed + +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              +

                                                                                              + initializeSettings() + +

                                                                                              + + +

                                                                                              Initializes all sub pages and registers the settings.

                                                                                              + + + public + initializeSettings() : mixed + +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              +

                                                                                              + registerMainMenu() + +

                                                                                              + + +

                                                                                              Registers the new main menu for the WordPress dashboard.

                                                                                              + + + public + registerMainMenu() : mixed + +

                                                                                              Registers all sub menu pages for the new main menu.

                                                                                              +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + see +
                                                                                              +
                                                                                              + http://codex.wordpress.org/Function_Reference/add_menu_page + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              +

                                                                                              + registerSubPages() + +

                                                                                              + + +

                                                                                              Registers all SubPages for this Plugin.

                                                                                              + + + private + registerSubPages() : mixed + +
                                                                                              + + + +
                                                                                              + Tags + +
                                                                                              +
                                                                                              +
                                                                                              + author +
                                                                                              +
                                                                                              + +

                                                                                              Stefan Herndler

                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + since +
                                                                                              +
                                                                                              + 1.5.0 + +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              Return values
                                                                                              + mixed + — +
                                                                                              + + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              +

                                                                                              Search results

                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + + +
                                                                                                + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Settings.html b/docs/classes/MCI-Footnotes-Layout-Settings.html new file mode 100644 index 0000000..5b4da79 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Settings.html @@ -0,0 +1,3757 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                +

                                                                                                Documentation

                                                                                                + + + + + +
                                                                                                + +
                                                                                                +
                                                                                                + + + + +
                                                                                                + + +
                                                                                                +

                                                                                                + MCI_Footnotes_Layout_Settings + + + extends MCI_Footnotes_LayoutEngine + + + + +

                                                                                                + + + +

                                                                                                Displays and handles all Settings of the Plugin.

                                                                                                + +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + + + + + + +

                                                                                                + Table of Contents + +

                                                                                                + +
                                                                                                +
                                                                                                + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Stores all Sections for the child sub page.
                                                                                                + +
                                                                                                + $a_str_SubPageHook + +  : null|string +
                                                                                                +
                                                                                                Stores the Hook connection string for the child sub page.
                                                                                                + +
                                                                                                + CustomCSS() + +  : mixed +
                                                                                                +
                                                                                                Displays the custom css box.
                                                                                                + +
                                                                                                + CustomCSSMigration() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + CustomCSSNew() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + Description() + +  : mixed +
                                                                                                +
                                                                                                Output the Description of a section. May be overwritten in any section.
                                                                                                + +
                                                                                                + displayContent() + +  : mixed +
                                                                                                +
                                                                                                Displays the content of specific sub page.
                                                                                                + +
                                                                                                + Donate() + +  : mixed +
                                                                                                +
                                                                                                Displays all Donate button to support the developers.
                                                                                                + +
                                                                                                + Excerpts() + +  : mixed +
                                                                                                +
                                                                                                Displays the excerpt setting
                                                                                                + +
                                                                                                + getPriority() + +  : int +
                                                                                                +
                                                                                                Returns a Priority index. Lower numbers have a higher Priority.
                                                                                                + +
                                                                                                + Help() + +  : mixed +
                                                                                                +
                                                                                                Displays a short introduction of the Plugin.
                                                                                                + +
                                                                                                + HyperlinkArrow() + +  : mixed +
                                                                                                +
                                                                                                Displays all settings for the prepended symbol
                                                                                                + +
                                                                                                + LookupHooks() + +  : mixed +
                                                                                                +
                                                                                                Displays available Hooks to look for Footnote short codes.
                                                                                                + +
                                                                                                + Love() + +  : mixed +
                                                                                                +
                                                                                                Displays all settings for 'I love Footnotes'.
                                                                                                + +
                                                                                                + MouseOverBox() + +  : mixed +
                                                                                                +
                                                                                                Displays all settings for the footnotes mouse-over box.
                                                                                                + +
                                                                                                + MouseOverBoxAppearance() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + MouseOverBoxDimensions() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + MouseOverBoxPosition() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + MouseOverBoxText() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + MouseOverBoxTiming() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + MouseOverBoxTruncation() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + Numbering() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + ReferenceContainer() + +  : mixed +
                                                                                                +
                                                                                                Displays all settings for the reference container.
                                                                                                + +
                                                                                                + registerSections() + +  : mixed +
                                                                                                +
                                                                                                Registers all sections for a sub page.
                                                                                                + +
                                                                                                + registerSubPage() + +  : mixed +
                                                                                                +
                                                                                                Registers a sub page.
                                                                                                + +
                                                                                                + Scrolling() + +  : mixed +
                                                                                                +
                                                                                                + +
                                                                                                + StartEnd() + +  : mixed +
                                                                                                +
                                                                                                Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior
                                                                                                + +
                                                                                                + Superscript() + +  : mixed +
                                                                                                +
                                                                                                Displays all settings for the footnote referrers
                                                                                                + +
                                                                                                + addCheckbox() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for an input [type = checkbox].
                                                                                                + +
                                                                                                + addColorSelection() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for an input [type = text] with color selection class.
                                                                                                + +
                                                                                                + addLabel() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for an input/select label.
                                                                                                + +
                                                                                                + addLineSpace() + +  : string +
                                                                                                +
                                                                                                Returns a line break to have a space between two lines.
                                                                                                + +
                                                                                                + addMetaBox() + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Returns an array describing a meta box.
                                                                                                + +
                                                                                                + addNewline() + +  : string +
                                                                                                +
                                                                                                Returns a line break to start a new line.
                                                                                                + +
                                                                                                + addNumBox() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for an input [type = num].
                                                                                                + +
                                                                                                + addSection() + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Returns an array describing a sub page section.
                                                                                                + +
                                                                                                + addSelectBox() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for a select box.
                                                                                                + +
                                                                                                + addText() + +  : string +
                                                                                                +
                                                                                                Returns a simple text inside html <span> text.
                                                                                                + +
                                                                                                + addTextArea() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for a text area.
                                                                                                + +
                                                                                                + addTextBox() + +  : string +
                                                                                                +
                                                                                                Returns the html tag for an input [type = text].
                                                                                                + +
                                                                                                + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Returns an array of all registered meta boxes for each section of the sub page.
                                                                                                + +
                                                                                                + getSections() + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Returns an array of all registered sections for the sub page.
                                                                                                + +
                                                                                                + getSubPageSlug() + +  : string +
                                                                                                +
                                                                                                Returns the unique slug of the sub page.
                                                                                                + +
                                                                                                + getSubPageTitle() + +  : string +
                                                                                                +
                                                                                                Returns the title of the sub page.
                                                                                                + +
                                                                                                + LoadSetting() + +  : array<string|int, mixed> +
                                                                                                +
                                                                                                Loads specific setting and returns an array with the keys [id, name, value].
                                                                                                + +
                                                                                                + appendScripts() + +  : mixed +
                                                                                                +
                                                                                                Append javascript and css files for specific sub page.
                                                                                                + +
                                                                                                + registerMetaBoxes() + +  : mixed +
                                                                                                +
                                                                                                Registers all Meta boxes for a sub page.
                                                                                                + +
                                                                                                + saveSettings() + +  : bool +
                                                                                                +
                                                                                                Save all Plugin settings.
                                                                                                + +
                                                                                                + + + + + + +
                                                                                                +

                                                                                                + Properties + +

                                                                                                +
                                                                                                +

                                                                                                + $a_arr_Sections + + + +

                                                                                                + + +

                                                                                                Stores all Sections for the child sub page.

                                                                                                + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                +

                                                                                                + $a_str_SubPageHook + + + +

                                                                                                + + +

                                                                                                Stores the Hook connection string for the child sub page.

                                                                                                + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                +

                                                                                                + Methods + +

                                                                                                +
                                                                                                +

                                                                                                + CustomCSS() + +

                                                                                                + + +

                                                                                                Displays the custom css box.

                                                                                                + + + public + CustomCSS() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited:

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.6 + +

                                                                                                drop localized notices for CSS classes as the number increased to 16 +list directly in the template, as CSS is in English anyway

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.2 + +

                                                                                                migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.3.0 + +

                                                                                                say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.5.1 + +

                                                                                                mention validity while visible, thanks to @rkupadhya bug report

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + see +
                                                                                                +
                                                                                                + +

                                                                                                templates/dashboard/customize-css.html +2020-12-09T1113+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + CustomCSSMigration() + +

                                                                                                + + + + + public + CustomCSSMigration() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + CustomCSSNew() + +

                                                                                                + + + + + public + CustomCSSNew() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Description() + +

                                                                                                + + +

                                                                                                Output the Description of a section. May be overwritten in any section.

                                                                                                + + + public + Description() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + displayContent() + +

                                                                                                + + +

                                                                                                Displays the content of specific sub page.

                                                                                                + + + public + displayContent() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Donate() + +

                                                                                                + + +

                                                                                                Displays all Donate button to support the developers.

                                                                                                + + + public + Donate() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Excerpts() + +

                                                                                                + + +

                                                                                                Displays the excerpt setting

                                                                                                + + + public + Excerpts() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited heading 2020-12-12T1453+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.1 + +

                                                                                                more settings and notices, thanks to @nikelaos

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                dedicated to the excerpt setting and its notices 2020-12-12T1454+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + 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 + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + getPriority() + +

                                                                                                + + +

                                                                                                Returns a Priority index. Lower numbers have a higher Priority.

                                                                                                + + + public + getPriority() : int + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + int + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Help() + +

                                                                                                + + +

                                                                                                Displays a short introduction of the Plugin.

                                                                                                + + + public + Help() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + HyperlinkArrow() + +

                                                                                                + + +

                                                                                                Displays all settings for the prepended symbol

                                                                                                + + + public + HyperlinkArrow() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited heading for v2.0.4

                                                                                                +

                                                                                                The former 'hyperlink arrow', incompatible with combined identical footnotes, +became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics +of the footnote number.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.4 + +

                                                                                                moved to Settings > Reference container > Display a backlink symbol

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.1 + +

                                                                                                and 2.2.4 back here

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + LookupHooks() + +

                                                                                                + + +

                                                                                                Displays available Hooks to look for Footnote short codes.

                                                                                                + + + public + LookupHooks() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.5 + +

                                                                                                Edited:

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.1 + +

                                                                                                priority level setting for the_content 2020-11-16T2152+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.4 + +

                                                                                                priority level settings for the other hooks 2020-11-19T1421+0100

                                                                                                +

                                                                                                priority level was initially hard-coded default +shows "9223372036854775807" in the numbox +empty should be interpreted as PHP_INT_MAX, +but a numbox cannot be set to empty: https://github.com/Modernizr/Modernizr/issues/171 +define -1 as PHP_INT_MAX instead

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.9 + +

                                                                                                removed the warning about the widget text hook 2020-12-25T0348+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.9 + +

                                                                                                added guidance for the widget text hook 2020-12-25T0353+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Love() + +

                                                                                                + + +

                                                                                                Displays all settings for 'I love Footnotes'.

                                                                                                + + + public + Love() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited:

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                position-sensitive placeholders to support more locales 2020-12-11T0432+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                more options 2020-12-11T0432+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBox() + +

                                                                                                + + +

                                                                                                Displays all settings for the footnotes mouse-over box.

                                                                                                + + + public + MouseOverBox() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.2 + +

                                                                                                Edited:

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                5 parts to address increased settings number

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.5 + +

                                                                                                position settings for alternative tooltips

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxAppearance() + +

                                                                                                + + + + + public + MouseOverBoxAppearance() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxDimensions() + +

                                                                                                + + + + + public + MouseOverBoxDimensions() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxPosition() + +

                                                                                                + + + + + public + MouseOverBoxPosition() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxText() + +

                                                                                                + + + + + public + MouseOverBoxText() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxTiming() + +

                                                                                                + + + + + public + MouseOverBoxTiming() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + MouseOverBoxTruncation() + +

                                                                                                + + + + + public + MouseOverBoxTruncation() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Numbering() + +

                                                                                                + + + + + public + Numbering() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + ReferenceContainer() + +

                                                                                                + + +

                                                                                                Displays all settings for the reference container.

                                                                                                + + + public + ReferenceContainer() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Completed:

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.4: + +

                                                                                                layout and typography options 2020-11-30T0548+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.5 + +

                                                                                                options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + link +
                                                                                                +
                                                                                                + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + registerSections() + +

                                                                                                + + +

                                                                                                Registers all sections for a sub page.

                                                                                                + + + public + registerSections() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + registerSubPage() + +

                                                                                                + + +

                                                                                                Registers a sub page.

                                                                                                + + + public + registerSubPage() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Scrolling() + +

                                                                                                + + + + + public + Scrolling() : mixed + + + + + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + StartEnd() + +

                                                                                                + + +

                                                                                                Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior

                                                                                                + + + public + StartEnd() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited heading 2020-12-12T1412+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                start/end short codes: more predefined options 2020-12-12T1412+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                3 boxes for clarity 2020-12-12T1422+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.5 + +

                                                                                                support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.4.0 + +

                                                                                                added warning about Block Editor escapement disruption 2021-01-02T2324+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.4.0 + +

                                                                                                removed the HTML comment tag option 2021-01-02T2325+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.5.0 + +

                                                                                                Shortcode syntax validation: add more information around the setting, thanks to @andreasra

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + link +
                                                                                                +
                                                                                                + https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + +
                                                                                                +
                                                                                                + link +
                                                                                                +
                                                                                                + https://wordpress.org/support/topic/add-support-for-ibid-notation/ + +
                                                                                                +
                                                                                                + link +
                                                                                                +
                                                                                                + https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + Superscript() + +

                                                                                                + + +

                                                                                                Displays all settings for the footnote referrers

                                                                                                + + + public + Superscript() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +

                                                                                                Edited heading 2020-12-12T1513+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.1 + +

                                                                                                option for superscript (optionally baseline referrers)

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.2.0 + +

                                                                                                option for link element moved here 2020-12-12T1514+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addCheckbox() + +

                                                                                                + + +

                                                                                                Returns the html tag for an input [type = checkbox].

                                                                                                + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre load the input field.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addColorSelection() + +

                                                                                                + + +

                                                                                                Returns the html tag for an input [type = text] with color selection class.

                                                                                                + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre load the input field.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.6 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addLabel() + +

                                                                                                + + +

                                                                                                Returns the html tag for an input/select label.

                                                                                                + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to connect the Label with the input/select field.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_Caption + : string +
                                                                                                +
                                                                                                +

                                                                                                Label caption.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.6 + +

                                                                                                no colon

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +

                                                                                                Edited 2020-12-01T0159+0100..

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addLineSpace() + +

                                                                                                + + +

                                                                                                Returns a line break to have a space between two lines.

                                                                                                + + + protected + addLineSpace() : string + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addMetaBox() + +

                                                                                                + + +

                                                                                                Returns an array describing a meta box.

                                                                                                + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SectionID + : string +
                                                                                                +
                                                                                                +

                                                                                                Parent Section ID.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_ID + : string +
                                                                                                +
                                                                                                +

                                                                                                Unique ID suffix.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_Title + : string +
                                                                                                +
                                                                                                +

                                                                                                Title for the meta box.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_CallbackFunctionName + : string +
                                                                                                +
                                                                                                +

                                                                                                Class method name for callback.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + array<string|int, mixed> + — +

                                                                                                meta box description to be able to append a meta box to the output.

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addNewline() + +

                                                                                                + + +

                                                                                                Returns a line break to start a new line.

                                                                                                + + + protected + addNewline() : string + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addNumBox() + +

                                                                                                + + +

                                                                                                Returns the html tag for an input [type = num].

                                                                                                + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre load the input field.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_in_Min + : int +
                                                                                                +
                                                                                                +

                                                                                                Minimum value.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_int_Max + : int +
                                                                                                +
                                                                                                +

                                                                                                Maximum value.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_bool_Deci + : bool + = false
                                                                                                +
                                                                                                +

                                                                                                true if 0.1 steps and floating to string, false if integer (default)

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.4 + +

                                                                                                step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +

                                                                                                Edited:

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addSection() + +

                                                                                                + + +

                                                                                                Returns an array describing a sub page section.

                                                                                                + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_ID + : string +
                                                                                                +
                                                                                                +

                                                                                                Unique ID suffix.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_Title + : string +
                                                                                                +
                                                                                                +

                                                                                                Title of the section.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_int_SettingsContainerIndex + : int +
                                                                                                +
                                                                                                +

                                                                                                Settings Container Index.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_bool_hasSubmitButton + : bool + = true
                                                                                                +
                                                                                                +

                                                                                                Should a Submit Button be displayed for this section, default: true.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + array<string|int, mixed> + — +

                                                                                                Array describing the section.

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addSelectBox() + +

                                                                                                + + +

                                                                                                Returns the html tag for a select box.

                                                                                                + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre select the current value.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_arr_Options + : array<string|int, mixed> +
                                                                                                +
                                                                                                +

                                                                                                Possible options to be selected.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addText() + +

                                                                                                + + +

                                                                                                Returns a simple text inside html <span> text.

                                                                                                + + + protected + addText(string $p_str_Text) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_Text + : string +
                                                                                                +
                                                                                                +

                                                                                                Message to be surrounded with simple html tag (span).

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addTextArea() + +

                                                                                                + + +

                                                                                                Returns the html tag for a text area.

                                                                                                + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre fill the text area.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + addTextBox() + +

                                                                                                + + +

                                                                                                Returns the html tag for an input [type = text].

                                                                                                + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingName + : string +
                                                                                                +
                                                                                                +

                                                                                                Name of the Settings key to pre load the input field.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_str_MaxLength + : int + = 999
                                                                                                +
                                                                                                +

                                                                                                Maximum length of the input, default 999 characters.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_bool_Readonly + : bool + = false
                                                                                                +
                                                                                                +

                                                                                                Set the input to be read only, default false.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + $p_bool_Hidden + : bool + = false
                                                                                                +
                                                                                                +

                                                                                                Set the input to be hidden, default false.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + getMetaBoxes() + +

                                                                                                + + +

                                                                                                Returns an array of all registered meta boxes for each section of the sub page.

                                                                                                + + + protected + getMetaBoxes() : array<string|int, mixed> + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.0.0 + +

                                                                                                discontinued

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.0.4 + +

                                                                                                restored to meet user demand for arrow symbol semantics

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.4 + +

                                                                                                discontinued, content moved to Settings > Reference container > Display a backlink symbol

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.0.4 + +

                                                                                                to reflect changes in meta box label display since WPv5.5 +spans need position:fixed and become unlocalizable +fix: logo is kept only in the label that doesn’t need to be translated: +Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.6 + +

                                                                                                / 2.2.0 tabs reordered and renamed

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + see +
                                                                                                +
                                                                                                + details + +

                                                                                                in class/config.php

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + array<string|int, mixed> + — +

                                                                                                Edited for 2.0.0 and later.

                                                                                                +

                                                                                                HyperlinkArrow meta box:

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + getSections() + +

                                                                                                + + +

                                                                                                Returns an array of all registered sections for the sub page.

                                                                                                + + + protected + getSections() : array<string|int, mixed> + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.6 + +

                                                                                                tabs reordered and renamed

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 2.1.6 + +

                                                                                                removed if statement around expert tab

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + link +
                                                                                                +
                                                                                                + https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + array<string|int, mixed> + — +

                                                                                                Edited:

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + getSubPageSlug() + +

                                                                                                + + +

                                                                                                Returns the unique slug of the sub page.

                                                                                                + + + protected + getSubPageSlug() : string + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + getSubPageTitle() + +

                                                                                                + + +

                                                                                                Returns the title of the sub page.

                                                                                                + + + protected + getSubPageTitle() : string + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + string + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + LoadSetting() + +

                                                                                                + + +

                                                                                                Loads specific setting and returns an array with the keys [id, name, value].

                                                                                                + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_SettingKeyName + : string +
                                                                                                +
                                                                                                +

                                                                                                Settings Array key name.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + array<string|int, mixed> + — +

                                                                                                Contains Settings ID, Settings Name and Settings Value.

                                                                                                +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + appendScripts() + +

                                                                                                + + +

                                                                                                Append javascript and css files for specific sub page.

                                                                                                + + + private + appendScripts() : mixed + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + registerMetaBoxes() + +

                                                                                                + + +

                                                                                                Registers all Meta boxes for a sub page.

                                                                                                + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                                + +
                                                                                                Parameters
                                                                                                +
                                                                                                +
                                                                                                + $p_str_ParentID + : string +
                                                                                                +
                                                                                                +

                                                                                                Parent section unique id.

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + mixed + — +
                                                                                                + + +
                                                                                                +
                                                                                                +

                                                                                                + saveSettings() + +

                                                                                                + + +

                                                                                                Save all Plugin settings.

                                                                                                + + + private + saveSettings() : bool + +
                                                                                                + + + +
                                                                                                + Tags + +
                                                                                                +
                                                                                                +
                                                                                                + author +
                                                                                                +
                                                                                                + +

                                                                                                Stefan Herndler

                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + since +
                                                                                                +
                                                                                                + 1.5.0 + +
                                                                                                + +
                                                                                                +
                                                                                                + +
                                                                                                Return values
                                                                                                + bool + — +
                                                                                                + + +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                +

                                                                                                Search results

                                                                                                + +
                                                                                                +
                                                                                                +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + + + + diff --git a/docs/classes/MCI-Footnotes-LayoutEngine.html b/docs/classes/MCI-Footnotes-LayoutEngine.html new file mode 100644 index 0000000..ff9e0f2 --- /dev/null +++ b/docs/classes/MCI-Footnotes-LayoutEngine.html @@ -0,0 +1,2222 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                  +

                                                                                                  Documentation

                                                                                                  + + + + + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + +
                                                                                                  + + +
                                                                                                  +

                                                                                                  + MCI_Footnotes_LayoutEngine + + + + +

                                                                                                  + + + +

                                                                                                  Layout Engine for the administration dashboard.

                                                                                                  + +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + +

                                                                                                  + Table of Contents + +

                                                                                                  + +
                                                                                                  +
                                                                                                  + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Stores all Sections for the child sub page.
                                                                                                  + +
                                                                                                  + $a_str_SubPageHook + +  : null|string +
                                                                                                  +
                                                                                                  Stores the Hook connection string for the child sub page.
                                                                                                  + +
                                                                                                  + Description() + +  : mixed +
                                                                                                  +
                                                                                                  Output the Description of a section. May be overwritten in any section.
                                                                                                  + +
                                                                                                  + displayContent() + +  : mixed +
                                                                                                  +
                                                                                                  Displays the content of specific sub page.
                                                                                                  + +
                                                                                                  + getPriority() + +  : int +
                                                                                                  +
                                                                                                  Returns a Priority index. Lower numbers have a higher Priority.
                                                                                                  + +
                                                                                                  + registerSections() + +  : mixed +
                                                                                                  +
                                                                                                  Registers all sections for a sub page.
                                                                                                  + +
                                                                                                  + registerSubPage() + +  : mixed +
                                                                                                  +
                                                                                                  Registers a sub page.
                                                                                                  + +
                                                                                                  + addCheckbox() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for an input [type = checkbox].
                                                                                                  + +
                                                                                                  + addColorSelection() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for an input [type = text] with color selection class.
                                                                                                  + +
                                                                                                  + addLabel() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for an input/select label.
                                                                                                  + +
                                                                                                  + addLineSpace() + +  : string +
                                                                                                  +
                                                                                                  Returns a line break to have a space between two lines.
                                                                                                  + +
                                                                                                  + addMetaBox() + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Returns an array describing a meta box.
                                                                                                  + +
                                                                                                  + addNewline() + +  : string +
                                                                                                  +
                                                                                                  Returns a line break to start a new line.
                                                                                                  + +
                                                                                                  + addNumBox() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for an input [type = num].
                                                                                                  + +
                                                                                                  + addSection() + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Returns an array describing a sub page section.
                                                                                                  + +
                                                                                                  + addSelectBox() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for a select box.
                                                                                                  + +
                                                                                                  + addText() + +  : string +
                                                                                                  +
                                                                                                  Returns a simple text inside html <span> text.
                                                                                                  + +
                                                                                                  + addTextArea() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for a text area.
                                                                                                  + +
                                                                                                  + addTextBox() + +  : string +
                                                                                                  +
                                                                                                  Returns the html tag for an input [type = text].
                                                                                                  + +
                                                                                                  + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Returns an array of all registered meta boxes.
                                                                                                  + +
                                                                                                  + getSections() + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Returns an array of all registered sections for a sub page.
                                                                                                  + +
                                                                                                  + getSubPageSlug() + +  : string +
                                                                                                  +
                                                                                                  Returns the unique slug of the child sub page.
                                                                                                  + +
                                                                                                  + getSubPageTitle() + +  : string +
                                                                                                  +
                                                                                                  Returns the title of the child sub page.
                                                                                                  + +
                                                                                                  + LoadSetting() + +  : array<string|int, mixed> +
                                                                                                  +
                                                                                                  Loads specific setting and returns an array with the keys [id, name, value].
                                                                                                  + +
                                                                                                  + appendScripts() + +  : mixed +
                                                                                                  +
                                                                                                  Append javascript and css files for specific sub page.
                                                                                                  + +
                                                                                                  + registerMetaBoxes() + +  : mixed +
                                                                                                  +
                                                                                                  Registers all Meta boxes for a sub page.
                                                                                                  + +
                                                                                                  + saveSettings() + +  : bool +
                                                                                                  +
                                                                                                  Save all Plugin settings.
                                                                                                  + +
                                                                                                  + + + + + + +
                                                                                                  +

                                                                                                  + Properties + +

                                                                                                  +
                                                                                                  +

                                                                                                  + $a_arr_Sections + + + +

                                                                                                  + + +

                                                                                                  Stores all Sections for the child sub page.

                                                                                                  + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  +

                                                                                                  + $a_str_SubPageHook + + + +

                                                                                                  + + +

                                                                                                  Stores the Hook connection string for the child sub page.

                                                                                                  + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +

                                                                                                  + Methods + +

                                                                                                  +
                                                                                                  +

                                                                                                  + Description() + +

                                                                                                  + + +

                                                                                                  Output the Description of a section. May be overwritten in any section.

                                                                                                  + + + public + Description() : mixed + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + displayContent() + +

                                                                                                  + + +

                                                                                                  Displays the content of specific sub page.

                                                                                                  + + + public + displayContent() : mixed + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + getPriority() + +

                                                                                                  + + +

                                                                                                  Returns a Priority index. Lower numbers have a higher Priority.

                                                                                                  + + + public + abstract getPriority() : int + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + int + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + registerSections() + +

                                                                                                  + + +

                                                                                                  Registers all sections for a sub page.

                                                                                                  + + + public + registerSections() : mixed + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + registerSubPage() + +

                                                                                                  + + +

                                                                                                  Registers a sub page.

                                                                                                  + + + public + registerSubPage() : mixed + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addCheckbox() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for an input [type = checkbox].

                                                                                                  + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addColorSelection() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for an input [type = text] with color selection class.

                                                                                                  + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.6 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addLabel() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for an input/select label.

                                                                                                  + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to connect the Label with the input/select field.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_Caption + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Label caption.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 2.1.6 + +

                                                                                                  no colon

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +

                                                                                                  Edited 2020-12-01T0159+0100..

                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addLineSpace() + +

                                                                                                  + + +

                                                                                                  Returns a line break to have a space between two lines.

                                                                                                  + + + protected + addLineSpace() : string + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addMetaBox() + +

                                                                                                  + + +

                                                                                                  Returns an array describing a meta box.

                                                                                                  + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SectionID + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Parent Section ID.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_ID + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Unique ID suffix.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_Title + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Title for the meta box.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_CallbackFunctionName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Class method name for callback.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + array<string|int, mixed> + — +

                                                                                                  meta box description to be able to append a meta box to the output.

                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addNewline() + +

                                                                                                  + + +

                                                                                                  Returns a line break to start a new line.

                                                                                                  + + + protected + addNewline() : string + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addNumBox() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for an input [type = num].

                                                                                                  + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_in_Min + : int +
                                                                                                  +
                                                                                                  +

                                                                                                  Minimum value.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_int_Max + : int +
                                                                                                  +
                                                                                                  +

                                                                                                  Maximum value.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_bool_Deci + : bool + = false
                                                                                                  +
                                                                                                  +

                                                                                                  true if 0.1 steps and floating to string, false if integer (default)

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 2.1.4 + +

                                                                                                  step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +

                                                                                                  Edited:

                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addSection() + +

                                                                                                  + + +

                                                                                                  Returns an array describing a sub page section.

                                                                                                  + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_ID + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Unique ID suffix.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_Title + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Title of the section.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_int_SettingsContainerIndex + : int +
                                                                                                  +
                                                                                                  +

                                                                                                  Settings Container Index.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_bool_hasSubmitButton + : bool + = true
                                                                                                  +
                                                                                                  +

                                                                                                  Should a Submit Button be displayed for this section, default: true.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + array<string|int, mixed> + — +

                                                                                                  Array describing the section.

                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addSelectBox() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for a select box.

                                                                                                  + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre select the current value.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_arr_Options + : array<string|int, mixed> +
                                                                                                  +
                                                                                                  +

                                                                                                  Possible options to be selected.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addText() + +

                                                                                                  + + +

                                                                                                  Returns a simple text inside html <span> text.

                                                                                                  + + + protected + addText(string $p_str_Text) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_Text + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Message to be surrounded with simple html tag (span).

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addTextArea() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for a text area.

                                                                                                  + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre fill the text area.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + addTextBox() + +

                                                                                                  + + +

                                                                                                  Returns the html tag for an input [type = text].

                                                                                                  + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_str_MaxLength + : int + = 999
                                                                                                  +
                                                                                                  +

                                                                                                  Maximum length of the input, default 999 characters.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_bool_Readonly + : bool + = false
                                                                                                  +
                                                                                                  +

                                                                                                  Set the input to be read only, default false.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + $p_bool_Hidden + : bool + = false
                                                                                                  +
                                                                                                  +

                                                                                                  Set the input to be hidden, default false.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + getMetaBoxes() + +

                                                                                                  + + +

                                                                                                  Returns an array of all registered meta boxes.

                                                                                                  + + + protected + abstract getMetaBoxes() : array<string|int, mixed> + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + array<string|int, mixed> + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + getSections() + +

                                                                                                  + + +

                                                                                                  Returns an array of all registered sections for a sub page.

                                                                                                  + + + protected + abstract getSections() : array<string|int, mixed> + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + array<string|int, mixed> + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + getSubPageSlug() + +

                                                                                                  + + +

                                                                                                  Returns the unique slug of the child sub page.

                                                                                                  + + + protected + abstract getSubPageSlug() : string + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + getSubPageTitle() + +

                                                                                                  + + +

                                                                                                  Returns the title of the child sub page.

                                                                                                  + + + protected + abstract getSubPageTitle() : string + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + string + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + LoadSetting() + +

                                                                                                  + + +

                                                                                                  Loads specific setting and returns an array with the keys [id, name, value].

                                                                                                  + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_SettingKeyName + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Settings Array key name.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + array<string|int, mixed> + — +

                                                                                                  Contains Settings ID, Settings Name and Settings Value.

                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + appendScripts() + +

                                                                                                  + + +

                                                                                                  Append javascript and css files for specific sub page.

                                                                                                  + + + private + appendScripts() : mixed + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + registerMetaBoxes() + +

                                                                                                  + + +

                                                                                                  Registers all Meta boxes for a sub page.

                                                                                                  + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                                  + +
                                                                                                  Parameters
                                                                                                  +
                                                                                                  +
                                                                                                  + $p_str_ParentID + : string +
                                                                                                  +
                                                                                                  +

                                                                                                  Parent section unique id.

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + mixed + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  +

                                                                                                  + saveSettings() + +

                                                                                                  + + +

                                                                                                  Save all Plugin settings.

                                                                                                  + + + private + saveSettings() : bool + +
                                                                                                  + + + +
                                                                                                  + Tags + +
                                                                                                  +
                                                                                                  +
                                                                                                  + author +
                                                                                                  +
                                                                                                  + +

                                                                                                  Stefan Herndler

                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + since +
                                                                                                  +
                                                                                                  + 1.5.0 + +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  Return values
                                                                                                  + bool + — +
                                                                                                  + + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Search results

                                                                                                  + +
                                                                                                  +
                                                                                                  +
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + + + + diff --git a/docs/classes/MCI-Footnotes-Settings.html b/docs/classes/MCI-Footnotes-Settings.html new file mode 100644 index 0000000..e436525 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Settings.html @@ -0,0 +1,6221 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                    +

                                                                                                    Documentation

                                                                                                    + + + + + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +
                                                                                                    + + +
                                                                                                    +

                                                                                                    + MCI_Footnotes_Settings + + + + +

                                                                                                    + + + +

                                                                                                    Loads the settings values, sets to default values if undefined.

                                                                                                    + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + +

                                                                                                    + Table of Contents + +

                                                                                                    + +
                                                                                                    +
                                                                                                    + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_max_width_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_width_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + +  = "footnotes_inputfield_backlinks_line_breaks_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + +  = "footnotes_inputfield_backlinks_separator_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + +  = "footnotes_inputfield_backlinks_terminator_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +  = "footnote_inputfield_combine_identical" +
                                                                                                    +
                                                                                                    Settings Container Key for combining identical footnotes.
                                                                                                    + +
                                                                                                    + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +  = "footnote_inputfield_custom_css_legacy_enable" +
                                                                                                    +
                                                                                                    Settings Container Key to enable display of legacy Custom CSS metaboxes.
                                                                                                    + +
                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +  = "footnote_inputfield_expert_lookup_the_content" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the 'the_content' hook.
                                                                                                    + +
                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +  = "footnote_inputfield_expert_lookup_the_excerpt" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the 'the_excerpt' hook.
                                                                                                    + +
                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +  = "footnote_inputfield_expert_lookup_the_title" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the 'the_title' hook.
                                                                                                    + +
                                                                                                    + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +  = "footnote_inputfield_expert_lookup_widget_text" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the 'widget_text' hook.
                                                                                                    + +
                                                                                                    + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +  = "footnote_inputfield_expert_lookup_widget_title" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the 'widget_title' hook.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +  = "footnotes_inputfield_shortcode_syntax_validation_enable" +
                                                                                                    +
                                                                                                    Settings container key for shortcode syntax validation.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +  = "footnote_inputfield_url_wrap_enabled" +
                                                                                                    +
                                                                                                    Settings Container Key for URL wrap option
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + +  = "footnotes_inputfield_backlink_tooltip_enable" +
                                                                                                    +
                                                                                                    Settings container key to enable backlink tooltips.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_EXPERT_MODE + +  = "footnote_inputfield_enable_expert_mode" +
                                                                                                    +
                                                                                                    Settings Container Key for the Expert mode.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + +  = "footnotes_inputfield_hard_links_enable" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_IN_EXCERPT + +  = "footnote_inputfield_search_in_excerpt" +
                                                                                                    +
                                                                                                    Settings Container Key to look for footnotes in post excerpts.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +  = "footnote_inputfield_custom_mouse_over_box_alternative" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the alternative tooltips.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_enabled" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the mouse-over box.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" +
                                                                                                    +
                                                                                                    Settings Container Key to enable tooltip truncation.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +  = "footnotes_inputfield_referrer_superscript_tags" +
                                                                                                    +
                                                                                                    Settings Container Key for the referrer element.
                                                                                                    + +
                                                                                                    + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +  = "footnotes_inputfield_tooltip_excerpt_mirror_enable" +
                                                                                                    +
                                                                                                    Settings container key to enable mirroring the tooltip excerpt in the reference container.
                                                                                                    + +
                                                                                                    + C_BOOL_LINK_ELEMENT_ENABLED + +  = "footnote_inputfield_link_element_enabled" +
                                                                                                    +
                                                                                                    Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations
                                                                                                    + +
                                                                                                    + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +  = "footnotes_inputfield_mouse_over_box_font_size_enabled" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +  = "footnotes_inputfield_reference_container_3column_layout_enable" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the legacy layout of the reference container.
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + +  = "footnotes_inputfield_reference_container_backlink_symbol_enable" +
                                                                                                    +
                                                                                                    Settings Container Key to enable the display of a backlink symbol.
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + +  = "footnotes_inputfield_reference_container_backlink_symbol_switch" +
                                                                                                    +
                                                                                                    Settings Container Key to get the backlink symbol switch side.
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +  = "footnote_inputfield_collapse_references" +
                                                                                                    +
                                                                                                    Settings Container Key to collapse the reference container by default.
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +  = "footnotes_inputfield_reference_container_label_bottom_border" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +  = "footnotes_inputfield_reference_container_row_borders_enable" +
                                                                                                    +
                                                                                                    Settings Container Key for table cell borders, thanks to @noobishh
                                                                                                    + +
                                                                                                    + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +  = "footnotes_inputfield_reference_container_start_page_enable" +
                                                                                                    +
                                                                                                    Settings Container Key to not display the reference container on the homepage.
                                                                                                    + +
                                                                                                    + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +  = "footnotes_inputfield_mouse_over_box_font_size_scalar" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_max_width_scalar" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_width_scalar" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_content_priority_level" +
                                                                                                    +
                                                                                                    Settings Container Key for 'the_content' hook priority level.
                                                                                                    + +
                                                                                                    + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_title_priority_level" +
                                                                                                    +
                                                                                                    Settings Container Key for '' hook priority level
                                                                                                    + +
                                                                                                    + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_text_priority_level" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_title_priority_level" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_x" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_y" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +  = "footnotes_inputfield_alternative_mouse_over_box_width" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +  = "footnote_inputfield_custom_mouse_over_box_border_radius" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the border radius.
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_border_width" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the border width.
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_length" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_max_width" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the max. width.
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +  = "footnote_inputfield_custom_mouse_over_box_offset_x" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the offset (x).
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnote_inputfield_custom_mouse_over_box_offset_y" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the offset (y).
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_SCROLL_DURATION + +  = "footnotes_inputfield_scroll_duration" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_FOOTNOTES_SCROLL_OFFSET + +  = "footnotes_inputfield_scroll_offset" +
                                                                                                    +
                                                                                                    Scroll offset and duration
                                                                                                    + +
                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_in_delay" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_in_duration" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_out_delay" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_out_duration" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +  = "footnotes_inputfield_reference_container_bottom_margin" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +  = "footnotes_inputfield_reference_container_top_margin" +
                                                                                                    +
                                                                                                    Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_max_width_unit" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_width_unit" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_SEPARATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_separator_custom" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_SEPARATOR_OPTION + +  = "footnotes_inputfield_backlinks_separator_option" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_TERMINATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_terminator_custom" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_BACKLINKS_TERMINATOR_OPTION + +  = "footnotes_inputfield_backlinks_terminator_option" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_CUSTOM_CSS + +  = "footnote_inputfield_custom_css" +
                                                                                                    +
                                                                                                    Settings Container Key for the Custom CSS.
                                                                                                    + +
                                                                                                    + C_STR_CUSTOM_CSS_NEW + +  = "footnote_inputfield_custom_css_new" +
                                                                                                    +
                                                                                                    Settings Container Key for the Custom CSS migrated to a dedicated tab.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_footnote_fragment_id_slug" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +  = "footnotes_inputfield_referrers_normal_superscript" +
                                                                                                    +
                                                                                                    Settings container key to enable superscript style normalization.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +  = "footnotes_inputfield_alternative_mouse_over_box_position" +
                                                                                                    +
                                                                                                    Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + +  = "footnotes_inputfield_backlink_tooltip_text" +
                                                                                                    +
                                                                                                    Settings container key to configure the backlink tooltip.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_COUNTER_STYLE + +  = "footnote_inputfield_counter_style" +
                                                                                                    +
                                                                                                    Settings Container Key for the counter style of the footnotes.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_LOVE + +  = "footnote_inputfield_love" +
                                                                                                    +
                                                                                                    Settings Container Key for the 'I love footnotes' text.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +  = "footnote_inputfield_custom_mouse_over_box_background" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the background color.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_border_color" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the border color.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_color" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the color.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +  = "footnote_inputfield_custom_mouse_over_box_position" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the position.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_shadow_color" +
                                                                                                    +
                                                                                                    Settings Container Key for the mouse-over box to define the box-shadow color.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +  = "footnotes_inputfield_page_layout_support" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +  = "footnotes_inputfield_reference_container_script_mode" +
                                                                                                    +
                                                                                                    Settings container key to select the script mode for the reference container.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_END + +  = "footnote_inputfield_placeholder_end" +
                                                                                                    +
                                                                                                    Settings Container Key for the short code of the footnote’s end.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +  = "footnote_inputfield_placeholder_end_user_defined" +
                                                                                                    +
                                                                                                    Settings Container Key for the user-defined short code of the footnotes end.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_START + +  = "footnote_inputfield_placeholder_start" +
                                                                                                    +
                                                                                                    Settings Container Key for the short code of the footnote’s start.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +  = "footnote_inputfield_placeholder_start_user_defined" +
                                                                                                    +
                                                                                                    Settings Container Key for the user-defined short code of the footnotes start.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_STYLING_AFTER + +  = "footnote_inputfield_custom_styling_after" +
                                                                                                    +
                                                                                                    Settings Container Key for the string after the footnote referrer.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_STYLING_BEFORE + +  = "footnote_inputfield_custom_styling_before" +
                                                                                                    +
                                                                                                    Settings Container Key for the string before the footnote referrer.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +  = "footnotes_inputfield_tooltip_excerpt_delimiter" +
                                                                                                    +
                                                                                                    Settings container key to configure the tooltip excerpt delimiter.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +  = "footnotes_inputfield_tooltip_excerpt_mirror_separator" +
                                                                                                    +
                                                                                                    Settings container key to configure the tooltip excerpt separator in the reference container.
                                                                                                    + +
                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +  = "footnote_inputfield_readon_label" +
                                                                                                    +
                                                                                                    Settings Container Key for the label of the Read-on button in truncated tooltips.
                                                                                                    + +
                                                                                                    + C_STR_HARD_LINK_IDS_SEPARATOR + +  = "footnotes_inputfield_hard_link_ids_separator" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_HYPERLINK_ARROW + +  = "footnote_inputfield_custom_hyperlink_symbol" +
                                                                                                    +
                                                                                                    Settings Container Key for the backlink symbol selection.
                                                                                                    + +
                                                                                                    + C_STR_HYPERLINK_ARROW_USER_DEFINED + +  = "footnote_inputfield_custom_hyperlink_symbol_user" +
                                                                                                    +
                                                                                                    Settings Container Key for the user-defined backlink symbol.
                                                                                                    + +
                                                                                                    + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +  = "footnotes_inputfield_mouse_over_box_font_size_unit" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +  = "footnotes_inputfield_reference_container_label_element" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + C_STR_REFERENCE_CONTAINER_NAME + +  = "footnote_inputfield_references_label" +
                                                                                                    +
                                                                                                    Settings Container Key for the label of the reference container.
                                                                                                    + +
                                                                                                    + C_STR_REFERENCE_CONTAINER_POSITION + +  = "footnote_inputfield_reference_container_place" +
                                                                                                    +
                                                                                                    Settings Container Key for the position of the reference container.
                                                                                                    + +
                                                                                                    + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +  = "footnote_inputfield_reference_container_position_shortcode" +
                                                                                                    +
                                                                                                    Settings Container Key for reference container position shortcode
                                                                                                    + +
                                                                                                    + C_STR_REFERRER_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_referrer_fragment_id_slug" +
                                                                                                    +
                                                                                                    + +
                                                                                                    + $a_arr_Container + +  : array<string|int, mixed> +
                                                                                                    +
                                                                                                    Contains all Settings Container names.
                                                                                                    + +
                                                                                                    + $a_arr_Default + +  : array<string|int, mixed> +
                                                                                                    +
                                                                                                    Contains all Default Settings for each Settings Container.
                                                                                                    + +
                                                                                                    + $a_arr_Settings + +  : array<string|int, mixed> +
                                                                                                    +
                                                                                                    Contains all Settings from each Settings container as soon as this class is initialized.
                                                                                                    + +
                                                                                                    + $a_obj_Instance + +  : MCI_Footnotes_Settings +
                                                                                                    +
                                                                                                    Stores a singleton reference of this class.
                                                                                                    + +
                                                                                                    + ClearAll() + +  : mixed +
                                                                                                    +
                                                                                                    Deletes each Settings Container and loads the default values for each Settings Container.
                                                                                                    + +
                                                                                                    + get() + +  : mixed +
                                                                                                    +
                                                                                                    Returns the value of specified Settings name.
                                                                                                    + +
                                                                                                    + getContainer() + +  : str +
                                                                                                    +
                                                                                                    Returns the name of a specified Settings Container.
                                                                                                    + +
                                                                                                    + getDefaults() + +  : array<string|int, mixed> +
                                                                                                    +
                                                                                                    Returns the default values of a specific Settings Container.
                                                                                                    + +
                                                                                                    + instance() + +  : MCI_Footnotes_Settings +
                                                                                                    +
                                                                                                    Returns a singleton of this class.
                                                                                                    + +
                                                                                                    + RegisterSettings() + +  : mixed +
                                                                                                    +
                                                                                                    Register all Settings Container for the Plugin Settings Page in the Dashboard.
                                                                                                    + +
                                                                                                    + saveOptions() + +  : bool +
                                                                                                    +
                                                                                                    Updates a whole Settings container.
                                                                                                    + +
                                                                                                    + __construct() + +  : mixed +
                                                                                                    +
                                                                                                    Class Constructor. Loads all Settings from each WordPress Settings container.
                                                                                                    + +
                                                                                                    + Load() + +  : array<string|int, mixed> +
                                                                                                    +
                                                                                                    Loads all Settings from specified Settings Container.
                                                                                                    + +
                                                                                                    + loadAll() + +  : mixed +
                                                                                                    +
                                                                                                    Loads all Settings from each Settings container.
                                                                                                    + +
                                                                                                    + + + + +
                                                                                                    +

                                                                                                    + Constants + +

                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_max_width_enabled" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_width_enabled" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + = "footnotes_inputfield_backlinks_line_breaks_enabled" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + = "footnotes_inputfield_backlinks_separator_enabled" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + = "footnotes_inputfield_backlinks_terminator_enabled" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for combining identical footnotes.

                                                                                                    + + + public + str + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + = "footnote_inputfield_combine_identical" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable display of legacy Custom CSS metaboxes.

                                                                                                    + + + public + str + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + = "footnote_inputfield_custom_css_legacy_enable" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.2 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.3.0 + +

                                                                                                    swap Boolean from 'migration complete' to 'show legacy'

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-12-15T0520+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + 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 toBool() converts empty to false.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the 'the_content' hook.

                                                                                                    + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + = "footnote_inputfield_expert_lookup_the_content" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the 'the_excerpt' hook.

                                                                                                    + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + = "footnote_inputfield_expert_lookup_the_excerpt" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the 'the_title' hook.

                                                                                                    + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_TITLE + = "footnote_inputfield_expert_lookup_the_title" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the 'widget_text' hook.

                                                                                                    + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + = "footnote_inputfield_expert_lookup_widget_text" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the 'widget_title' hook.

                                                                                                    + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + = "footnote_inputfield_expert_lookup_widget_title" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings container key for shortcode syntax validation.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + = "footnotes_inputfield_shortcode_syntax_validation_enable" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.4.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2021-01-01T0616+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for URL wrap option

                                                                                                    + + + public + str + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + = "footnote_inputfield_url_wrap_enabled" + + + +

                                                                                                    This is made optional because it causes weird line breaks. +Unicode-compliant browsers break URLs at slashes.

                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings container key to enable backlink tooltips.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + = "footnotes_inputfield_backlink_tooltip_enable" + + + +
                                                                                                      +
                                                                                                    • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @theroninjedi47

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    +

                                                                                                    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 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_EXPERT_MODE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the Expert mode.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_EXPERT_MODE + = "footnote_inputfield_enable_expert_mode" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + 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.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + = "footnotes_inputfield_hard_links_enable" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_IN_EXCERPT + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to look for footnotes in post excerpts.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_IN_EXCERPT + = "footnote_inputfield_search_in_excerpt" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the alternative tooltips.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + = "footnote_inputfield_custom_mouse_over_box_alternative" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-11T1817+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @andreasra

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the mouse-over box.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + = "footnote_inputfield_custom_mouse_over_box_enabled" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.2 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable tooltip truncation.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the referrer element.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + = "footnotes_inputfield_referrer_superscript_tags" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-16T0859+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @cwbayer

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings container key to enable mirroring the tooltip excerpt in the reference container.

                                                                                                    + + + public + str + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + = "footnotes_inputfield_tooltip_excerpt_mirror_enable" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    +

                                                                                                    But this must not be the default behavior.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/change-tooltip-text/#post-13935488 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations

                                                                                                    + + + public + str|bool|int|flo + C_BOOL_LINK_ELEMENT_ENABLED + = "footnote_inputfield_link_element_enabled" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +

                                                                                                    + + + + + + public + mixed + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + = "footnotes_inputfield_mouse_over_box_font_size_enabled" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to enable the legacy layout of the reference container.

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + = "footnotes_inputfield_reference_container_3column_layout_enable" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings Container Key to enable the display of a backlink symbol.

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + = "footnotes_inputfield_reference_container_backlink_symbol_enable" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @spaceling

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings Container Key to get the backlink symbol switch side.

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + = "footnotes_inputfield_reference_container_backlink_symbol_switch" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-16T2024+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + contributor +
                                                                                                    +
                                                                                                    + +

                                                                                                    @spaceling

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/change-the-position-5/#post-13615994 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to collapse the reference container by default.

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + = "footnote_inputfield_collapse_references" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + see +
                                                                                                    +
                                                                                                    + MCI_Footnotes_Convert::toBool() + +

                                                                                                    The type in the variable name is useful to show the intention.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + todo +
                                                                                                    +
                                                                                                    + +

                                                                                                    Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +

                                                                                                    + + + + + + public + mixed + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + = "footnotes_inputfield_reference_container_label_bottom_border" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for table cell borders, thanks to @noobishh

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + = "footnotes_inputfield_reference_container_row_borders_enable" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/borders-25/ + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.10 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key to not display the reference container on the homepage.

                                                                                                    + + + public + str + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + = "footnotes_inputfield_reference_container_start_page_enable" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @dragon013

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +

                                                                                                    + + + + + + public + mixed + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + = "footnotes_inputfield_mouse_over_box_font_size_scalar" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_max_width_scalar" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_width_scalar" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for 'the_content' hook priority level.

                                                                                                    + + + public + str + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_content_priority_level" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.1 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-16T0859+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +

                                                                                                    + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for '' hook priority level

                                                                                                    + + + public + str + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_title_priority_level" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.2 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-20T0620+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +

                                                                                                    + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_text_priority_level" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +

                                                                                                    + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_title_priority_level" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +

                                                                                                    + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + = "footnotes_inputfield_alternative_mouse_over_box_offset_x" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +

                                                                                                    + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + = "footnotes_inputfield_alternative_mouse_over_box_offset_y" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +

                                                                                                    + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + = "footnotes_inputfield_alternative_mouse_over_box_width" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the border radius.

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + = "footnote_inputfield_custom_mouse_over_box_border_radius" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the border width.

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + = "footnote_inputfield_custom_mouse_over_box_border_width" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + = "footnote_inputfield_custom_mouse_over_box_excerpt_length" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the max. width.

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + = "footnote_inputfield_custom_mouse_over_box_max_width" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the offset (x).

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + = "footnote_inputfield_custom_mouse_over_box_offset_x" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.7 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the offset (y).

                                                                                                    + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + = "footnote_inputfield_custom_mouse_over_box_offset_y" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.7 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_SCROLL_DURATION + +

                                                                                                    + + + + + + public + mixed + C_INT_FOOTNOTES_SCROLL_DURATION + = "footnotes_inputfield_scroll_duration" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_FOOTNOTES_SCROLL_OFFSET + +

                                                                                                    + + + +

                                                                                                    Scroll offset and duration

                                                                                                    + + + public + mixed + C_INT_FOOTNOTES_SCROLL_OFFSET + = "footnotes_inputfield_scroll_offset" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                                                                                                    • +
                                                                                                    • Bugfix: Scroll duration: make configurable to conform to website content and style requirements.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-12-05T0538+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +

                                                                                                    + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + = "footnotes_inputfield_mouse_over_box_fade_in_delay" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +

                                                                                                    + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + = "footnotes_inputfield_mouse_over_box_fade_in_duration" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +

                                                                                                    + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + = "footnotes_inputfield_mouse_over_box_fade_out_delay" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +

                                                                                                    + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + = "footnotes_inputfield_mouse_over_box_fade_out_duration" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +

                                                                                                    + + + + + + public + mixed + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + = "footnotes_inputfield_reference_container_bottom_margin" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +

                                                                                                    + + + +

                                                                                                    Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes

                                                                                                    + + + public + int|bool|str + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + = "footnotes_inputfield_reference_container_top_margin" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.3.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_max_width_unit" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_width_unit" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_CUSTOM + = "footnotes_inputfield_backlinks_separator_custom" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_OPTION + = "footnotes_inputfield_backlinks_separator_option" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_CUSTOM + = "footnotes_inputfield_backlinks_terminator_custom" + + + + + + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_OPTION + = "footnotes_inputfield_backlinks_terminator_option" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_CUSTOM_CSS + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the Custom CSS.

                                                                                                    + + + public + str + C_STR_CUSTOM_CSS + = "footnote_inputfield_custom_css" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.3.0 + +

                                                                                                    Adding: new settings tab for custom CSS settings.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_CUSTOM_CSS_NEW + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the Custom CSS migrated to a dedicated tab.

                                                                                                    + + + public + str + C_STR_CUSTOM_CSS_NEW + = "footnote_inputfield_custom_css_new" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.2 + +

                                                                                                    Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-12-15T0520+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +

                                                                                                    + + + + + + public + mixed + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + = "footnotes_inputfield_footnote_fragment_id_slug" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +

                                                                                                    + + + +

                                                                                                    Settings container key to enable superscript style normalization.

                                                                                                    + + + public + str + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + = "footnotes_inputfield_referrers_normal_superscript" + + + +

                                                                                                    -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.

                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @tomturowski

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +

                                                                                                    + + + +

                                                                                                    Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer

                                                                                                    + + + public + int + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + = "footnotes_inputfield_alternative_mouse_over_box_position" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.5 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings container key to configure the backlink tooltip.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + = "footnotes_inputfield_backlink_tooltip_text" + + + +
                                                                                                      +
                                                                                                    • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @theroninjedi47

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_COUNTER_STYLE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the counter style of the footnotes.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_COUNTER_STYLE + = "footnote_inputfield_counter_style" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_LOVE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the 'I love footnotes' text.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_LOVE + = "footnote_inputfield_love" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the background color.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + = "footnote_inputfield_custom_mouse_over_box_background" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the border color.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + = "footnote_inputfield_custom_mouse_over_box_border_color" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the color.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + = "footnote_inputfield_custom_mouse_over_box_color" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the position.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + = "footnote_inputfield_custom_mouse_over_box_position" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.7 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the mouse-over box to define the box-shadow color.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + = "footnote_inputfield_custom_mouse_over_box_shadow_color" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.8 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +

                                                                                                    + + + + + + public + mixed + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + = "footnotes_inputfield_page_layout_support" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +

                                                                                                    + + + +

                                                                                                    Settings container key to select the script mode for the reference container.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + = "footnotes_inputfield_reference_container_script_mode" + + + +
                                                                                                      +
                                                                                                    • Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @hopper87it

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/footnotes-wp-rocket/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_END + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the short code of the footnote’s end.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END + = "footnote_inputfield_placeholder_end" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the user-defined short code of the footnotes end.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + = "footnote_inputfield_placeholder_end_user_defined" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_START + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the short code of the footnote’s start.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START + = "footnote_inputfield_placeholder_start" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the user-defined short code of the footnotes start.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + = "footnote_inputfield_placeholder_start_user_defined" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_STYLING_AFTER + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the string after the footnote referrer.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_STYLING_AFTER + = "footnote_inputfield_custom_styling_after" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_STYLING_BEFORE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the string before the footnote referrer.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_STYLING_BEFORE + = "footnote_inputfield_custom_styling_before" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +

                                                                                                    + + + +

                                                                                                    Settings container key to configure the tooltip excerpt delimiter.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + = "footnotes_inputfield_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.

                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @jbj2199

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    +

                                                                                                    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.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +

                                                                                                    + + + +

                                                                                                    Settings container key to configure the tooltip excerpt separator in the reference container.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + = "footnotes_inputfield_tooltip_excerpt_mirror_separator" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.5.4 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the label of the Read-on button in truncated tooltips.

                                                                                                    + + + public + str + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + = "footnote_inputfield_readon_label" + + + +
                                                                                                      +
                                                                                                    • Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
                                                                                                    • +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + date +
                                                                                                    +
                                                                                                    + +

                                                                                                    2020-11-08T2106+0100

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + reporter +
                                                                                                    +
                                                                                                    + +

                                                                                                    @rovanov

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + public + mixed + C_STR_HARD_LINK_IDS_SEPARATOR + = "footnotes_inputfield_hard_link_ids_separator" + + + + + + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings Container Key for the backlink symbol selection.

                                                                                                    + + + public + str + C_STR_HYPERLINK_ARROW + = "footnote_inputfield_custom_hyperlink_symbol" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + +

                                                                                                    Settings Container Key for the user-defined backlink symbol.

                                                                                                    + + + public + str + C_STR_HYPERLINK_ARROW_USER_DEFINED + = "footnote_inputfield_custom_hyperlink_symbol_user" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +

                                                                                                    + + + + + + public + mixed + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + = "footnotes_inputfield_mouse_over_box_font_size_unit" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +

                                                                                                    + + + + + + public + mixed + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + = "footnotes_inputfield_reference_container_label_element" + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_REFERENCE_CONTAINER_NAME + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the label of the reference container.

                                                                                                    + + + public + str + C_STR_REFERENCE_CONTAINER_NAME + = "footnote_inputfield_references_label" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_REFERENCE_CONTAINER_POSITION + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for the position of the reference container.

                                                                                                    + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION + = "footnote_inputfield_reference_container_place" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +

                                                                                                    + + + +

                                                                                                    Settings Container Key for reference container position shortcode

                                                                                                    + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + = "footnote_inputfield_reference_container_position_shortcode" + + + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + C_STR_REFERRER_FRAGMENT_ID_SLUG + +

                                                                                                    + + + + + + public + mixed + C_STR_REFERRER_FRAGMENT_ID_SLUG + = "footnotes_inputfield_referrer_fragment_id_slug" + + + + + + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    +

                                                                                                    + Properties + +

                                                                                                    +
                                                                                                    +

                                                                                                    + $a_arr_Container + + + +

                                                                                                    + + +

                                                                                                    Contains all Settings Container names.

                                                                                                    + + + private + array<string|int, mixed> + $a_arr_Container + = array("footnotes_storage", "footnotes_storage_custom", "footnotes_storage_expert", "footnotes_storage_custom_css") + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + $a_arr_Default + + + +

                                                                                                    + + +

                                                                                                    Contains all Default Settings for each Settings Container.

                                                                                                    + + + private + array<string|int, mixed> + $a_arr_Default + = array("footnotes_storage" => array( + self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', + self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', + self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', + self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + self::C_STR_REFERENCE_CONTAINER_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // whether a <br /> tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_LOVE => 'no', +), "footnotes_storage_custom" => array( + self::C_STR_HYPERLINK_ARROW => '&#8593;', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', +), "footnotes_storage_expert" => array( + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See <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. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + // And the_excerpt is disabled by default following @nikelaos in + // <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879> + // <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068> + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // <https://github.com/Modernizr/Modernizr/issues/171> + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, +), "footnotes_storage_custom_css" => array(self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', self::C_STR_CUSTOM_CSS_NEW => '')) + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.1.3 + +

                                                                                                    excerpt hook: disable by default, thanks to @nikelaos

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + $a_arr_Settings + + + +

                                                                                                    + + +

                                                                                                    Contains all Settings from each Settings container as soon as this class is initialized.

                                                                                                    + + + private + array<string|int, mixed> + $a_arr_Settings + = array() + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +

                                                                                                    + $a_obj_Instance + + + +

                                                                                                    + + +

                                                                                                    Stores a singleton reference of this class.

                                                                                                    + + + private + static MCI_Footnotes_Settings + $a_obj_Instance + = +ull + +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +

                                                                                                    + Methods + +

                                                                                                    +
                                                                                                    +

                                                                                                    + ClearAll() + +

                                                                                                    + + +

                                                                                                    Deletes each Settings Container and loads the default values for each Settings Container.

                                                                                                    + + + public + ClearAll() : mixed + +
                                                                                                    + + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +

                                                                                                    Edit: This didn’t actually work.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 2.2.0 + +

                                                                                                    this function is not called any longer when deleting the plugin, +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

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + mixed + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + get() + +

                                                                                                    + + +

                                                                                                    Returns the value of specified Settings name.

                                                                                                    + + + public + get(string $p_str_Key) : mixed + +
                                                                                                    + +
                                                                                                    Parameters
                                                                                                    +
                                                                                                    +
                                                                                                    + $p_str_Key + : string +
                                                                                                    +
                                                                                                    +

                                                                                                    Settings Array Key name.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + mixed + — +

                                                                                                    Value of the Setting on Success or Null in Settings name is invalid.

                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + getContainer() + +

                                                                                                    + + +

                                                                                                    Returns the name of a specified Settings Container.

                                                                                                    + + + public + getContainer(int $p_int_Index) : str + +
                                                                                                    + +
                                                                                                    Parameters
                                                                                                    +
                                                                                                    +
                                                                                                    + $p_int_Index + : int +
                                                                                                    +
                                                                                                    +

                                                                                                    Settings Container Array Key Index.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + str + — +

                                                                                                    Settings Container name.

                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + getDefaults() + +

                                                                                                    + + +

                                                                                                    Returns the default values of a specific Settings Container.

                                                                                                    + + + public + getDefaults(int $p_int_Index) : array<string|int, mixed> + +
                                                                                                    + +
                                                                                                    Parameters
                                                                                                    +
                                                                                                    +
                                                                                                    + $p_int_Index + : int +
                                                                                                    +
                                                                                                    +

                                                                                                    Settings Container Aray Key Index.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.6 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + array<string|int, mixed> + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + instance() + +

                                                                                                    + + +

                                                                                                    Returns a singleton of this class.

                                                                                                    + + + public + static instance() : MCI_Footnotes_Settings + +
                                                                                                    + + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + MCI_Footnotes_Settings + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + RegisterSettings() + +

                                                                                                    + + +

                                                                                                    Register all Settings Container for the Plugin Settings Page in the Dashboard.

                                                                                                    + + + public + RegisterSettings() : mixed + +

                                                                                                    Settings Container Label will be the same as the Settings Container Name.

                                                                                                    +
                                                                                                    + + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + mixed + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + saveOptions() + +

                                                                                                    + + +

                                                                                                    Updates a whole Settings container.

                                                                                                    + + + public + saveOptions(int $p_int_Index, array<string|int, mixed> $p_arr_newValues) : bool + +
                                                                                                    + +
                                                                                                    Parameters
                                                                                                    +
                                                                                                    +
                                                                                                    + $p_int_Index + : int +
                                                                                                    +
                                                                                                    +

                                                                                                    Index of the Settings container.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + $p_arr_newValues + : array<string|int, mixed> +
                                                                                                    +
                                                                                                    +

                                                                                                    new Settings.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + bool + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + __construct() + +

                                                                                                    + + +

                                                                                                    Class Constructor. Loads all Settings from each WordPress Settings container.

                                                                                                    + + + private + __construct() : mixed + +
                                                                                                    + + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + mixed + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + Load() + +

                                                                                                    + + +

                                                                                                    Loads all Settings from specified Settings Container.

                                                                                                    + + + private + Load(int $p_int_Index) : array<string|int, mixed> + +
                                                                                                    + +
                                                                                                    Parameters
                                                                                                    +
                                                                                                    +
                                                                                                    + $p_int_Index + : int +
                                                                                                    +
                                                                                                    +

                                                                                                    Settings Container Array Key Index.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + +

                                                                                                    ditched trimming whitespace from text box content in response to user request.

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + link +
                                                                                                    +
                                                                                                    + https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + array<string|int, mixed> + — +

                                                                                                    Settings loaded from Container of Default Settings if Settings Container is empty (first usage).

                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    +

                                                                                                    + loadAll() + +

                                                                                                    + + +

                                                                                                    Loads all Settings from each Settings container.

                                                                                                    + + + private + loadAll() : mixed + +
                                                                                                    + + + +
                                                                                                    + Tags + +
                                                                                                    +
                                                                                                    +
                                                                                                    + author +
                                                                                                    +
                                                                                                    + +

                                                                                                    Stefan Herndler

                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + since +
                                                                                                    +
                                                                                                    + 1.5.0 + +
                                                                                                    + +
                                                                                                    +
                                                                                                    + +
                                                                                                    Return values
                                                                                                    + mixed + — +
                                                                                                    + + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    +

                                                                                                    Search results

                                                                                                    + +
                                                                                                    +
                                                                                                    +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + + + + diff --git a/docs/classes/MCI-Footnotes-Task.html b/docs/classes/MCI-Footnotes-Task.html new file mode 100644 index 0000000..b8cddb3 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Task.html @@ -0,0 +1,2902 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                      +

                                                                                                      Documentation

                                                                                                      + + + + + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + +
                                                                                                      + + +
                                                                                                      +

                                                                                                      + MCI_Footnotes_Task + + + + +

                                                                                                      + + + +

                                                                                                      Searches and replaces the footnotes.

                                                                                                      + +

                                                                                                      Generates the reference container.

                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + +

                                                                                                      + Table of Contents + +

                                                                                                      + +
                                                                                                      +
                                                                                                      + $a_arr_Footnotes + +  : array<string|int, mixed> +
                                                                                                      +
                                                                                                      Contains all footnotes found on current public page.
                                                                                                      + +
                                                                                                      + $a_bool_AllowLoveMe + +  : bool +
                                                                                                      +
                                                                                                      Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
                                                                                                      + +
                                                                                                      + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_bool_HardLinksEnable + +  : bool|str|int +
                                                                                                      +
                                                                                                      Hard links for AMP compatibility
                                                                                                      + +
                                                                                                      + $a_bool_MirrorTooltipText + +  : mixed +
                                                                                                      +
                                                                                                      Dedicated tooltip text
                                                                                                      + +
                                                                                                      + $a_bool_SyntaxErrorFlag + +  : bool +
                                                                                                      +
                                                                                                      Footnote delimiter syntax validation
                                                                                                      + +
                                                                                                      + $a_bool_TooltipsEnabled + +  : bool +
                                                                                                      +
                                                                                                      Template process optimization
                                                                                                      + +
                                                                                                      + $a_int_PostId + +  : int +
                                                                                                      +
                                                                                                      Infinite scroll / autoload or archive view
                                                                                                      + +
                                                                                                      + $a_int_ReferenceContainerId + +  : int +
                                                                                                      +
                                                                                                      Multiple reference containers in content and widgets
                                                                                                      + +
                                                                                                      + $a_int_ScrollOffset + +  : int +
                                                                                                      +
                                                                                                      Scroll offset
                                                                                                      + +
                                                                                                      + $a_int_TooltipShortcodeLength + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_FootnoteLinkSlug + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_LinkCloseTag + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_LinkIdsSeparator + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_LinkOpenTag + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_LinkSpan + +  : mixed +
                                                                                                      +
                                                                                                      Optional link element for footnote referrers and backlinks
                                                                                                      + +
                                                                                                      + $a_str_PostContainerIdCompound + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_Prefix + +  : string +
                                                                                                      +
                                                                                                      Prefix for the Footnote html element ID.
                                                                                                      + +
                                                                                                      + $a_str_ReferrerLinkSlug + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + $a_str_TooltipShortcode + +  : mixed +
                                                                                                      +
                                                                                                      + +
                                                                                                      + exec() + +  : string +
                                                                                                      +
                                                                                                      Replaces all footnotes that occur in the given content.
                                                                                                      + +
                                                                                                      + ReferenceContainer() + +  : string +
                                                                                                      +
                                                                                                      Generates the reference container.
                                                                                                      + +
                                                                                                      + registerHooks() + +  : mixed +
                                                                                                      +
                                                                                                      Register WordPress Hooks to replace Footnotes in the content of a public page.
                                                                                                      + +
                                                                                                      + search() + +  : string +
                                                                                                      +
                                                                                                      Replaces all footnotes in the given content and appends them to the static property.
                                                                                                      + +
                                                                                                      + the_content() + +  : string +
                                                                                                      +
                                                                                                      Replaces footnotes in the content of the current page/post.
                                                                                                      + +
                                                                                                      + the_excerpt() + +  : string +
                                                                                                      +
                                                                                                      Replaces footnotes in the excerpt of the current page/post.
                                                                                                      + +
                                                                                                      + the_post() + +  : mixed +
                                                                                                      +
                                                                                                      Replaces footnotes in each Content var of the current Post object.
                                                                                                      + +
                                                                                                      + the_title() + +  : string +
                                                                                                      +
                                                                                                      Replaces footnotes in the post/page title.
                                                                                                      + +
                                                                                                      + widget_text() + +  : string +
                                                                                                      +
                                                                                                      Replaces footnotes in the content of the current widget.
                                                                                                      + +
                                                                                                      + widget_title() + +  : string +
                                                                                                      +
                                                                                                      Replaces footnotes in the widget title.
                                                                                                      + +
                                                                                                      + wp_footer() + +  : mixed +
                                                                                                      +
                                                                                                      Displays the 'LOVE FOOTNOTES' slug if enabled.
                                                                                                      + +
                                                                                                      + wp_head() + +  : mixed +
                                                                                                      +
                                                                                                      Outputs the custom css to the header of the public page.
                                                                                                      + +
                                                                                                      + replacePostObject() + +  : WP_Post +
                                                                                                      +
                                                                                                      Replace all Footnotes in a WP_Post object.
                                                                                                      + +
                                                                                                      + + + + + + +
                                                                                                      +

                                                                                                      + Properties + +

                                                                                                      +
                                                                                                      +

                                                                                                      + $a_arr_Footnotes + + + +

                                                                                                      + + +

                                                                                                      Contains all footnotes found on current public page.

                                                                                                      + + + public + static array<string|int, mixed> + $a_arr_Footnotes + = array() + +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_AllowLoveMe + + + +

                                                                                                      + + +

                                                                                                      Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.

                                                                                                      + + + public + static bool + $a_bool_AllowLoveMe + = rue + +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_AlternativeTooltipsEnabled + + + +

                                                                                                      + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_HardLinksEnable + + + +

                                                                                                      + + +

                                                                                                      Hard links for AMP compatibility

                                                                                                      + + + public + static bool|str|int + $a_bool_HardLinksEnable + = alse + +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.0 + +

                                                                                                      Bugfix: footnote links script independent.

                                                                                                      +
                                                                                                        +
                                                                                                      • Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
                                                                                                      • +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.4 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.3.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @theroninjedi47

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @psykonevro

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +
                                                                                                        +
                                                                                                      • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                                                                                                      • +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      The official AMP plugin strips off JavaScript, breaking Footnotes’ +animated scrolling. +When the alternative reference container is enabled, hard links are too.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + contributor +
                                                                                                      +
                                                                                                      + +

                                                                                                      @martinneumannat

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_MirrorTooltipText + + + +

                                                                                                      + + +

                                                                                                      Dedicated tooltip text

                                                                                                      + + + public + static mixed + $a_bool_MirrorTooltipText + = alse + +
                                                                                                        +
                                                                                                      • Update: Tooltips: ability to display dedicated content before [[/tooltip]], thanks to @jbj2199 issue report.
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.2 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2021-01-19T2223+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @jbj2199

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      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.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_SyntaxErrorFlag + + + +

                                                                                                      + + +

                                                                                                      Footnote delimiter syntax validation

                                                                                                      + + + public + static bool + $a_bool_SyntaxErrorFlag + = rue + +
                                                                                                        +
                                                                                                      • Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.4.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2021-01-01T0227+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_bool_TooltipsEnabled + + + +

                                                                                                      + + +

                                                                                                      Template process optimization

                                                                                                      + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                                                                                                        +
                                                                                                      • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.4.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2021-01-04T1355+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Patrizia Lutz @misfist

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      repository

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      diff

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_int_PostId + + + +

                                                                                                      + + +

                                                                                                      Infinite scroll / autoload or archive view

                                                                                                      + + + public + static int + $a_int_PostId + = 0 + +
                                                                                                        +
                                                                                                      • Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.6 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + contributor +
                                                                                                      +
                                                                                                      + +

                                                                                                      @docteurfitness

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/auto-load-post-compatibility-update/#post-13618833 + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      As multiple posts are appended to each other, functions and fragment IDs must be disambiguated. +post ID to make everything unique wrt infinite scroll and archive view:

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @docteurfitness

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_int_ReferenceContainerId + + + +

                                                                                                      + + +

                                                                                                      Multiple reference containers in content and widgets

                                                                                                      + + + public + static int + $a_int_ReferenceContainerId + = 1 + +
                                                                                                        +
                                                                                                      • Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report.
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.9 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2020-12-25T0338+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @justbecuz

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/reset-footnotes-to-1/ + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830 + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_int_ScrollOffset + + + +

                                                                                                      + + +

                                                                                                      Scroll offset

                                                                                                      + + + public + static int + $a_int_ScrollOffset + = 34 + +
                                                                                                        +
                                                                                                      • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                                                                                                      • +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.4 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.4.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2020-12-05T0538+0100

                                                                                                      +
                                                                                                        +
                                                                                                      • Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report.
                                                                                                      • +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2021-01-03T2055+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2021-01-04T0504+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @lukashuggenberg

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13857922 + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_int_TooltipShortcodeLength + + + +

                                                                                                      + + + + + public + static mixed + $a_int_TooltipShortcodeLength + = 12 + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_FootnoteLinkSlug + + + +

                                                                                                      + + + + + public + static mixed + $a_str_FootnoteLinkSlug + = 'f' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_LinkCloseTag + + + +

                                                                                                      + + + + + public + static mixed + $a_str_LinkCloseTag + = '' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_LinkIdsSeparator + + + +

                                                                                                      + + + + + public + static mixed + $a_str_LinkIdsSeparator + = '+' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_LinkOpenTag + + + +

                                                                                                      + + + + + public + static mixed + $a_str_LinkOpenTag + = '' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_LinkSpan + + + +

                                                                                                      + + +

                                                                                                      Optional link element for footnote referrers and backlinks

                                                                                                      + + + public + static mixed + $a_str_LinkSpan + = 'span' + +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.0 + +

                                                                                                      add link elements along with hard links.

                                                                                                      +
                                                                                                        +
                                                                                                      • Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
                                                                                                      • +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.4 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.3.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2020-11-25T1306+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2020-11-26T1051+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + date +
                                                                                                      +
                                                                                                      + +

                                                                                                      2020-12-30T2313+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + contributor +
                                                                                                      +
                                                                                                      + +

                                                                                                      @docteurfitness

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + contributor +
                                                                                                      +
                                                                                                      + +

                                                                                                      @martinneumannat

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/update-2-1-3/#post-13704194 + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +
                                                                                                        +
                                                                                                      • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                                                                                                      • +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                                                                                                      +
                                                                                                      + link +
                                                                                                      +
                                                                                                      +

                                                                                                      Although widely used for that purpose, hyperlinks are disliked for footnote linking. +Browsers may need to be prevented from logging these clicks in the browsing history, +as logging compromises the usability of the 'return to previous' button in browsers. +For that purpose, and for scroll animation, this linking is performed by JavaScript.

                                                                                                      +

                                                                                                      Link elements raise concerns, so that mitigating their proliferation may be desired.

                                                                                                      +

                                                                                                      By contrast, due to an insufficiency in the CSS standard, coloring elements with the +theme’s link color requires real link elements and cannot be done with named colors, +as CSS does not support 'color: link|hover|active|visited', after the pseudo-classes +of the link element.

                                                                                                      +

                                                                                                      Yet styling these elements with the link color is not universally preferred, so that +the very presence of these link elements may need to be avoided.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @docteurfitness

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + reporter +
                                                                                                      +
                                                                                                      + +

                                                                                                      @psykonevro

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + see +
                                                                                                      +
                                                                                                      + self::$a_bool_HardLinksEnable + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_PostContainerIdCompound + + + +

                                                                                                      + + + + + public + static mixed + $a_str_PostContainerIdCompound + = '' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_Prefix + + + +

                                                                                                      + + +

                                                                                                      Prefix for the Footnote html element ID.

                                                                                                      + + + public + static string + $a_str_Prefix + = "" + +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.8 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_ReferrerLinkSlug + + + +

                                                                                                      + + + + + public + static mixed + $a_str_ReferrerLinkSlug + = 'r' + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + $a_str_TooltipShortcode + + + +

                                                                                                      + + + + + public + static mixed + $a_str_TooltipShortcode + = '[[/tooltip]]' + + + + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +

                                                                                                      + Methods + +

                                                                                                      +
                                                                                                      +

                                                                                                      + exec() + +

                                                                                                      + + +

                                                                                                      Replaces all footnotes that occur in the given content.

                                                                                                      + + + public + exec(string $p_str_Content[, bool $p_bool_OutputReferences = false ][, bool $p_bool_HideFootnotesText = false ]) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Any string that may contain footnotes to be replaced.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + $p_bool_OutputReferences + : bool + = false
                                                                                                      +
                                                                                                      +

                                                                                                      Appends the Reference Container to the output if set to true, default true.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + $p_bool_HideFootnotesText + : bool + = false
                                                                                                      +
                                                                                                      +

                                                                                                      Hide footnotes found in the string.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.0 + +

                                                                                                      Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.5 + +

                                                                                                      Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + ReferenceContainer() + +

                                                                                                      + + +

                                                                                                      Generates the reference container.

                                                                                                      + + + public + ReferenceContainer() : string + +
                                                                                                      + + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.0 + +

                                                                                                      Update: remove backlink symbol along with column 2 of the reference container

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.3 + +

                                                                                                      Bugfix: prepend an arrow on user request

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.6 + +

                                                                                                      Bugfix: Reference container: fix line breaking behavior in footnote number clusters.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.4 + +

                                                                                                      Bugfix: restore the arrow select and backlink symbol input settings

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.1 + +

                                                                                                      Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.1 + +

                                                                                                      Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + registerHooks() + +

                                                                                                      + + +

                                                                                                      Register WordPress Hooks to replace Footnotes in the content of a public page.

                                                                                                      + + + public + registerHooks() : mixed + +
                                                                                                      + + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.4 + +

                                                                                                      Adding: Hooks: support 'the_post' in response to user request for custom post types.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.5 + +

                                                                                                      Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.5 + +

                                                                                                      Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.6 + +

                                                                                                      Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility).

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + 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.0.7 + +

                                                                                                      Bugfix: Set priority level back to 10 assuming it is unproblematic 2020-11-06T1344+0100.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.8 + +

                                                                                                      Bugfix: Priority level back to PHP_INT_MAX (need to get in touch with other plugins).

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.0 + +

                                                                                                      UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.1 + +

                                                                                                      Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.2 + +

                                                                                                      Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.0 + +

                                                                                                      Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.1 + +

                                                                                                      Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + mixed + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + + + +

                                                                                                      Replaces all footnotes in the given content and appends them to the static property.

                                                                                                      + + + public + search(string $p_str_Content, bool $p_bool_ConvertHtmlChars, bool $p_bool_HideFootnotesText) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Content to be searched for footnotes.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + $p_bool_ConvertHtmlChars + : bool +
                                                                                                      +
                                                                                                      +

                                                                                                      html encode settings, default true.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + $p_bool_HideFootnotesText + : bool +
                                                                                                      +
                                                                                                      +

                                                                                                      Hide footnotes found in the string.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.0.0 + +

                                                                                                      various.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.4.0 + +

                                                                                                      Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.0 + +

                                                                                                      Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.0 + +

                                                                                                      Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.0 + +

                                                                                                      Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + the_content() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in the content of the current page/post.

                                                                                                      + + + public + the_content(string $p_str_Content) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Page/Post content.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +

                                                                                                      Content with replaced footnotes.

                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + the_excerpt() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in the excerpt of the current page/post.

                                                                                                      + + + public + the_excerpt(string $p_str_Content) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Page/Post content.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +

                                                                                                      Content with replaced footnotes.

                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + the_post() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in each Content var of the current Post object.

                                                                                                      + + + public + the_post(array<string|int, mixed>|WP_Post &$p_mixed_Posts) : mixed + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_mixed_Posts + : array<string|int, mixed>|WP_Post +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.4 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + mixed + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + the_title() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in the post/page title.

                                                                                                      + + + public + the_title(string $p_str_Content) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Widget content.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +

                                                                                                      Content with replaced footnotes.

                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + widget_text() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in the content of the current widget.

                                                                                                      + + + public + widget_text(string $p_str_Content) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Widget content.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +

                                                                                                      Content with replaced footnotes.

                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + widget_title() + +

                                                                                                      + + +

                                                                                                      Replaces footnotes in the widget title.

                                                                                                      + + + public + widget_title(string $p_str_Content) : string + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_str_Content + : string +
                                                                                                      +
                                                                                                      +

                                                                                                      Widget content.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + string + — +

                                                                                                      Content with replaced footnotes.

                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + + + +

                                                                                                      Displays the 'LOVE FOOTNOTES' slug if enabled.

                                                                                                      + + + public + wp_footer() : mixed + +
                                                                                                      + + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.0 + +

                                                                                                      more options 2020-12-11T0506+0100

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + mixed + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + wp_head() + +

                                                                                                      + + +

                                                                                                      Outputs the custom css to the header of the public page.

                                                                                                      + + + public + wp_head() : mixed + +
                                                                                                      + + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.0 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.1 + +

                                                                                                      Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.1 + +

                                                                                                      Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.3 + +

                                                                                                      raise settings priority to override theme stylesheets

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.4 + +

                                                                                                      Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.1.4 + +

                                                                                                      Bugfix: Reference container: fix layout issues by moving backlink column width to settings.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.5 + +

                                                                                                      Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.2.5 + +

                                                                                                      Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.3.0 + +

                                                                                                      Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 2.5.4 + +

                                                                                                      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.

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + mixed + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      +

                                                                                                      + replacePostObject() + +

                                                                                                      + + +

                                                                                                      Replace all Footnotes in a WP_Post object.

                                                                                                      + + + private + replacePostObject(WP_Post $p_obj_Post) : WP_Post + +
                                                                                                      + +
                                                                                                      Parameters
                                                                                                      +
                                                                                                      +
                                                                                                      + $p_obj_Post + : WP_Post +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      + Tags + +
                                                                                                      +
                                                                                                      +
                                                                                                      + author +
                                                                                                      +
                                                                                                      + +

                                                                                                      Stefan Herndler

                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + since +
                                                                                                      +
                                                                                                      + 1.5.6 + +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      Return values
                                                                                                      + WP_Post + — +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      +

                                                                                                      Search results

                                                                                                      + +
                                                                                                      +
                                                                                                      +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + + +
                                                                                                        + + + + diff --git a/docs/classes/MCI-Footnotes-Template.html b/docs/classes/MCI-Footnotes-Template.html new file mode 100644 index 0000000..98bc1ed --- /dev/null +++ b/docs/classes/MCI-Footnotes-Template.html @@ -0,0 +1,1044 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                        +

                                                                                                        Documentation

                                                                                                        + + + + + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + +
                                                                                                        + + +
                                                                                                        +

                                                                                                        + MCI_Footnotes_Template + + + + +

                                                                                                        + + + +

                                                                                                        Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).

                                                                                                        + +

                                                                                                        Loads a template file, replaces all Placeholders and returns the replaced file content.

                                                                                                        +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + + + +

                                                                                                        + Table of Contents + +

                                                                                                        + +
                                                                                                        +
                                                                                                        + C_STR_DASHBOARD + +  = "dashboard" +
                                                                                                        +
                                                                                                        Directory name for dashboard templates.
                                                                                                        + +
                                                                                                        + C_STR_PUBLIC + +  = "public" +
                                                                                                        +
                                                                                                        Directory name for public templates.
                                                                                                        + +
                                                                                                        + $plugin_directory + +  : string +
                                                                                                        +
                                                                                                        Plugin Directory
                                                                                                        + +
                                                                                                        + $a_str_OriginalContent + +  : string +
                                                                                                        +
                                                                                                        Contains the content of the template after initialize.
                                                                                                        + +
                                                                                                        + $a_str_ReplacedContent + +  : string +
                                                                                                        +
                                                                                                        Contains the content of the template after initialize with replaced place holders.
                                                                                                        + +
                                                                                                        + __construct() + +  : mixed +
                                                                                                        +
                                                                                                        Class Constructor. Reads and loads the template file without replace any placeholder.
                                                                                                        + +
                                                                                                        + get_template() + +  : mixed +
                                                                                                        +
                                                                                                        Get the template
                                                                                                        + +
                                                                                                        + getContent() + +  : string +
                                                                                                        +
                                                                                                        Returns the content of the template file with replaced placeholders.
                                                                                                        + +
                                                                                                        + process_template() + +  : void +
                                                                                                        +
                                                                                                        Process template file
                                                                                                        + +
                                                                                                        + reload() + +  : mixed +
                                                                                                        +
                                                                                                        Reloads the original content of the template file.
                                                                                                        + +
                                                                                                        + replace() + +  : bool +
                                                                                                        +
                                                                                                        Replace all placeholders specified in array.
                                                                                                        + +
                                                                                                        + + + + +
                                                                                                        +

                                                                                                        + Constants + +

                                                                                                        +
                                                                                                        +

                                                                                                        + C_STR_DASHBOARD + +

                                                                                                        + + + +

                                                                                                        Directory name for dashboard templates.

                                                                                                        + + + public + string + C_STR_DASHBOARD + = "dashboard" + + + +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        +

                                                                                                        + C_STR_PUBLIC + +

                                                                                                        + + + +

                                                                                                        Directory name for public templates.

                                                                                                        + + + public + string + C_STR_PUBLIC + = "public" + + + +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        +

                                                                                                        + Properties + +

                                                                                                        +
                                                                                                        +

                                                                                                        + $plugin_directory + + + +

                                                                                                        + + +

                                                                                                        Plugin Directory

                                                                                                        + + + public + string + $plugin_directory + + +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Patrizia Lutz @misfist

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.4.0d3 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        +

                                                                                                        + $a_str_OriginalContent + + + +

                                                                                                        + + +

                                                                                                        Contains the content of the template after initialize.

                                                                                                        + + + private + string + $a_str_OriginalContent + = "" + +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        +

                                                                                                        + $a_str_ReplacedContent + + + +

                                                                                                        + + +

                                                                                                        Contains the content of the template after initialize with replaced place holders.

                                                                                                        + + + private + string + $a_str_ReplacedContent + = "" + +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +

                                                                                                        + Methods + +

                                                                                                        +
                                                                                                        +

                                                                                                        + __construct() + +

                                                                                                        + + +

                                                                                                        Class Constructor. Reads and loads the template file without replace any placeholder.

                                                                                                        + + + public + __construct(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                                                                                                        + +
                                                                                                        Parameters
                                                                                                        +
                                                                                                        +
                                                                                                        + $p_str_FileType + : string +
                                                                                                        +
                                                                                                        +

                                                                                                        Template file type (take a look on the Class constants).

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + $p_str_FileName + : string +
                                                                                                        +
                                                                                                        +

                                                                                                        Template file name inside the Template directory without the file extension.

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + $p_str_Extension + : string + = "html"
                                                                                                        +
                                                                                                        +

                                                                                                        Optional Template file extension (default: html)

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.2.6 + +

                                                                                                        support for custom templates 2020-12-19T0606+0100

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.4.0 + +

                                                                                                        look for custom template in the active theme first, thanks to @misfist

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + link +
                                                                                                        +
                                                                                                        + https://wordpress.org/support/topic/template-override-filter/ + +
                                                                                                        +
                                                                                                        + link +
                                                                                                        +
                                                                                                        + https://wordpress.org/support/topic/template-override-filter/#post-13846598 + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + mixed + — +
                                                                                                        + + +
                                                                                                        +
                                                                                                        +

                                                                                                        + get_template() + +

                                                                                                        + + +

                                                                                                        Get the template

                                                                                                        + + + public + get_template(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                                                                                                        + +
                                                                                                        Parameters
                                                                                                        +
                                                                                                        +
                                                                                                        + $p_str_FileType + : string +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + $p_str_FileName + : string +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + $p_str_Extension + : string + = "html"
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Patrizia Lutz @misfist

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.4.0d3 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + mixed + — +

                                                                                                        false | template path

                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        +

                                                                                                        + getContent() + +

                                                                                                        + + +

                                                                                                        Returns the content of the template file with replaced placeholders.

                                                                                                        + + + public + getContent() : string + +
                                                                                                        + + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + string + — +

                                                                                                        Template content with replaced placeholders.

                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        +

                                                                                                        + process_template() + +

                                                                                                        + + +

                                                                                                        Process template file

                                                                                                        + + + public + process_template(string $template) : void + +
                                                                                                        + +
                                                                                                        Parameters
                                                                                                        +
                                                                                                        +
                                                                                                        + $template + : string +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Patrizia Lutz @misfist

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.4.0d3 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.0.3 + +

                                                                                                        replace tab with a space

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.0.3 + +

                                                                                                        replace 2 spaces with 1

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.0.4 + +

                                                                                                        collapse multiple spaces

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.2.6 + +

                                                                                                        delete a space before a closing pointy bracket

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 2.5.4 + +

                                                                                                        collapse HTML comments and PHP/JS docblocks (only)

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + void + — +
                                                                                                        + + +
                                                                                                        +
                                                                                                        +

                                                                                                        + reload() + +

                                                                                                        + + +

                                                                                                        Reloads the original content of the template file.

                                                                                                        + + + public + reload() : mixed + +
                                                                                                        + + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + mixed + — +
                                                                                                        + + +
                                                                                                        +
                                                                                                        +

                                                                                                        + replace() + +

                                                                                                        + + +

                                                                                                        Replace all placeholders specified in array.

                                                                                                        + + + public + replace(array<string|int, mixed> $p_arr_Placeholders) : bool + +
                                                                                                        + +
                                                                                                        Parameters
                                                                                                        +
                                                                                                        +
                                                                                                        + $p_arr_Placeholders + : array<string|int, mixed> +
                                                                                                        +
                                                                                                        +

                                                                                                        Placeholders (key = placeholder, value = value).

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        + Tags + +
                                                                                                        +
                                                                                                        +
                                                                                                        + author +
                                                                                                        +
                                                                                                        + +

                                                                                                        Stefan Herndler

                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + since +
                                                                                                        +
                                                                                                        + 1.5.0 + +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        Return values
                                                                                                        + bool + — +

                                                                                                        True on Success, False if Placeholders invalid.

                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        +

                                                                                                        Search results

                                                                                                        + +
                                                                                                        +
                                                                                                        +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + + +
                                                                                                          + + + + diff --git a/docs/classes/MCI-Footnotes-WYSIWYG.html b/docs/classes/MCI-Footnotes-WYSIWYG.html new file mode 100644 index 0000000..08eae4a --- /dev/null +++ b/docs/classes/MCI-Footnotes-WYSIWYG.html @@ -0,0 +1,492 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                          +

                                                                                                          Documentation

                                                                                                          + + + + + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + + +
                                                                                                          + + +
                                                                                                          +

                                                                                                          + MCI_Footnotes_WYSIWYG + + + + +

                                                                                                          + + + + +
                                                                                                          + + +
                                                                                                          + Tags + +
                                                                                                          +
                                                                                                          +
                                                                                                          + author +
                                                                                                          +
                                                                                                          + +

                                                                                                          Stefan Herndler

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + since +
                                                                                                          +
                                                                                                          + 1.5.0 + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + + + + +

                                                                                                          + Table of Contents + +

                                                                                                          + +
                                                                                                          +
                                                                                                          + ajaxCallback() + +  : mixed +
                                                                                                          +
                                                                                                          AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.
                                                                                                          + +
                                                                                                          + includeScripts() + +  : array<string|int, mixed> +
                                                                                                          +
                                                                                                          Includes the Plugins WYSIWYG editor script.
                                                                                                          + +
                                                                                                          + newPlainTextEditorButton() + +  : mixed +
                                                                                                          +
                                                                                                          Add a new button to the plain text editor.
                                                                                                          + +
                                                                                                          + newVisualEditorButton() + +  : array<string|int, mixed> +
                                                                                                          +
                                                                                                          Append a new Button to the WYSIWYG editor of Posts and Pages.
                                                                                                          + +
                                                                                                          + registerHooks() + +  : mixed +
                                                                                                          +
                                                                                                          + +
                                                                                                          + + + + + + + +
                                                                                                          +

                                                                                                          + Methods + +

                                                                                                          +
                                                                                                          +

                                                                                                          + ajaxCallback() + +

                                                                                                          + + +

                                                                                                          AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.

                                                                                                          + + + public + static ajaxCallback() : mixed + +

                                                                                                          Returns an JSON encoded array with the Footnotes start and end short code.

                                                                                                          +
                                                                                                          + + + +
                                                                                                          + Tags + +
                                                                                                          +
                                                                                                          +
                                                                                                          + author +
                                                                                                          +
                                                                                                          + +

                                                                                                          Stefan Herndler

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + since +
                                                                                                          +
                                                                                                          + 1.5.0 + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          Return values
                                                                                                          + mixed + — +
                                                                                                          + + +
                                                                                                          +
                                                                                                          +

                                                                                                          + includeScripts() + +

                                                                                                          + + +

                                                                                                          Includes the Plugins WYSIWYG editor script.

                                                                                                          + + + public + static includeScripts(array<string|int, mixed> $p_arr_Plugins) : array<string|int, mixed> + +
                                                                                                          + +
                                                                                                          Parameters
                                                                                                          +
                                                                                                          +
                                                                                                          + $p_arr_Plugins + : array<string|int, mixed> +
                                                                                                          +
                                                                                                          +

                                                                                                          Scripts to be included to the editor.

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + +
                                                                                                          + Tags + +
                                                                                                          +
                                                                                                          +
                                                                                                          + author +
                                                                                                          +
                                                                                                          + +

                                                                                                          Stefan Herndler

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + since +
                                                                                                          +
                                                                                                          + 1.5.0 + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          Return values
                                                                                                          + array<string|int, mixed> + — +
                                                                                                          + + +
                                                                                                          +
                                                                                                          +

                                                                                                          + newPlainTextEditorButton() + +

                                                                                                          + + +

                                                                                                          Add a new button to the plain text editor.

                                                                                                          + + + public + static newPlainTextEditorButton() : mixed + +
                                                                                                          + + + +
                                                                                                          + Tags + +
                                                                                                          +
                                                                                                          +
                                                                                                          + author +
                                                                                                          +
                                                                                                          + +

                                                                                                          Stefan Herndler

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + since +
                                                                                                          +
                                                                                                          + 1.5.0 + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          Return values
                                                                                                          + mixed + — +
                                                                                                          + + +
                                                                                                          +
                                                                                                          +

                                                                                                          + newVisualEditorButton() + +

                                                                                                          + + +

                                                                                                          Append a new Button to the WYSIWYG editor of Posts and Pages.

                                                                                                          + + + public + static newVisualEditorButton(array<string|int, mixed> $p_arr_Buttons) : array<string|int, mixed> + +
                                                                                                          + +
                                                                                                          Parameters
                                                                                                          +
                                                                                                          +
                                                                                                          + $p_arr_Buttons + : array<string|int, mixed> +
                                                                                                          +
                                                                                                          +

                                                                                                          pre defined Buttons from WordPress.

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + +
                                                                                                          + Tags + +
                                                                                                          +
                                                                                                          +
                                                                                                          + author +
                                                                                                          +
                                                                                                          + +

                                                                                                          Stefan Herndler

                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + since +
                                                                                                          +
                                                                                                          + 1.5.0 + +
                                                                                                          + +
                                                                                                          +
                                                                                                          + +
                                                                                                          Return values
                                                                                                          + array<string|int, mixed> + — +
                                                                                                          + + +
                                                                                                          +
                                                                                                          +

                                                                                                          + registerHooks() + +

                                                                                                          + + + + + public + static registerHooks() : mixed + + + + + +
                                                                                                          Return values
                                                                                                          + mixed + — +
                                                                                                          + + +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          +

                                                                                                          Search results

                                                                                                          + +
                                                                                                          +
                                                                                                          +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            + + +
                                                                                                            + + + + diff --git a/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html new file mode 100644 index 0000000..8ef7d35 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html @@ -0,0 +1,688 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                            +

                                                                                                            Documentation

                                                                                                            + + + + + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + + +
                                                                                                            + + +
                                                                                                            +

                                                                                                            + MCI_Footnotes_Widget_ReferenceContainer + + + extends MCI_Footnotes_WidgetBase + + + + +

                                                                                                            + + + +

                                                                                                            Registers a Widget to put the Reference Container to the widget area.

                                                                                                            + +
                                                                                                            + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + + + + + +

                                                                                                            + Table of Contents + +

                                                                                                            + +
                                                                                                            +
                                                                                                            + __construct() + +  : mixed +
                                                                                                            +
                                                                                                            Class Constructor. Registers the child Widget to WordPress.
                                                                                                            + +
                                                                                                            + form() + +  : void +
                                                                                                            +
                                                                                                            Outputs the Settings of the Widget.
                                                                                                            + +
                                                                                                            + widget() + +  : mixed +
                                                                                                            +
                                                                                                            Outputs the Content of the Widget.
                                                                                                            + +
                                                                                                            + getDescription() + +  : string +
                                                                                                            +
                                                                                                            Returns the Description of the child widget.
                                                                                                            + +
                                                                                                            + getID() + +  : string +
                                                                                                            +
                                                                                                            Returns an unique ID as string used for the Widget Base ID.
                                                                                                            + +
                                                                                                            + getName() + +  : string +
                                                                                                            +
                                                                                                            Returns the Public name of the Widget to be displayed in the Configuration page.
                                                                                                            + +
                                                                                                            + getWidgetWidth() + +  : int +
                                                                                                            +
                                                                                                            Returns the width of the Widget. Default width is 250 pixel.
                                                                                                            + +
                                                                                                            + + + + + + + +
                                                                                                            +

                                                                                                            + Methods + +

                                                                                                            +
                                                                                                            +

                                                                                                            + __construct() + +

                                                                                                            + + +

                                                                                                            Class Constructor. Registers the child Widget to WordPress.

                                                                                                            + + + public + __construct() : mixed + +
                                                                                                            + + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                              +
                                                                                                            • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                                                                                                            • +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.6.4 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + contributor +
                                                                                                            +
                                                                                                            + +

                                                                                                            @dartiss

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + link +
                                                                                                            +
                                                                                                            +

                                                                                                            “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + mixed + — +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + form() + +

                                                                                                            + + +

                                                                                                            Outputs the Settings of the Widget.

                                                                                                            + + + public + form(mixed $instance) : void + +
                                                                                                            + +
                                                                                                            Parameters
                                                                                                            +
                                                                                                            +
                                                                                                            + $instance + : mixed +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + void + — +

                                                                                                            Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                                                                                                            +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + widget() + +

                                                                                                            + + +

                                                                                                            Outputs the Content of the Widget.

                                                                                                            + + + public + widget(mixed $args, mixed $instance) : mixed + +
                                                                                                            + +
                                                                                                            Parameters
                                                                                                            +
                                                                                                            +
                                                                                                            + $args + : mixed +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + $instance + : mixed +
                                                                                                            +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + mixed + — +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + getDescription() + +

                                                                                                            + + +

                                                                                                            Returns the Description of the child widget.

                                                                                                            + + + protected + getDescription() : string + +
                                                                                                            + + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + string + — +

                                                                                                            Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                                                                                                            +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + getID() + +

                                                                                                            + + +

                                                                                                            Returns an unique ID as string used for the Widget Base ID.

                                                                                                            + + + protected + getID() : string + +
                                                                                                            + + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + string + — +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + getName() + +

                                                                                                            + + +

                                                                                                            Returns the Public name of the Widget to be displayed in the Configuration page.

                                                                                                            + + + protected + getName() : string + +
                                                                                                            + + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + string + — +
                                                                                                            + + +
                                                                                                            +
                                                                                                            +

                                                                                                            + getWidgetWidth() + +

                                                                                                            + + +

                                                                                                            Returns the width of the Widget. Default width is 250 pixel.

                                                                                                            + + + protected + getWidgetWidth() : int + +
                                                                                                            + + + +
                                                                                                            + Tags + +
                                                                                                            +
                                                                                                            +
                                                                                                            + author +
                                                                                                            +
                                                                                                            + +

                                                                                                            Stefan Herndler

                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            + since +
                                                                                                            +
                                                                                                            + 1.5.0 + +
                                                                                                            + +
                                                                                                            +
                                                                                                            + +
                                                                                                            Return values
                                                                                                            + int + — +
                                                                                                            + + +
                                                                                                            +
                                                                                                            + +
                                                                                                            +
                                                                                                            +
                                                                                                            +
                                                                                                            +

                                                                                                            Search results

                                                                                                            + +
                                                                                                            +
                                                                                                            +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              + + +
                                                                                                              + + + + diff --git a/docs/classes/MCI-Footnotes-WidgetBase.html b/docs/classes/MCI-Footnotes-WidgetBase.html new file mode 100644 index 0000000..31cc342 --- /dev/null +++ b/docs/classes/MCI-Footnotes-WidgetBase.html @@ -0,0 +1,529 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                              +

                                                                                                              Documentation

                                                                                                              + + + + + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + + +
                                                                                                              + + +
                                                                                                              +

                                                                                                              + MCI_Footnotes_WidgetBase + + + extends WP_Widget + + + + +

                                                                                                              + + + +

                                                                                                              Base Class for all Plugin Widgets. Registers each Widget to WordPress.

                                                                                                              + +

                                                                                                              The following Methods MUST be overwritten in each sub class: +public function widget($args, $instance) -> echo the Widget Content +public function form($instance) -> echo the Settings of the Widget

                                                                                                              +
                                                                                                              + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + + + + + + +

                                                                                                              + Table of Contents + +

                                                                                                              + +
                                                                                                              +
                                                                                                              + __construct() + +  : mixed +
                                                                                                              +
                                                                                                              Class Constructor. Registers the child Widget to WordPress.
                                                                                                              + +
                                                                                                              + getDescription() + +  : string +
                                                                                                              +
                                                                                                              Returns the Description of the child widget.
                                                                                                              + +
                                                                                                              + getID() + +  : string +
                                                                                                              +
                                                                                                              Returns an unique ID as string used for the Widget Base ID.
                                                                                                              + +
                                                                                                              + getName() + +  : string +
                                                                                                              +
                                                                                                              Returns the Public name of child Widget to be displayed in the Configuration page.
                                                                                                              + +
                                                                                                              + getWidgetWidth() + +  : int +
                                                                                                              +
                                                                                                              Returns the width of the Widget. Default width is 250 pixel.
                                                                                                              + +
                                                                                                              + + + + + + + +
                                                                                                              +

                                                                                                              + Methods + +

                                                                                                              +
                                                                                                              +

                                                                                                              + __construct() + +

                                                                                                              + + +

                                                                                                              Class Constructor. Registers the child Widget to WordPress.

                                                                                                              + + + public + __construct() : mixed + +
                                                                                                              + + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                                +
                                                                                                              • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                                                                                                              • +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.6.4 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + contributor +
                                                                                                              +
                                                                                                              + +

                                                                                                              @dartiss

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + link +
                                                                                                              +
                                                                                                              +

                                                                                                              “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              Return values
                                                                                                              + mixed + — +
                                                                                                              + + +
                                                                                                              +
                                                                                                              +

                                                                                                              + getDescription() + +

                                                                                                              + + +

                                                                                                              Returns the Description of the child widget.

                                                                                                              + + + protected + abstract getDescription() : string + +
                                                                                                              + + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              Return values
                                                                                                              + string + — +
                                                                                                              + + +
                                                                                                              +
                                                                                                              +

                                                                                                              + getID() + +

                                                                                                              + + +

                                                                                                              Returns an unique ID as string used for the Widget Base ID.

                                                                                                              + + + protected + abstract getID() : string + +
                                                                                                              + + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              Return values
                                                                                                              + string + — +
                                                                                                              + + +
                                                                                                              +
                                                                                                              +

                                                                                                              + getName() + +

                                                                                                              + + +

                                                                                                              Returns the Public name of child Widget to be displayed in the Configuration page.

                                                                                                              + + + protected + abstract getName() : string + +
                                                                                                              + + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              Return values
                                                                                                              + string + — +
                                                                                                              + + +
                                                                                                              +
                                                                                                              +

                                                                                                              + getWidgetWidth() + +

                                                                                                              + + +

                                                                                                              Returns the width of the Widget. Default width is 250 pixel.

                                                                                                              + + + protected + getWidgetWidth() : int + +
                                                                                                              + + + +
                                                                                                              + Tags + +
                                                                                                              +
                                                                                                              +
                                                                                                              + author +
                                                                                                              +
                                                                                                              + +

                                                                                                              Stefan Herndler

                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              + since +
                                                                                                              +
                                                                                                              + 1.5.0 + +
                                                                                                              + +
                                                                                                              +
                                                                                                              + +
                                                                                                              Return values
                                                                                                              + int + — +
                                                                                                              + + +
                                                                                                              +
                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                              +
                                                                                                              +

                                                                                                              Search results

                                                                                                              + +
                                                                                                              +
                                                                                                              +
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                + + +
                                                                                                                + + + + diff --git a/docs/classes/MCI-Footnotes.html b/docs/classes/MCI-Footnotes.html new file mode 100644 index 0000000..d09558a --- /dev/null +++ b/docs/classes/MCI-Footnotes.html @@ -0,0 +1,873 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                +

                                                                                                                Documentation

                                                                                                                + + + + + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + + +
                                                                                                                + + +
                                                                                                                +

                                                                                                                + MCI_Footnotes + + + + +

                                                                                                                + + + +

                                                                                                                Entry point of the Plugin. Loads the Dashboard and executes the Task.

                                                                                                                + +
                                                                                                                + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + + + + + + +

                                                                                                                + Table of Contents + +

                                                                                                                + +
                                                                                                                +
                                                                                                                + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                                                                                                                +
                                                                                                                + +
                                                                                                                + $a_bool_TooltipsEnabled + +  : bool +
                                                                                                                +
                                                                                                                Template process and script / stylesheet load optimization.
                                                                                                                + +
                                                                                                                + $a_obj_Task + +  : null|MCI_Footnotes_Task +
                                                                                                                +
                                                                                                                Reference to the Plugin Task object.
                                                                                                                + +
                                                                                                                + initializeWidgets() + +  : mixed +
                                                                                                                +
                                                                                                                Initializes all Widgets of the Plugin.
                                                                                                                + +
                                                                                                                + registerPublic() + +  : mixed +
                                                                                                                +
                                                                                                                Registers and enqueues scripts and stylesheets to the public pages.
                                                                                                                + +
                                                                                                                + run() + +  : mixed +
                                                                                                                +
                                                                                                                Executes the Plugin.
                                                                                                                + +
                                                                                                                + initializeDashboard() + +  : mixed +
                                                                                                                +
                                                                                                                Initializes the Dashboard of the Plugin and loads them.
                                                                                                                + +
                                                                                                                + initializeTask() + +  : mixed +
                                                                                                                +
                                                                                                                Initializes the Plugin Task and registers the Task hooks.
                                                                                                                + +
                                                                                                                + + + + + + +
                                                                                                                +

                                                                                                                + Properties + +

                                                                                                                +
                                                                                                                +

                                                                                                                + $a_bool_AlternativeTooltipsEnabled + + + +

                                                                                                                + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                                                                                                                +
                                                                                                                +

                                                                                                                + $a_bool_TooltipsEnabled + + + +

                                                                                                                + + +

                                                                                                                Template process and script / stylesheet load optimization.

                                                                                                                + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                                                                                                                  +
                                                                                                                • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                                                                                                                • +
                                                                                                                +
                                                                                                                + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.4.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + date +
                                                                                                                +
                                                                                                                + +

                                                                                                                2021-01-04T1355+0100

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Patrizia Lutz @misfist

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                +

                                                                                                                repository

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                +

                                                                                                                diff

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                +

                                                                                                                + $a_obj_Task + + + +

                                                                                                                + + +

                                                                                                                Reference to the Plugin Task object.

                                                                                                                + + + public + null|MCI_Footnotes_Task + $a_obj_Task + = +ull + +
                                                                                                                + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                +

                                                                                                                + Methods + +

                                                                                                                +
                                                                                                                +

                                                                                                                + initializeWidgets() + +

                                                                                                                + + +

                                                                                                                Initializes all Widgets of the Plugin.

                                                                                                                + + + public + initializeWidgets() : mixed + +
                                                                                                                + + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                  +
                                                                                                                • Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution
                                                                                                                • +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.6.5 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + contributor +
                                                                                                                +
                                                                                                                + +

                                                                                                                @felipelavinz

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                + https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                + https://wordpress.org/support/topic/deprecated-function-create_function-14/ + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                +

                                                                                                                create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0.

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                +

                                                                                                                The fix is to move add_action() above into run(), +and use the bare register_widget() here.

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + reporter +
                                                                                                                +
                                                                                                                + +

                                                                                                                @psykonevro

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + reporter +
                                                                                                                +
                                                                                                                + +

                                                                                                                @daliasued

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + see +
                                                                                                                +
                                                                                                                + self::run() + +

                                                                                                                Also, the visibility of initializeWidgets() is not private any longer.

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                Return values
                                                                                                                + mixed + — +
                                                                                                                + + +
                                                                                                                +
                                                                                                                +

                                                                                                                + registerPublic() + +

                                                                                                                + + +

                                                                                                                Registers and enqueues scripts and stylesheets to the public pages.

                                                                                                                + + + public + registerPublic() : mixed + +
                                                                                                                + + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.0.0 + +

                                                                                                                Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution.

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.0.3 + +

                                                                                                                add versioning of public.css for cache busting 2020-10-29T1413+0100

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.0.4 + +

                                                                                                                add jQuery UI from WordPress 2020-11-01T1902+0100

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.1.4 + +

                                                                                                                automate passing version number for cache busting 2020-11-30T0646+0100

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 2.1.4 + +

                                                                                                                optionally enqueue an extra stylesheet 2020-12-04T2231+0100

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                Return values
                                                                                                                + mixed + — +
                                                                                                                + + +
                                                                                                                +
                                                                                                                +

                                                                                                                + run() + +

                                                                                                                + + +

                                                                                                                Executes the Plugin.

                                                                                                                + + + public + run() : mixed + +
                                                                                                                + + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                  +
                                                                                                                • Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution.
                                                                                                                • +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.6.5 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + contributor +
                                                                                                                +
                                                                                                                + +

                                                                                                                @felipelavinz

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + link +
                                                                                                                +
                                                                                                                + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                                                                                                                +
                                                                                                                + see +
                                                                                                                +
                                                                                                                + self::initializeWidgets() + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                Return values
                                                                                                                + mixed + — +
                                                                                                                + + +
                                                                                                                +
                                                                                                                +

                                                                                                                + initializeDashboard() + +

                                                                                                                + + +

                                                                                                                Initializes the Dashboard of the Plugin and loads them.

                                                                                                                + + + private + initializeDashboard() : mixed + +
                                                                                                                + + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                Return values
                                                                                                                + mixed + — +
                                                                                                                + + +
                                                                                                                +
                                                                                                                +

                                                                                                                + initializeTask() + +

                                                                                                                + + +

                                                                                                                Initializes the Plugin Task and registers the Task hooks.

                                                                                                                + + + private + initializeTask() : mixed + +
                                                                                                                + + + +
                                                                                                                + Tags + +
                                                                                                                +
                                                                                                                +
                                                                                                                + author +
                                                                                                                +
                                                                                                                + +

                                                                                                                Stefan Herndler

                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                + since +
                                                                                                                +
                                                                                                                + 1.5.0 + +
                                                                                                                + +
                                                                                                                +
                                                                                                                + +
                                                                                                                Return values
                                                                                                                + mixed + — +
                                                                                                                + + +
                                                                                                                +
                                                                                                                + +
                                                                                                                +
                                                                                                                +
                                                                                                                +
                                                                                                                +

                                                                                                                Search results

                                                                                                                + +
                                                                                                                +
                                                                                                                +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  + + +
                                                                                                                  + + + + diff --git a/docs/css/base.css b/docs/css/base.css new file mode 100644 index 0000000..3fa8f23 --- /dev/null +++ b/docs/css/base.css @@ -0,0 +1,1002 @@ + +:root { + /* Typography */ + --font-primary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --font-secondary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --line-height--primary: 1.6; + --letter-spacing--primary: .05rem; + --text-base-size: 1em; + --text-scale-ratio: 1.2; + + --text-xxs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-xs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-sm: calc(var(--text-base-size) / var(--text-scale-ratio)); + --text-md: var(--text-base-size); + --text-lg: calc(var(--text-base-size) * var(--text-scale-ratio)); + --text-xl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + + /* Colors */ + --primary-color: hsl(96, 57%, 60%); + --primary-color-darken: hsl(96, 57%, 40%); + --primary-color-darker: hsl(96, 57%, 20%); + --primary-color-lighten: hsl(96, 57%, 80%); + --primary-color-lighter: hsl(96, 57%, 97%); + --dark-gray: #d1d1d1; + --light-gray: #f0f0f0; + + --text-color: #4b3b40; + + --header-height: var(--spacing-xxxxl); + --header-bg-color: var(--primary-color); + --code-background-color: #f7faf5; + --code-border-color: #d6e7cb; + --button-border-color: var(--primary-color-darken); + --button-color: transparent; + --button-color-primary: var(--primary-color); + --button-text-color: #555; + --button-text-color-primary: white; + --popover-background-color: rgba(255, 255, 255, 0.75); + --link-color-primary: var(--primary-color-darken); + --link-hover-color-primary: var(--primary-color-darker); + --form-field-border-color: var(--dark-gray); + --form-field-color: #fff; + --admonition-success-color: var(--primary-color); + --admonition-border-color: silver; + --table-separator-color: var(--primary-color-lighten); + --title-text-color: var(--primary-color); + + --sidebar-border-color: var(--primary-color-lighten); + + /* Grid */ + --container-width: 1400px; + + /* Spacing */ + --spacing-base-size: 1rem; + --spacing-scale-ratio: 1.5; + + --spacing-xxxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-sm: calc(var(--spacing-base-size) / var(--spacing-scale-ratio)); + --spacing-md: var(--spacing-base-size); + --spacing-lg: calc(var(--spacing-base-size) * var(--spacing-scale-ratio)); + --spacing-xl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + + --border-radius-base-size: 3px; +} + +/* Base Styles +-------------------------------------------------- */ +body { + color: var(--text-color); + font-family: var(--font-primary); + font-size: var(--text-md); + letter-spacing: var(--letter-spacing--primary); + line-height: var(--line-height--primary); +} + +.phpdocumentor h1, +.phpdocumentor h2, +.phpdocumentor h3, +.phpdocumentor h4, +.phpdocumentor h5, +.phpdocumentor h6 { + margin-bottom: var(--spacing-lg); + margin-top: var(--spacing-lg); + font-weight: 600; +} + +.phpdocumentor h1 { + font-size: var(--text-xxxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.2; + margin-top: 0; +} + +.phpdocumentor h2 { + font-size: var(--text-xxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.25; + margin-top: 0; +} + +.phpdocumentor h3 { + font-size: var(--text-xxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.3; +} + +.phpdocumentor h4 { + font-size: var(--text-xl); + letter-spacing: calc(var(--letter-spacing--primary) / 2); + line-height: 1.35; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor h5 { + font-size: var(--text-lg); + letter-spacing: calc(var(--letter-spacing--primary) / 4); + line-height: 1.5; + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h6 { + font-size: var(--text-md); + letter-spacing: 0; + line-height: var(--line-height--primary); + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h1 .headerlink, +.phpdocumentor h2 .headerlink, +.phpdocumentor h3 .headerlink, +.phpdocumentor h4 .headerlink, +.phpdocumentor h5 .headerlink, +.phpdocumentor h6 .headerlink +{ + transition: all .3s ease-in-out; + opacity: 0; + text-decoration: none; + color: silver; + font-size: 80%; +} + +.phpdocumentor h1:hover .headerlink, +.phpdocumentor h2:hover .headerlink, +.phpdocumentor h3:hover .headerlink, +.phpdocumentor h4:hover .headerlink, +.phpdocumentor h5:hover .headerlink, +.phpdocumentor h6:hover .headerlink +{ + opacity: 1; +} +.phpdocumentor p { + margin-top: 0; + margin-bottom: var(--spacing-md); +} +.phpdocumentor figure { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-line { + border-top: 1px solid #E1E1E1; + border-width: 0; + margin-bottom: var(--spacing-xxl); + margin-top: var(--spacing-xxl); +} +.phpdocumentor-section { + box-sizing: border-box; + margin: 0 auto; + max-width: var(--container-width); + padding: 0 var(--spacing-lg); + position: relative; + width: 100%; +} + +@media (min-width: 1200px) { + .phpdocumentor-section { + padding: 0; + width: 95%; + } +} +.phpdocumentor-column { + box-sizing: border-box; + float: left; + width: 100%; +} + +@media (min-width: 550px) { + .phpdocumentor-column { + margin-left: 4%; + } + + .phpdocumentor-column:first-child { + margin-left: 0; + } + + .-one.phpdocumentor-column { + width: 4.66666666667%; + } + + .-two.phpdocumentor-column { + width: 13.3333333333%; + } + + .-three.phpdocumentor-column { + width: 22%; + } + + .-four.phpdocumentor-column { + width: 30.6666666667%; + } + + .-five.phpdocumentor-column { + width: 39.3333333333%; + } + + .-six.phpdocumentor-column { + width: 48%; + } + + .-seven.phpdocumentor-column { + width: 56.6666666667%; + } + + .-eight.phpdocumentor-column { + width: 65.3333333333%; + } + + .-nine.phpdocumentor-column { + width: 74.0%; + } + + .-ten.phpdocumentor-column { + width: 82.6666666667%; + } + + .-eleven.phpdocumentor-column { + width: 91.3333333333%; + } + + .-twelve.phpdocumentor-column { + margin-left: 0; + width: 100%; + } + + .-one-third.phpdocumentor-column { + width: 30.6666666667%; + } + + .-two-thirds.phpdocumentor-column { + width: 65.3333333333%; + } + + .-one-half.phpdocumentor-column { + width: 48%; + } + + /* Offsets */ + .-offset-by-one.phpdocumentor-column { + margin-left: 8.66666666667%; + } + + .-offset-by-two.phpdocumentor-column { + margin-left: 17.3333333333%; + } + + .-offset-by-three.phpdocumentor-column { + margin-left: 26%; + } + + .-offset-by-four.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-five.phpdocumentor-column { + margin-left: 43.3333333333%; + } + + .-offset-by-six.phpdocumentor-column { + margin-left: 52%; + } + + .-offset-by-seven.phpdocumentor-column { + margin-left: 60.6666666667%; + } + + .-offset-by-eight.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-nine.phpdocumentor-column { + margin-left: 78.0%; + } + + .-offset-by-ten.phpdocumentor-column { + margin-left: 86.6666666667%; + } + + .-offset-by-eleven.phpdocumentor-column { + margin-left: 95.3333333333%; + } + + .-offset-by-one-third.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-two-thirds.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-one-half.phpdocumentor-column { + margin-left: 52%; + } +} +.phpdocumentor a { + color: var(--link-color-primary); +} + +.phpdocumentor a:hover { + color: var(--link-hover-color-primary); +} +.phpdocumentor-button { + background-color: var(--button-color); + border: 1px solid var(--button-border-color); + border-radius: var(--border-radius-base-size); + box-sizing: border-box; + color: var(--button-text-color); + cursor: pointer; + display: inline-block; + font-size: var(--text-sm); + font-weight: 600; + height: 38px; + letter-spacing: .1rem; + line-height: 38px; + padding: 0 var(--spacing-xxl); + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-button .-wide { + width: 100%; +} + +.phpdocumentor-button:hover, +.phpdocumentor-button:focus { + border-color: #888; + color: #333; + outline: 0; +} + +.phpdocumentor-button.-primary { + background-color: var(--button-color-primary); + border-color: var(--button-color-primary); + color: var(--button-text-color-primary); +} + +.phpdocumentor-button.-primary:hover, +.phpdocumentor-button.-primary:focus { + background-color: var(--link-color-primary); + border-color: var(--link-color-primary); + color: var(--button-text-color-primary); +} +.phpdocumentor form { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-field { + background-color: var(--form-field-color); + border: 1px solid var(--form-field-border-color); + border-radius: var(--border-radius-base-size); + box-shadow: none; + box-sizing: border-box; + height: 38px; + padding: var(--spacing-xxxs) var(--spacing-xxs); /* The 6px vertically centers text on FF, ignored by Webkit */ + margin-bottom: var(--spacing-md); +} + +/* Removes awkward default styles on some inputs for iOS */ +input[type="email"], +input[type="number"], +input[type="search"], +input[type="text"], +input[type="tel"], +input[type="url"], +input[type="password"], +textarea { + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; +} + +.phpdocumentor-textarea { + min-height: 65px; + padding-bottom: var(--spacing-xxxs); + padding-top: var(--spacing-xxxs); +} + +.phpdocumentor-field:focus { + border: 1px solid var(--button-color-primary); + outline: 0; +} + +.phpdocumentor-label { + display: block; + margin-bottom: var(--spacing-xs); +} + +.phpdocumentor-fieldset { + border-width: 0; + padding: 0; +} + +input[type="checkbox"].phpdocumentor-field, +input[type="radio"].phpdocumentor-field { + display: inline; +} +div.phpdocumentor-list > ul, +ul.phpdocumentor-list { + list-style: circle inside; +} + +ol.phpdocumentor-list { + list-style: decimal inside; +} + +div.phpdocumentor-list > ul, +ol.phpdocumentor-list, +ul.phpdocumentor-list { + margin-top: 0; + padding-left: 0; + margin-bottom: var(--spacing-md); +} + +dl { + margin-bottom: var(--spacing-md); +} + +div.phpdocumentor-list > ul ul, +ul.phpdocumentor-list ul.phpdocumentor-list, +ul.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ul.phpdocumentor-list { + font-size: var(--text-sm); + margin: var(--spacing-xs) 0 var(--spacing-xs) calc(var(--spacing-xs) * 2); +} + +li.phpdocumentor-list { + margin-bottom: var(--spacing-md); +} +.phpdocumentor pre { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-code { + background: var(--code-background-color); + border: 1px solid var(--code-border-color); + border-radius: var(--border-radius-base-size); + font-size: var(--text-sm); + padding: var(--spacing-sm) var(--spacing-md); + width: 100%; + box-sizing: border-box; +} + +pre > .phpdocumentor-code { + display: block; + white-space: pre; +} +.phpdocumentor blockquote { + border-left: 4px solid var(--primary-color); + margin: var(--spacing-md) 0; + padding: var(--spacing-xs) var(--spacing-sm); + color: var(--primary-color-darker); + font-style: italic; + font-size: var(--text-sm); +} +.phpdocumentor table { + margin-bottom: var(--spacing-md); +} + +th.phpdocumentor-heading, +td.phpdocumentor-cell { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) var(--spacing-md); + text-align: left; +} + +th.phpdocumentor-heading:first-child, +td.phpdocumentor-cell:first-child { + padding-left: 0; +} + +th.phpdocumentor-heading:last-child, +td.phpdocumentor-cell:last-child { + padding-right: 0; +} + +.phpdocumentor-header { + display: flex; + flex-direction: row; + align-items: stretch; + flex-wrap: wrap; + justify-content: space-between; + height: auto; + padding: var(--spacing-md) var(--spacing-md); +} + +.phpdocumentor-header__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-header__menu-icon { + font-size: 2rem; + color: var(--primary-color); +} + +.phpdocumentor-header__menu-button:checked ~ .phpdocumentor-topnav { + max-height: 250px; + padding-top: var(--spacing-md); +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + flex-direction: row; + padding: var(--spacing-lg) var(--spacing-lg); + min-height: var(--header-height); + } + + .phpdocumentor-header__menu-icon { + display: none; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + padding-top: 0; + padding-bottom: 0; + } +} +@media (min-width: 1200px) { + .phpdocumentor-header { + padding: 0; + } +} +.phpdocumentor-title { + box-sizing: border-box; + color: var(--title-text-color); + font-size: var(--text-xxl); + letter-spacing: .05rem; + font-weight: normal; + width: auto; + margin: 0; + display: flex; + align-items: center; +} + +.phpdocumentor-title.-without-divider { + border: none; +} + +.phpdocumentor-title__link { + transition: all .3s ease-out; + display: flex; + color: var(--title-text-color); + text-decoration: none; + font-weight: normal; + white-space: nowrap; + transform: scale(.75); + transform-origin: left; +} + +.phpdocumentor-title__link:hover { + transform: perspective(15rem) translateX(.5rem); + font-weight: 600; +} + +@media (min-width: 1000px) { + .phpdocumentor-title { + width: 30.6666666667%; + border-right: var(--sidebar-border-color) solid 1px; + } + + .phpdocumentor-title__link { + transform-origin: left; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-title__link { + transform: scale(.85); + } +} + +@media (min-width: 1200px) { + .phpdocumentor-title__link { + transform: scale(1); + } +} +.phpdocumentor-topnav { + display: flex; + align-items: center; + margin: 0; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s ease-out; + flex-basis: 100%; +} + +.phpdocumentor-topnav__menu { + text-align: right; + list-style: none; + margin: 0; + padding: 0; + flex: 1; + display: flex; + flex-flow: row wrap; + justify-content: center; +} + +.phpdocumentor-topnav__menu-item { + margin: 0; + width: 100%; + display: inline-block; + text-align: center; + padding: var(--spacing-sm) 0 +} + +.phpdocumentor-topnav__menu-item.-social { + width: auto; + padding: var(--spacing-sm) +} + +.phpdocumentor-topnav__menu-item a { + display: inline-block; + color: var(--text-color); + text-decoration: none; + font-size: var(--text-lg); + transition: all .3s ease-out; + border-bottom: 1px dotted transparent; + line-height: 1; +} + +.phpdocumentor-topnav__menu-item a:hover { + transform: perspective(15rem) translateY(.1rem); + border-bottom: 1px dotted var(--text-color); +} + +@media (min-width: 1000px) { + .phpdocumentor-topnav { + max-height: none; + overflow: visible; + flex-basis: auto; + } + + .phpdocumentor-topnav__menu { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; + } + + .phpdocumentor-topnav__menu-item, + .phpdocumentor-topnav__menu-item.-social { + width: auto; + display: inline; + text-align: right; + padding: 0 0 0 var(--spacing-md) + } +} +.phpdocumentor-sidebar { + margin: 0; + overflow: hidden; + max-height: 0; +} + +.phpdocumentor .phpdocumentor-sidebar .phpdocumentor-list { + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + list-style: none; +} + +.phpdocumentor .phpdocumentor-sidebar li { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 0 0 var(--spacing-xxxs) var(--spacing-md); +} + +.phpdocumentor .phpdocumentor-sidebar abbr, +.phpdocumentor .phpdocumentor-sidebar a { + text-decoration: none; + border-bottom: none; + color: var(--text-color); + font-size: var(--text-md); + padding-left: 0; + transition: padding-left .4s ease-out; +} + +.phpdocumentor .phpdocumentor-sidebar a:hover { + padding-left: 5px; + font-weight: 600; +} + +.phpdocumentor .phpdocumentor-sidebar__category > * { + border-left: 1px solid var(--primary-color-lighten); +} + +.phpdocumentor .phpdocumentor-sidebar__category { + margin-bottom: var(--spacing-lg); +} + +.phpdocumentor .phpdocumentor-sidebar__category-header { + font-size: var(--text-md); + margin-bottom: var(--spacing-xs); + color: var(--link-color-primary); + font-weight: 600; + border-left: 0; +} + +.phpdocumentor .phpdocumentor-sidebar__root-package, +.phpdocumentor .phpdocumentor-sidebar__root-namespace { + font-size: var(--text-md); + margin: 0; + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + color: var(--text-color); + font-weight: normal; +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + border-right: var(--sidebar-border-color) solid 1px; + } +} + +.phpdocumentor-sidebar__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-sidebar__menu-icon { + font-size: var(--text-md); + font-weight: 600; + background: var(--primary-color); + color: white; + margin: 0 0 var(--spacing-lg); + display: block; + padding: var(--spacing-sm); + text-align: center; + border-radius: 3px; + text-transform: uppercase; + letter-spacing: .15rem; +} + +.phpdocumentor-sidebar__menu-button:checked ~ .phpdocumentor-sidebar { + max-height: 100%; + padding-top: var(--spacing-md); +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + overflow: visible; + max-height: 100%; + } + + .phpdocumentor-sidebar__menu-icon { + display: none; + } +} +.phpdocumentor-admonition { + border: 1px solid var(--admonition-border-color); + border-radius: var(--border-radius-base-size); + border-color: var(--primary-color-lighten); + background-color: var(--primary-color-lighter); + font-size: 85%; + padding: .5rem; + margin: 2rem 0; + display: flex; + flex-direction: row; +} + +.phpdocumentor-admonition--success { + border-color: var(--admonition-success-color); +} + +.phpdocumentor-admonition__icon { + font-size: 2rem; + margin: .75rem 0.75rem 1.25rem 0.5rem; + color: var(--primary-color); +} +.phpdocumentor ul.phpdocumentor-breadcrumbs { + font-size: var(--text-md); + list-style: none; + margin: 0; + padding: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs a { + color: var(--text-color); + text-decoration: none; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li { + display: inline-block; + margin: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li + li:before { + color: var(--dark-gray); + content: "\\\A0"; + padding: 0; +} +.phpdocumentor .phpdocumentor-back-to-top { + position: fixed; + bottom: 2rem; + font-size: 2.5rem; + opacity: .25; + transition: all .3s ease-in-out; + right: 2rem; +} + +.phpdocumentor .phpdocumentor-back-to-top:hover { + color: var(--link-color-primary); + opacity: 1; +} +.phpdocumentor-search { + position: relative; + display: none; /** disable by default for non-js flow */ + opacity: .3; /** white-out default for loading indication */ + transition: opacity .3s, background .3s; + margin: var(--spacing-sm) 0; + flex: 1; + min-width: 100%; +} + +.phpdocumentor-search label { + display: flex; + align-items: center; + flex: 1; +} + +.phpdocumentor-search__icon { + color: var(--primary-color); + margin-right: var(--spacing-sm); + width: 1rem; + height: 1rem; +} + +.phpdocumentor-search--enabled { + display: flex; +} + +.phpdocumentor-search--active { + opacity: 1; +} + +.phpdocumentor-search input:disabled { + background-color: lightgray; +} + +.phpdocumentor-search__field:focus, +.phpdocumentor-search__field { + margin-bottom: 0; + border: 0; + border-bottom: 2px solid var(--primary-color); + padding: 0; + border-radius: 0; + flex: 1; +} + +@media (min-width: 1000px) { + .phpdocumentor-search { + min-width: auto; + max-width: 20rem; + margin: 0 0 0 auto; + } +} +.phpdocumentor-content { + position: relative; +} + +.phpdocumentor-search-results { + backdrop-filter: blur(5px); + background: var(--popover-background-color); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + padding: 0; + opacity: 1; + pointer-events: all; + + transition: opacity .3s, background .3s; +} + +.phpdocumentor-search-results--hidden { + background: transparent; + backdrop-filter: blur(0); + opacity: 0; + pointer-events: none; +} + +.phpdocumentor-search-results__dialog { + width: 100%; + background: white; + max-height: 100%; + display: flex; + flex-direction: column; +} + +.phpdocumentor-search-results__body { + overflow: auto; +} + +.phpdocumentor-search-results__header { + padding: var(--spacing-lg); + display: flex; + justify-content: space-between; + background: var(--primary-color-darken); + color: white; + align-items: center; +} + +.phpdocumentor-search-results__close { + font-size: var(--text-xl); + background: none; + border: none; + padding: 0; + margin: 0; +} + +.phpdocumentor .phpdocumentor-search-results__title { + font-size: var(--text-xl); + margin-bottom: 0; +} + +.phpdocumentor-search-results__entries { + list-style: none; + padding: 0 var(--spacing-lg); + margin: 0; +} + +.phpdocumentor-search-results__entry { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) 0; + text-align: left; +} + +.phpdocumentor-search-results__entry a { + display: block; +} + +.phpdocumentor-search-results__entry small { + margin-top: var(--spacing-xs); + margin-bottom: var(--spacing-md); + color: var(--primary-color-darker); + display: block; + word-break: break-word; +} + +.phpdocumentor-search-results__entry h3 { + font-size: var(--text-lg); + margin: 0; +} + +@media (min-width: 550px) { + .phpdocumentor-search-results { + padding: 0 var(--spacing-lg); + } + + .phpdocumentor-search-results__entry h3 { + font-size: var(--text-xxl); + } + + .phpdocumentor-search-results__dialog { + margin: var(--spacing-xl) auto; + max-width: 40rem; + background: white; + border: 1px solid silver; + box-shadow: 0 2px 5px silver; + max-height: 40rem; + border-radius: 3px; + } +} + +/* Used for screen readers and such */ +.visually-hidden { + display: none; +} diff --git a/docs/css/normalize.css b/docs/css/normalize.css new file mode 100644 index 0000000..46f646a --- /dev/null +++ b/docs/css/normalize.css @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/docs/css/template.css b/docs/css/template.css new file mode 100644 index 0000000..fb905f3 --- /dev/null +++ b/docs/css/template.css @@ -0,0 +1,169 @@ +.phpdocumentor-summary { + font-style: italic; +} +.phpdocumentor-description { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-element { + position: relative; +} + +.phpdocumentor .phpdocumentor-element__name { + line-height: 1; +} + +.phpdocumentor-element__package, +.phpdocumentor-element__extends, +.phpdocumentor-element__implements { + display: block; + font-size: var(--text-xxs); + font-weight: normal; + opacity: .7; +} + +.phpdocumentor-element__package .phpdocumentor-breadcrumbs { + display: inline; +} + +.phpdocumentor-element:not(:last-child) { + border-bottom: 1px solid var(--primary-color-lighten); + padding-bottom: var(--spacing-lg); +} + +.phpdocumentor-element.-deprecated .phpdocumentor-element__name { + text-decoration: line-through; +} + +.phpdocumentor-element__modifier { + font-size: var(--text-xxs); + padding: calc(var(--spacing-base-size) / 4) calc(var(--spacing-base-size) / 2); + color: var(--text-color); + background-color: var(--light-gray); + border-radius: 3px; + text-transform: uppercase; +} +.phpdocumentor-signature { + display: inline-block; + font-size: var(--text-sm); + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-signature.-deprecated .phpdocumentor-signature__name { + text-decoration: line-through; +} +.phpdocumentor-table-of-contents { +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry { + padding-top: var(--spacing-xs); + margin-left: 2rem; + display: flex; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > a { + flex: 0 1 auto; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > span { + flex: 1; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:after { + content: ''; + height: 12px; + width: 12px; + left: 16px; + position: absolute; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-private:after { + background: url('data:image/svg+xml;utf8,') no-repeat; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-protected:after { + left: 13px; + background: url('data:image/svg+xml;utf8,') no-repeat; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:before { + width: 1.25rem; + height: 1.25rem; + line-height: 1.25rem; + background: transparent url('data:image/svg+xml;utf8,') no-repeat center center; + content: ''; + position: absolute; + left: 0; + border-radius: 50%; + font-weight: 600; + color: white; + text-align: center; + font-size: .75rem; + margin-top: .2rem; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-method:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-function:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-property:before { + content: 'P' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-constant:before { + content: 'C'; + background-color: transparent; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-class:before { + content: 'C' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-interface:before { + content: 'I' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-trait:before { + content: 'T' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-namespace:before { + content: 'N' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-package:before { + content: 'P' +} + +.phpdocumentor-table-of-contents dd { + font-style: italic; + margin-left: 2rem; +} +.phpdocumentor-element-found-in { + position: absolute; + top: 0; + right: 0; + font-size: var(--text-sm); + color: gray; +} +.phpdocumentor-class-graph { + width: 100%; height: 600px; border:1px solid black; overflow: hidden +} + +.phpdocumentor-class-graph__graph { + width: 100%; +} +.phpdocumentor-tag-list__definition { + display: flex; +} + +.phpdocumentor-tag-link { + margin-right: var(--spacing-sm); +} diff --git a/docs/files/class-config.html b/docs/files/class-config.html new file mode 100644 index 0000000..27fa852 --- /dev/null +++ b/docs/files/class-config.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                  +

                                                                                                                  Documentation

                                                                                                                  + + + + + +
                                                                                                                  + +
                                                                                                                  +
                                                                                                                  + + + + +
                                                                                                                  + + +
                                                                                                                  +

                                                                                                                  config.php

                                                                                                                  + + + +

                                                                                                                  + Interfaces, Classes and Traits + +

                                                                                                                  + +
                                                                                                                  + +
                                                                                                                  MCI_Footnotes_Config
                                                                                                                  +
                                                                                                                  Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                  + +
                                                                                                                  + + + + + + + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +
                                                                                                                  +

                                                                                                                  Search results

                                                                                                                  + +
                                                                                                                  +
                                                                                                                  +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    + + +
                                                                                                                    + + + + diff --git a/docs/files/class-convert.html b/docs/files/class-convert.html new file mode 100644 index 0000000..332a478 --- /dev/null +++ b/docs/files/class-convert.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                    +

                                                                                                                    Documentation

                                                                                                                    + + + + + +
                                                                                                                    + +
                                                                                                                    +
                                                                                                                    + + + + +
                                                                                                                    + + +
                                                                                                                    +

                                                                                                                    convert.php

                                                                                                                    + + + +

                                                                                                                    + Interfaces, Classes and Traits + +

                                                                                                                    + +
                                                                                                                    + +
                                                                                                                    MCI_Footnotes_Convert
                                                                                                                    +
                                                                                                                    Converts data types and Footnotes specific values.
                                                                                                                    + +
                                                                                                                    + + + + + + + +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +
                                                                                                                    +

                                                                                                                    Search results

                                                                                                                    + +
                                                                                                                    +
                                                                                                                    +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      + + +
                                                                                                                      + + + + diff --git a/docs/files/class-dashboard-init.html b/docs/files/class-dashboard-init.html new file mode 100644 index 0000000..b64a13d --- /dev/null +++ b/docs/files/class-dashboard-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                      +

                                                                                                                      Documentation

                                                                                                                      + + + + + +
                                                                                                                      + +
                                                                                                                      +
                                                                                                                      + + + + +
                                                                                                                      + + +
                                                                                                                      +

                                                                                                                      init.php

                                                                                                                      + + + +

                                                                                                                      + Interfaces, Classes and Traits + +

                                                                                                                      + +
                                                                                                                      + +
                                                                                                                      MCI_Footnotes_Layout_Init
                                                                                                                      +
                                                                                                                      Handles the Settings interface of the Plugin.
                                                                                                                      + +
                                                                                                                      + + + + + + + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +
                                                                                                                      +

                                                                                                                      Search results

                                                                                                                      + +
                                                                                                                      +
                                                                                                                      +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        + + +
                                                                                                                        + + + + diff --git a/docs/files/class-dashboard-layout.html b/docs/files/class-dashboard-layout.html new file mode 100644 index 0000000..18778f8 --- /dev/null +++ b/docs/files/class-dashboard-layout.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                        +

                                                                                                                        Documentation

                                                                                                                        + + + + + +
                                                                                                                        + +
                                                                                                                        +
                                                                                                                        + + + + +
                                                                                                                        + + +
                                                                                                                        +

                                                                                                                        layout.php

                                                                                                                        + + + +

                                                                                                                        + Interfaces, Classes and Traits + +

                                                                                                                        + +
                                                                                                                        + +
                                                                                                                        MCI_Footnotes_LayoutEngine
                                                                                                                        +
                                                                                                                        Layout Engine for the administration dashboard.
                                                                                                                        + +
                                                                                                                        + + + + + + + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +
                                                                                                                        +

                                                                                                                        Search results

                                                                                                                        + +
                                                                                                                        +
                                                                                                                        +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          + + +
                                                                                                                          + + + + diff --git a/docs/files/class-dashboard-subpage-diagnostics.html b/docs/files/class-dashboard-subpage-diagnostics.html new file mode 100644 index 0000000..e6ed92b --- /dev/null +++ b/docs/files/class-dashboard-subpage-diagnostics.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                          +

                                                                                                                          Documentation

                                                                                                                          + + + + + +
                                                                                                                          + +
                                                                                                                          +
                                                                                                                          + + + + +
                                                                                                                          + + +
                                                                                                                          +

                                                                                                                          subpage-diagnostics.php

                                                                                                                          + + + +

                                                                                                                          + Interfaces, Classes and Traits + +

                                                                                                                          + +
                                                                                                                          + +
                                                                                                                          MCI_Footnotes_Layout_Diagnostics
                                                                                                                          +
                                                                                                                          Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                          + +
                                                                                                                          + + + + + + + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +
                                                                                                                          +

                                                                                                                          Search results

                                                                                                                          + +
                                                                                                                          +
                                                                                                                          +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            + + +
                                                                                                                            + + + + diff --git a/docs/files/class-dashboard-subpage-main.html b/docs/files/class-dashboard-subpage-main.html new file mode 100644 index 0000000..62a90fc --- /dev/null +++ b/docs/files/class-dashboard-subpage-main.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                            +

                                                                                                                            Documentation

                                                                                                                            + + + + + +
                                                                                                                            + +
                                                                                                                            +
                                                                                                                            + + + + +
                                                                                                                            + + +
                                                                                                                            +

                                                                                                                            subpage-main.php

                                                                                                                            + + + +

                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                            + +
                                                                                                                            + +
                                                                                                                            MCI_Footnotes_Layout_Settings
                                                                                                                            +
                                                                                                                            Displays and handles all Settings of the Plugin.
                                                                                                                            + +
                                                                                                                            + + + + + + + +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +
                                                                                                                            +

                                                                                                                            Search results

                                                                                                                            + +
                                                                                                                            +
                                                                                                                            +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              + + +
                                                                                                                              + + + + diff --git a/docs/files/class-hooks.html b/docs/files/class-hooks.html new file mode 100644 index 0000000..b57ef84 --- /dev/null +++ b/docs/files/class-hooks.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                              +

                                                                                                                              Documentation

                                                                                                                              + + + + + +
                                                                                                                              + +
                                                                                                                              +
                                                                                                                              + + + + +
                                                                                                                              + + +
                                                                                                                              +

                                                                                                                              hooks.php

                                                                                                                              + + + +

                                                                                                                              + Interfaces, Classes and Traits + +

                                                                                                                              + +
                                                                                                                              + +
                                                                                                                              MCI_Footnotes_Hooks
                                                                                                                              +
                                                                                                                              Registers all WordPress Hooks and executes them on demand.
                                                                                                                              + +
                                                                                                                              + + + + + + + +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +
                                                                                                                              +

                                                                                                                              Search results

                                                                                                                              + +
                                                                                                                              +
                                                                                                                              +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                + + +
                                                                                                                                + + + + diff --git a/docs/files/class-init.html b/docs/files/class-init.html new file mode 100644 index 0000000..27020fe --- /dev/null +++ b/docs/files/class-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                +

                                                                                                                                Documentation

                                                                                                                                + + + + + +
                                                                                                                                + +
                                                                                                                                +
                                                                                                                                + + + + +
                                                                                                                                + + +
                                                                                                                                +

                                                                                                                                init.php

                                                                                                                                + + + +

                                                                                                                                + Interfaces, Classes and Traits + +

                                                                                                                                + +
                                                                                                                                + +
                                                                                                                                MCI_Footnotes
                                                                                                                                +
                                                                                                                                Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                + +
                                                                                                                                + + + + + + + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                +

                                                                                                                                Search results

                                                                                                                                + +
                                                                                                                                +
                                                                                                                                +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + +
                                                                                                                                  + + + + diff --git a/docs/files/class-language.html b/docs/files/class-language.html new file mode 100644 index 0000000..db941a6 --- /dev/null +++ b/docs/files/class-language.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                  +

                                                                                                                                  Documentation

                                                                                                                                  + + + + + +
                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  + + + + +
                                                                                                                                  + + +
                                                                                                                                  +

                                                                                                                                  language.php

                                                                                                                                  + + + +

                                                                                                                                  + Interfaces, Classes and Traits + +

                                                                                                                                  + +
                                                                                                                                  + +
                                                                                                                                  MCI_Footnotes_Language
                                                                                                                                  +
                                                                                                                                  Loads text domain of current or default language for localization.
                                                                                                                                  + +
                                                                                                                                  + + + + + + + +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Search results

                                                                                                                                  + +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    + + +
                                                                                                                                    + + + + diff --git a/docs/files/class-settings.html b/docs/files/class-settings.html new file mode 100644 index 0000000..910ad5e --- /dev/null +++ b/docs/files/class-settings.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                    +

                                                                                                                                    Documentation

                                                                                                                                    + + + + + +
                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    + + + + +
                                                                                                                                    + + +
                                                                                                                                    +

                                                                                                                                    settings.php

                                                                                                                                    + + + +

                                                                                                                                    + Interfaces, Classes and Traits + +

                                                                                                                                    + +
                                                                                                                                    + +
                                                                                                                                    MCI_Footnotes_Settings
                                                                                                                                    +
                                                                                                                                    Loads the settings values, sets to default values if undefined.
                                                                                                                                    + +
                                                                                                                                    + + + + + + + +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                    +

                                                                                                                                    Search results

                                                                                                                                    + +
                                                                                                                                    +
                                                                                                                                    +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      + + +
                                                                                                                                      + + + + diff --git a/docs/files/class-task.html b/docs/files/class-task.html new file mode 100644 index 0000000..d4b6618 --- /dev/null +++ b/docs/files/class-task.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                      +

                                                                                                                                      Documentation

                                                                                                                                      + + + + + +
                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      + + + + +
                                                                                                                                      + + +
                                                                                                                                      +

                                                                                                                                      task.php

                                                                                                                                      + + + +

                                                                                                                                      + Interfaces, Classes and Traits + +

                                                                                                                                      + +
                                                                                                                                      + +
                                                                                                                                      MCI_Footnotes_Task
                                                                                                                                      +
                                                                                                                                      Searches and replaces the footnotes.
                                                                                                                                      + +
                                                                                                                                      + + + + + + + +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                      +

                                                                                                                                      Search results

                                                                                                                                      + +
                                                                                                                                      +
                                                                                                                                      +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        + + +
                                                                                                                                        + + + + diff --git a/docs/files/class-template.html b/docs/files/class-template.html new file mode 100644 index 0000000..09b8714 --- /dev/null +++ b/docs/files/class-template.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                        +

                                                                                                                                        Documentation

                                                                                                                                        + + + + + +
                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        + + + + +
                                                                                                                                        + + +
                                                                                                                                        +

                                                                                                                                        template.php

                                                                                                                                        + + + +

                                                                                                                                        + Interfaces, Classes and Traits + +

                                                                                                                                        + +
                                                                                                                                        + +
                                                                                                                                        MCI_Footnotes_Template
                                                                                                                                        +
                                                                                                                                        Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                        + +
                                                                                                                                        + + + + + + + +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                        +

                                                                                                                                        Search results

                                                                                                                                        + +
                                                                                                                                        +
                                                                                                                                        +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          + + +
                                                                                                                                          + + + + diff --git a/docs/files/class-widgets-base.html b/docs/files/class-widgets-base.html new file mode 100644 index 0000000..edfbc18 --- /dev/null +++ b/docs/files/class-widgets-base.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                          +

                                                                                                                                          Documentation

                                                                                                                                          + + + + + +
                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          + + + + +
                                                                                                                                          + + +
                                                                                                                                          +

                                                                                                                                          base.php

                                                                                                                                          + + + +

                                                                                                                                          + Interfaces, Classes and Traits + +

                                                                                                                                          + +
                                                                                                                                          + +
                                                                                                                                          MCI_Footnotes_WidgetBase
                                                                                                                                          +
                                                                                                                                          Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                          + +
                                                                                                                                          + + + + + + + +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                          +

                                                                                                                                          Search results

                                                                                                                                          + +
                                                                                                                                          +
                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            + + +
                                                                                                                                            + + + + diff --git a/docs/files/class-widgets-reference-container.html b/docs/files/class-widgets-reference-container.html new file mode 100644 index 0000000..9553b8a --- /dev/null +++ b/docs/files/class-widgets-reference-container.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                            +

                                                                                                                                            Documentation

                                                                                                                                            + + + + + +
                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            + + + + +
                                                                                                                                            + + +
                                                                                                                                            +

                                                                                                                                            reference-container.php

                                                                                                                                            + + + +

                                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                                            + +
                                                                                                                                            + +
                                                                                                                                            MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                            +
                                                                                                                                            Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                            + +
                                                                                                                                            + + + + + + + +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                            +

                                                                                                                                            Search results

                                                                                                                                            + +
                                                                                                                                            +
                                                                                                                                            +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              + + +
                                                                                                                                              + + + + diff --git a/docs/files/class-wysiwyg.html b/docs/files/class-wysiwyg.html new file mode 100644 index 0000000..59d1315 --- /dev/null +++ b/docs/files/class-wysiwyg.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                              +

                                                                                                                                              Documentation

                                                                                                                                              + + + + + +
                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              + + + + +
                                                                                                                                              + + +
                                                                                                                                              +

                                                                                                                                              wysiwyg.php

                                                                                                                                              + + + +

                                                                                                                                              + Interfaces, Classes and Traits + +

                                                                                                                                              + +
                                                                                                                                              + +
                                                                                                                                              MCI_Footnotes_WYSIWYG
                                                                                                                                              +
                                                                                                                                              + +
                                                                                                                                              + + + + + + + +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                              +

                                                                                                                                              Search results

                                                                                                                                              + +
                                                                                                                                              +
                                                                                                                                              +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                + + +
                                                                                                                                                + + + + diff --git a/docs/files/footnotes.html b/docs/files/footnotes.html new file mode 100644 index 0000000..132a72c --- /dev/null +++ b/docs/files/footnotes.html @@ -0,0 +1,110 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                +

                                                                                                                                                Documentation

                                                                                                                                                + + + + + +
                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                + + + + +
                                                                                                                                                + + +
                                                                                                                                                +

                                                                                                                                                footnotes.php

                                                                                                                                                + + + + + + + + + + +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                +

                                                                                                                                                Search results

                                                                                                                                                + +
                                                                                                                                                +
                                                                                                                                                +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + + +
                                                                                                                                                  + + + + diff --git a/docs/files/includes.html b/docs/files/includes.html new file mode 100644 index 0000000..de8700d --- /dev/null +++ b/docs/files/includes.html @@ -0,0 +1,190 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                  +

                                                                                                                                                  Documentation

                                                                                                                                                  + + + + + +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + + + + +
                                                                                                                                                  + + +
                                                                                                                                                  +

                                                                                                                                                  includes.php

                                                                                                                                                  + + + + + +

                                                                                                                                                  + Table of Contents + +

                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                  +
                                                                                                                                                  Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                  + +
                                                                                                                                                  + + + + +
                                                                                                                                                  +

                                                                                                                                                  + Functions + +

                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                  + + +

                                                                                                                                                  Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                  + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                  + +
                                                                                                                                                  Parameters
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + $p_str_Directory + : string +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  Absolute Directory path to lookup for *.php files

                                                                                                                                                  +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + + +
                                                                                                                                                  + Tags + +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  + author +
                                                                                                                                                  +
                                                                                                                                                  + +

                                                                                                                                                  Stefan Herndler

                                                                                                                                                  +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + since +
                                                                                                                                                  +
                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  + + +
                                                                                                                                                  +
                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                  +

                                                                                                                                                  Search results

                                                                                                                                                  + +
                                                                                                                                                  +
                                                                                                                                                  +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    + + +
                                                                                                                                                    + + + + diff --git a/docs/graphs/classes.html b/docs/graphs/classes.html new file mode 100644 index 0000000..f77584f --- /dev/null +++ b/docs/graphs/classes.html @@ -0,0 +1,97 @@ + + + + + Documentation + + + + + + + + +
                                                                                                                                                    +

                                                                                                                                                    Documentation

                                                                                                                                                    + + + + + +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    + + + + +
                                                                                                                                                    +
                                                                                                                                                    + +
                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                    +

                                                                                                                                                    Search results

                                                                                                                                                    + +
                                                                                                                                                    +
                                                                                                                                                    +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + + +
                                                                                                                                                      + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..003b277 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,223 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                      +

                                                                                                                                                      Documentation

                                                                                                                                                      + + + + + +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + + + + +
                                                                                                                                                      +

                                                                                                                                                      Documentation

                                                                                                                                                      + + + + +

                                                                                                                                                      + Interfaces, Classes and Traits + +

                                                                                                                                                      + +
                                                                                                                                                      + +
                                                                                                                                                      MCI_Footnotes_Config
                                                                                                                                                      +
                                                                                                                                                      Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Convert
                                                                                                                                                      +
                                                                                                                                                      Converts data types and Footnotes specific values.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Layout_Init
                                                                                                                                                      +
                                                                                                                                                      Handles the Settings interface of the Plugin.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_LayoutEngine
                                                                                                                                                      +
                                                                                                                                                      Layout Engine for the administration dashboard.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                      +
                                                                                                                                                      Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Layout_Settings
                                                                                                                                                      +
                                                                                                                                                      Displays and handles all Settings of the Plugin.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Hooks
                                                                                                                                                      +
                                                                                                                                                      Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes
                                                                                                                                                      +
                                                                                                                                                      Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Language
                                                                                                                                                      +
                                                                                                                                                      Loads text domain of current or default language for localization.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Settings
                                                                                                                                                      +
                                                                                                                                                      Loads the settings values, sets to default values if undefined.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Task
                                                                                                                                                      +
                                                                                                                                                      Searches and replaces the footnotes.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Template
                                                                                                                                                      +
                                                                                                                                                      Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_WidgetBase
                                                                                                                                                      +
                                                                                                                                                      Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                      +
                                                                                                                                                      Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                      +
                                                                                                                                                      MCI_Footnotes_WYSIWYG
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      + + +

                                                                                                                                                      + Table of Contents + +

                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                      +
                                                                                                                                                      Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                      + +
                                                                                                                                                      + + + +
                                                                                                                                                      +

                                                                                                                                                      + Functions + +

                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                      + + +

                                                                                                                                                      Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                      + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                      + +
                                                                                                                                                      Parameters
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + $p_str_Directory + : string +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      Absolute Directory path to lookup for *.php files

                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + + +
                                                                                                                                                      + Tags + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      + author +
                                                                                                                                                      +
                                                                                                                                                      + +

                                                                                                                                                      Stefan Herndler

                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + since +
                                                                                                                                                      +
                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      + + +
                                                                                                                                                      +
                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                      +

                                                                                                                                                      Search results

                                                                                                                                                      + +
                                                                                                                                                      +
                                                                                                                                                      +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        + + +
                                                                                                                                                        + + + + diff --git a/docs/indices/files.html b/docs/indices/files.html new file mode 100644 index 0000000..7ac73fe --- /dev/null +++ b/docs/indices/files.html @@ -0,0 +1,142 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                        +

                                                                                                                                                        Documentation

                                                                                                                                                        + + + + + +
                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        + + + + +
                                                                                                                                                        + +

                                                                                                                                                        Files

                                                                                                                                                        +

                                                                                                                                                        B

                                                                                                                                                        + +

                                                                                                                                                        C

                                                                                                                                                        + +

                                                                                                                                                        F

                                                                                                                                                        + +

                                                                                                                                                        H

                                                                                                                                                        + +

                                                                                                                                                        I

                                                                                                                                                        + +

                                                                                                                                                        L

                                                                                                                                                        + +

                                                                                                                                                        R

                                                                                                                                                        + +

                                                                                                                                                        S

                                                                                                                                                        + +

                                                                                                                                                        T

                                                                                                                                                        + +

                                                                                                                                                        W

                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                        +

                                                                                                                                                        Search results

                                                                                                                                                        + +
                                                                                                                                                        +
                                                                                                                                                        +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + + +
                                                                                                                                                          + + + + diff --git a/docs/js/search.js b/docs/js/search.js new file mode 100644 index 0000000..a7e3595 --- /dev/null +++ b/docs/js/search.js @@ -0,0 +1,173 @@ +// Search module for phpDocumentor +// +// This module is a wrapper around fuse.js that will use a given index and attach itself to a +// search form and to a search results pane identified by the following data attributes: +// +// 1. data-search-form +// 2. data-search-results +// +// The data-search-form is expected to have a single input element of type 'search' that will trigger searching for +// a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated +// with rendered results. +// +// The search has various stages, upon loading this stage the data-search-form receives the CSS class +// 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended +// to hide the form by default and show it when it receives this class to achieve progressive enhancement for this +// feature. +// +// After loading this module, it is expected to load a search index asynchronously, for example: +// +// +// +// In this script the generated index should attach itself to the search module using the `appendIndex` function. By +// doing it like this the page will continue loading, unhindered by the loading of the search. +// +// After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will +// be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this +// point, the input field will also have it's 'disabled' attribute removed. +var Search = (function () { + var fuse; + var index = []; + var options = { + shouldSort: true, + threshold: 0.6, + location: 0, + distance: 100, + maxPatternLength: 32, + minMatchCharLength: 1, + keys: [ + "fqsen", + "name", + "summary", + "url" + ] + }; + + // Credit David Walsh (https://davidwalsh.name/javascript-debounce-function) + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + function debounce(func, wait, immediate) { + var timeout; + + return function executedFunction() { + var context = this; + var args = arguments; + + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; + } + + function close() { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + const scrollY = document.body.style.top; + document.body.style.position = ''; + document.body.style.top = ''; + window.scrollTo(0, parseInt(scrollY || '0') * -1); + // End scroll prevention + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + + form.classList.toggle('phpdocumentor-search--has-results', false); + searchResults.classList.add('phpdocumentor-search-results--hidden'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + searchField.blur(); + } + + function search(event) { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + document.body.style.position = 'fixed'; + document.body.style.top = `-${window.scrollY}px`; + // End scroll prevention + + // prevent enter's from autosubmitting + event.stopPropagation(); + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries'); + + searchResultEntries.innerHTML = ''; + + if (!event.target.value) { + close(); + return; + } + + form.classList.toggle('phpdocumentor-search--has-results', true); + searchResults.classList.remove('phpdocumentor-search-results--hidden'); + var results = fuse.search(event.target.value, {limit: 25}); + + results.forEach(function (result) { + var entry = document.createElement("li"); + entry.classList.add("phpdocumentor-search-results__entry"); + entry.innerHTML += '

                                                                                                                                                          ' + result.name + "

                                                                                                                                                          \n"; + entry.innerHTML += '' + result.fqsen + "\n"; + entry.innerHTML += '
                                                                                                                                                          ' + result.summary + '
                                                                                                                                                          '; + searchResultEntries.appendChild(entry) + }); + } + + function appendIndex(added) { + index = index.concat(added); + + // re-initialize search engine when appending an index after initialisation + if (typeof fuse !== 'undefined') { + fuse = new Fuse(index, options); + } + } + + function init() { + fuse = new Fuse(index, options); + + var form = document.querySelector('[data-search-form]'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + + var closeButton = document.querySelector('.phpdocumentor-search-results__close'); + closeButton.addEventListener('click', function() { close() }.bind(this)); + + var searchResults = document.querySelector('[data-search-results]'); + searchResults.addEventListener('click', function() { close() }.bind(this)); + + form.classList.add('phpdocumentor-search--active'); + + searchField.setAttribute('placeholder', 'Search (Press "/" to focus)'); + searchField.removeAttribute('disabled'); + searchField.addEventListener('keyup', debounce(search, 300)); + + window.addEventListener('keyup', function (event) { + if (event.key === '/') { + searchField.focus(); + } + if (event.code === 'Escape') { + close(); + } + }.bind(this)); + } + + return { + appendIndex, + init + } +})(); + +window.addEventListener('DOMContentLoaded', function () { + var form = document.querySelector('[data-search-form]'); + + // When JS is supported; show search box. Must be before including the search for it to take effect immediately + form.classList.add('phpdocumentor-search--enabled'); +}); + +window.addEventListener('load', function () { + Search.init(); +}); diff --git a/docs/js/searchIndex.js b/docs/js/searchIndex.js new file mode 100644 index 0000000..ca8f2cc --- /dev/null +++ b/docs/js/searchIndex.js @@ -0,0 +1,1419 @@ +Search.appendIndex( + [ + { + "fqsen": "\\MCI_Footnotes_Config", + "name": "MCI_Footnotes_Config", + "summary": "Contains\u0020all\u0020Plugin\u0020Constants.\u0020Contains\u0020no\u0020Method\u0020or\u0020Property.", + "url": "classes/MCI-Footnotes-Config.html" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_NAME", + "name": "C_STR_PLUGIN_NAME", + "summary": "Internal\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_PUBLIC_NAME", + "name": "C_STR_PLUGIN_PUBLIC_NAME", + "summary": "Public\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_PUBLIC_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_HEADING_NAME", + "name": "C_STR_PLUGIN_HEADING_NAME", + "summary": "Public\u0020Plugin\u0020name\u0020for\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_HEADING_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL", + "name": "C_STR_LOVE_SYMBOL", + "summary": "Html\u0020tag\u0020for\u0020the\u0020LOVE\u0020symbol.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL_HEADING", + "name": "C_STR_LOVE_SYMBOL_HEADING", + "summary": "HTML\u0020code\u0020for\u0020the\u0020\u0027love\u0027\u0020symbol\u0020used\u0020in\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL_HEADING" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_NO_LOVE_SLUG", + "name": "C_STR_NO_LOVE_SLUG", + "summary": "Short\u0020code\u0020to\u0020DON\u0027T\u0020display\u0020the\u0020\u0027LOVE\u0020ME\u0027\u0020slug\u0020on\u0020certain\u0020pages.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_NO_LOVE_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Convert", + "name": "MCI_Footnotes_Convert", + "summary": "Converts\u0020data\u0020types\u0020and\u0020Footnotes\u0020specific\u0020values.", + "url": "classes/MCI-Footnotes-Convert.html" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AIndex\u0028\u0029", + "name": "Index", + "summary": "Converts\u0020a\u0020integer\u0020into\u0020the\u0020user\u002Ddefined\u0020counter\u0020style\u0020for\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Convert.html#method_Index" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoLatin\u0028\u0029", + "name": "toLatin", + "summary": "Converts\u0020an\u0020integer\u0020into\u0020latin\u0020ascii\u0020characters,\u0020either\u0020lower\u0020or\u0020upper\u002Dcase.", + "url": "classes/MCI-Footnotes-Convert.html#method_toLatin" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoArabicLeading\u0028\u0029", + "name": "toArabicLeading", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020leading\u002D0\u0020integer.", + "url": "classes/MCI-Footnotes-Convert.html#method_toArabicLeading" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoRomanic\u0028\u0029", + "name": "toRomanic", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020romanic\u0020letter.", + "url": "classes/MCI-Footnotes-Convert.html#method_toRomanic" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoBool\u0028\u0029", + "name": "toBool", + "summary": "Converts\u0020a\u0020string\u0020depending\u0020on\u0020its\u0020value\u0020to\u0020a\u0020boolean.", + "url": "classes/MCI-Footnotes-Convert.html#method_toBool" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AgetArrow\u0028\u0029", + "name": "getArrow", + "summary": "Get\u0020a\u0020html\u0020Array\u0020short\u0020code\u0020depending\u0020on\u0020Arrow\u002DArray\u0020key\u0020index.", + "url": "classes/MCI-Footnotes-Convert.html#method_getArrow" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003Adebug\u0028\u0029", + "name": "debug", + "summary": "Displays\u0020a\u0020Variable.", + "url": "classes/MCI-Footnotes-Convert.html#method_debug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init", + "name": "MCI_Footnotes_Layout_Init", + "summary": "Handles\u0020the\u0020Settings\u0020interface\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Initializes\u0020all\u0020WordPress\u0020hooks\u0020for\u0020the\u0020Plugin\u0020Settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AinitializeSettings\u0028\u0029", + "name": "initializeSettings", + "summary": "Initializes\u0020all\u0020sub\u0020pages\u0020and\u0020registers\u0020the\u0020settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_initializeSettings" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterMainMenu\u0028\u0029", + "name": "registerMainMenu", + "summary": "Registers\u0020the\u0020new\u0020main\u0020menu\u0020for\u0020the\u0020WordPress\u0020dashboard.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerMainMenu" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterSubPages\u0028\u0029", + "name": "registerSubPages", + "summary": "Registers\u0020all\u0020SubPages\u0020for\u0020this\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerSubPages" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AdisplayOtherPlugins\u0028\u0029", + "name": "displayOtherPlugins", + "summary": "Displays\u0020other\u0020Plugins\u0020from\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_displayOtherPlugins" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AgetPluginMetaInformation\u0028\u0029", + "name": "getPluginMetaInformation", + "summary": "AJAX\u0020call.\u0020returns\u0020a\u0020JSON\u0020string\u0020containing\u0020meta\u0020information\u0020about\u0020a\u0020specific\u0020WordPress\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_getPluginMetaInformation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_SLUG", + "name": "C_STR_MAIN_MENU_SLUG", + "summary": "Slug\u0020for\u0020the\u0020Plugin\u0020main\u0020menu.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_TITLE", + "name": "C_STR_MAIN_MENU_TITLE", + "summary": "Plugin\u0020main\u0020menu\u0020name.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A\u0024a_arr_SubPageClasses", + "name": "a_arr_SubPageClasses", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Init.html#property_a_arr_SubPageClasses" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine", + "name": "MCI_Footnotes_LayoutEngine", + "summary": "Layout\u0020Engine\u0020for\u0020the\u0020administration\u0020dashboard.", + "url": "classes/MCI-Footnotes-LayoutEngine.html" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSection\u0028\u0029", + "name": "addSection", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020sub\u0020page\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddMetaBox\u0028\u0029", + "name": "addMetaBox", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020meta\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addMetaBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSubPage\u0028\u0029", + "name": "registerSubPage", + "summary": "Registers\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSubPage" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSections\u0028\u0029", + "name": "registerSections", + "summary": "Registers\u0020all\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterMetaBoxes\u0028\u0029", + "name": "registerMetaBoxes", + "summary": "Registers\u0020all\u0020Meta\u0020boxes\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AappendScripts\u0028\u0029", + "name": "appendScripts", + "summary": "Append\u0020javascript\u0020and\u0020css\u0020files\u0020for\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_appendScripts" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AdisplayContent\u0028\u0029", + "name": "displayContent", + "summary": "Displays\u0020the\u0020content\u0020of\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_displayContent" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AsaveSettings\u0028\u0029", + "name": "saveSettings", + "summary": "Save\u0020all\u0020Plugin\u0020settings.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_saveSettings" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ADescription\u0028\u0029", + "name": "Description", + "summary": "Output\u0020the\u0020Description\u0020of\u0020a\u0020section.\u0020May\u0020be\u0020overwritten\u0020in\u0020any\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_Description" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ALoadSetting\u0028\u0029", + "name": "LoadSetting", + "summary": "Loads\u0020specific\u0020setting\u0020and\u0020returns\u0020an\u0020array\u0020with\u0020the\u0020keys\u0020\u005Bid,\u0020name,\u0020value\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_LoadSetting" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNewline\u0028\u0029", + "name": "addNewline", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020start\u0020a\u0020new\u0020line.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNewline" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLineSpace\u0028\u0029", + "name": "addLineSpace", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020have\u0020a\u0020space\u0020between\u0020two\u0020lines.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLineSpace" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddText\u0028\u0029", + "name": "addText", + "summary": "Returns\u0020a\u0020simple\u0020text\u0020inside\u0020html\u0020\u003Cspan\u003E\u0020text.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addText" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLabel\u0028\u0029", + "name": "addLabel", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\/select\u0020label.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLabel" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextBox\u0028\u0029", + "name": "addTextBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddCheckbox\u0028\u0029", + "name": "addCheckbox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020checkbox\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addCheckbox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSelectBox\u0028\u0029", + "name": "addSelectBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020select\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSelectBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextArea\u0028\u0029", + "name": "addTextArea", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020text\u0020area.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextArea" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddColorSelection\u0028\u0029", + "name": "addColorSelection", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D\u0020with\u0020color\u0020selection\u0020class.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addColorSelection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNumBox\u0028\u0029", + "name": "addNumBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020num\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNumBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_str_SubPageHook", + "name": "a_str_SubPageHook", + "summary": "Stores\u0020the\u0020Hook\u0020connection\u0020string\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_str_SubPageHook" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_arr_Sections", + "name": "a_arr_Sections", + "summary": "Stores\u0020all\u0020Sections\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_arr_Sections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics", + "name": "MCI_Footnotes_Layout_Diagnostics", + "summary": "Displays\u0020Diagnostics\u0020of\u0020the\u0020web\u0020server,\u0020PHP\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003ADiagnostics\u0028\u0029", + "name": "Diagnostics", + "summary": "Displays\u0020a\u0020diagnostics\u0020about\u0020the\u0020web\u0020server,\u0020php\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_Diagnostics" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings", + "name": "MCI_Footnotes_Layout_Settings", + "summary": "Displays\u0020and\u0020handles\u0020all\u0020Settings\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AStartEnd\u0028\u0029", + "name": "StartEnd", + "summary": "Displays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020start\u0020and\u0020end\u0020tag\u0020short\u0020codes\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020numbering\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020scrolling\u0020behavior", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_StartEnd" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ANumbering\u0028\u0029", + "name": "Numbering", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Numbering" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AScrolling\u0028\u0029", + "name": "Scrolling", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Scrolling" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALove\u0028\u0029", + "name": "Love", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020\u0027I\u0020love\u0020Footnotes\u0027.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Love" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AExcerpts\u0028\u0029", + "name": "Excerpts", + "summary": "Displays\u0020the\u0020excerpt\u0020setting", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Excerpts" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ASuperscript\u0028\u0029", + "name": "Superscript", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnote\u0020referrers", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Superscript" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBox\u0028\u0029", + "name": "MouseOverBox", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnotes\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBox" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxPosition\u0028\u0029", + "name": "MouseOverBoxPosition", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxPosition" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxDimensions\u0028\u0029", + "name": "MouseOverBoxDimensions", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxDimensions" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTiming\u0028\u0029", + "name": "MouseOverBoxTiming", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTiming" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTruncation\u0028\u0029", + "name": "MouseOverBoxTruncation", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTruncation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxText\u0028\u0029", + "name": "MouseOverBoxText", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxText" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxAppearance\u0028\u0029", + "name": "MouseOverBoxAppearance", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxAppearance" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHyperlinkArrow\u0028\u0029", + "name": "HyperlinkArrow", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020prepended\u0020symbol", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_HyperlinkArrow" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSS\u0028\u0029", + "name": "CustomCSS", + "summary": "Displays\u0020the\u0020custom\u0020css\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSS" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSMigration\u0028\u0029", + "name": "CustomCSSMigration", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSMigration" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSNew\u0028\u0029", + "name": "CustomCSSNew", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSNew" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALookupHooks\u0028\u0029", + "name": "LookupHooks", + "summary": "Displays\u0020available\u0020Hooks\u0020to\u0020look\u0020for\u0020Footnote\u0020short\u0020codes.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_LookupHooks" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHelp\u0028\u0029", + "name": "Help", + "summary": "Displays\u0020a\u0020short\u0020introduction\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Help" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ADonate\u0028\u0029", + "name": "Donate", + "summary": "Displays\u0020all\u0020Donate\u0020button\u0020to\u0020support\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Donate" + }, { + "fqsen": "\\MCI_Footnotes_Hooks", + "name": "MCI_Footnotes_Hooks", + "summary": "Registers\u0020all\u0020WordPress\u0020Hooks\u0020and\u0020executes\u0020them\u0020on\u0020demand.", + "url": "classes/MCI-Footnotes-Hooks.html" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Registers\u0020all\u0020WordPress\u0020hooks.", + "url": "classes/MCI-Footnotes-Hooks.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AactivatePlugin\u0028\u0029", + "name": "activatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020activated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_activatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AdeactivatePlugin\u0028\u0029", + "name": "deactivatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020deactivated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_deactivatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AuninstallPlugin\u0028\u0029", + "name": "uninstallPlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020uninstalled.", + "url": "classes/MCI-Footnotes-Hooks.html#method_uninstallPlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003APluginLinks\u0028\u0029", + "name": "PluginLinks", + "summary": "Add\u0020Links\u0020to\u0020the\u0020Plugin\u0020in\u0020the\u0020\u0022installed\u0020Plugins\u0022\u0020page.", + "url": "classes/MCI-Footnotes-Hooks.html#method_PluginLinks" + }, { + "fqsen": "\\MCI_Footnotes", + "name": "MCI_Footnotes", + "summary": "Entry\u0020point\u0020of\u0020the\u0020Plugin.\u0020Loads\u0020the\u0020Dashboard\u0020and\u0020executes\u0020the\u0020Task.", + "url": "classes/MCI-Footnotes.html" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003Arun\u0028\u0029", + "name": "run", + "summary": "Executes\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_run" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeWidgets\u0028\u0029", + "name": "initializeWidgets", + "summary": "Initializes\u0020all\u0020Widgets\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_initializeWidgets" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeDashboard\u0028\u0029", + "name": "initializeDashboard", + "summary": "Initializes\u0020the\u0020Dashboard\u0020of\u0020the\u0020Plugin\u0020and\u0020loads\u0020them.", + "url": "classes/MCI-Footnotes.html#method_initializeDashboard" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeTask\u0028\u0029", + "name": "initializeTask", + "summary": "Initializes\u0020the\u0020Plugin\u0020Task\u0020and\u0020registers\u0020the\u0020Task\u0020hooks.", + "url": "classes/MCI-Footnotes.html#method_initializeTask" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AregisterPublic\u0028\u0029", + "name": "registerPublic", + "summary": "Registers\u0020and\u0020enqueues\u0020scripts\u0020and\u0020stylesheets\u0020to\u0020the\u0020public\u0020pages.", + "url": "classes/MCI-Footnotes.html#method_registerPublic" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_obj_Task", + "name": "a_obj_Task", + "summary": "Reference\u0020to\u0020the\u0020Plugin\u0020Task\u0020object.", + "url": "classes/MCI-Footnotes.html#property_a_obj_Task" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020and\u0020script\u0020\/\u0020stylesheet\u0020load\u0020optimization.", + "url": "classes/MCI-Footnotes.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Language", + "name": "MCI_Footnotes_Language", + "summary": "Loads\u0020text\u0020domain\u0020of\u0020current\u0020or\u0020default\u0020language\u0020for\u0020localization.", + "url": "classes/MCI-Footnotes-Language.html" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hook.", + "url": "classes/MCI-Footnotes-Language.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AloadTextDomain\u0028\u0029", + "name": "loadTextDomain", + "summary": "Loads\u0020the\u0020text\u0020domain\u0020for\u0020current\u0020WordPress\u0020language\u0020if\u0020exists.", + "url": "classes/MCI-Footnotes-Language.html#method_loadTextDomain" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003Aload\u0028\u0029", + "name": "load", + "summary": "Loads\u0020a\u0020specific\u0020text\u0020domain.", + "url": "classes/MCI-Footnotes-Language.html#method_load" + }, { + "fqsen": "\\MCI_Footnotes_Settings", + "name": "MCI_Footnotes_Settings", + "summary": "Loads\u0020the\u0020settings\u0020values,\u0020sets\u0020to\u0020default\u0020values\u0020if\u0020undefined.", + "url": "classes/MCI-Footnotes-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Loads\u0020all\u0020Settings\u0020from\u0020each\u0020WordPress\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Ainstance\u0028\u0029", + "name": "instance", + "summary": "Returns\u0020a\u0020singleton\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#method_instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetContainer\u0028\u0029", + "name": "getContainer", + "summary": "Returns\u0020the\u0020name\u0020of\u0020a\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getContainer" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetDefaults\u0028\u0029", + "name": "getDefaults", + "summary": "Returns\u0020the\u0020default\u0020values\u0020of\u0020a\u0020specific\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getDefaults" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AloadAll\u0028\u0029", + "name": "loadAll", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_loadAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ALoad\u0028\u0029", + "name": "Load", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_Load" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AsaveOptions\u0028\u0029", + "name": "saveOptions", + "summary": "Updates\u0020a\u0020whole\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_saveOptions" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "Returns\u0020the\u0020value\u0020of\u0020specified\u0020Settings\u0020name.", + "url": "classes/MCI-Footnotes-Settings.html#method_get" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AClearAll\u0028\u0029", + "name": "ClearAll", + "summary": "Deletes\u0020each\u0020Settings\u0020Container\u0020and\u0020loads\u0020the\u0020default\u0020values\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_ClearAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ARegisterSettings\u0028\u0029", + "name": "RegisterSettings", + "summary": "Register\u0020all\u0020Settings\u0020Container\u0020for\u0020the\u0020Plugin\u0020Settings\u0020Page\u0020in\u0020the\u0020Dashboard.", + "url": "classes/MCI-Footnotes-Settings.html#method_RegisterSettings" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_NAME", + "name": "C_STR_REFERENCE_CONTAINER_NAME", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "name": "C_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020collapse\u0020the\u0020reference\u0020container\u0020by\u0020default.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_COLLAPSE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION", + "name": "C_STR_REFERENCE_CONTAINER_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020position\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "name": "C_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020combining\u0020identical\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_COMBINE_IDENTICAL_FOOTNOTES" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_COUNTER_STYLE", + "name": "C_STR_FOOTNOTES_COUNTER_STYLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020counter\u0020style\u0020of\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_COUNTER_STYLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_LOVE", + "name": "C_STR_FOOTNOTES_LOVE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020\u0027I\u0020love\u0020footnotes\u0027\u0020text.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_LOVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_IN_EXCERPT", + "name": "C_BOOL_FOOTNOTES_IN_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020look\u0020for\u0020footnotes\u0020in\u0020post\u0020excerpts.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_IN_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_EXPERT_MODE", + "name": "C_BOOL_FOOTNOTES_EXPERT_MODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Expert\u0020mode.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_EXPERT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_BEFORE", + "name": "C_STR_FOOTNOTES_STYLING_BEFORE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020before\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_BEFORE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_AFTER", + "name": "C_STR_FOOTNOTES_STYLING_AFTER", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020after\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_AFTER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020alternative\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020tooltip\u0020truncation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020length\u0020of\u0020the\u0020enabled\u0020excerpt.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020position.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028x\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028y\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020background\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020radius.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020box\u002Dshadow\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW", + "name": "C_STR_HYPERLINK_ARROW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020backlink\u0020symbol\u0020selection.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW_USER_DEFINED", + "name": "C_STR_HYPERLINK_ARROW_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS", + "name": "C_STR_CUSTOM_CSS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS_NEW", + "name": "C_STR_CUSTOM_CSS_NEW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS\u0020migrated\u0020to\u0020a\u0020dedicated\u0020tab.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS_NEW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "name": "C_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020display\u0020of\u0020legacy\u0020Custom\u0020CSS\u0020metaboxes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_CUSTOM_CSS_LEGACY_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_THE_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_content\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_CONTENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_excerpt\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_text\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "name": "C_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020Read\u002Don\u0020button\u0020in\u0020truncated\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_READON_LABEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "name": "C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020referrer\u0020element.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020display\u0020of\u0020a\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020not\u0020display\u0020the\u0020reference\u0020container\u0020on\u0020the\u0020homepage.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020legacy\u0020layout\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020get\u0020the\u0020backlink\u0020symbol\u0020switch\u0020side.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027the_content\u0027\u0020hook\u0020priority\u0020level.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027\u0027\u0020hook\u0020priority\u0020level", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_LINK_ELEMENT_ENABLED", + "name": "C_BOOL_LINK_ELEMENT_ENABLED", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020the\u0020link\u0020element\u0020option\nSettings\u0020Container\u0020Keys\u0020for\u0020backlink\u0020typography\u0020and\u0020layout\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020font\u0020size\nSettings\u0020Container\u0020Keys\u0020for\u0020page\u0020layout\u0020support\nSettings\u0020Container\u0020Keys\u0020for\u0020scroll\u0020offset\u0020and\u0020duration\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020display\u0020durations", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_LINK_ELEMENT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_SEPARATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_OPTION", + "name": "C_STR_BACKLINKS_SEPARATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_CUSTOM", + "name": "C_STR_BACKLINKS_SEPARATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_TERMINATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_OPTION", + "name": "C_STR_BACKLINKS_TERMINATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_CUSTOM", + "name": "C_STR_BACKLINKS_TERMINATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "name": "C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "name": "C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "name": "C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "name": "C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "name": "C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_OFFSET", + "name": "C_INT_FOOTNOTES_SCROLL_OFFSET", + "summary": "Scroll\u0020offset\u0020and\u0020duration", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_OFFSET" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_DURATION", + "name": "C_INT_FOOTNOTES_SCROLL_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "name": "C_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020URL\u0020wrap\u0020option", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_URL_WRAP_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "name": "C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020reference\u0020container\u0020position\u0020shortcode", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020alternative\u0020tooltip\u0020position\nSettings\u0020Container\u0020Keys\u0020for\u0020reference\u0020container\u0020label\u0020element,\u0020thanks\u0020to\u0020\u0040markhillyer", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "name": "C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "name": "C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020table\u0020cell\u0020borders,\u0020thanks\u0020to\u0020\u0040noobishh", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "summary": "Settings\u0020container\u0020keys\u0020for\u0020reference\u0020container\u0020top\u0020and\u0020bottom\u0020margins\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020enabling\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020anchors\u0020in\u0020referrers\u0020and\u0020footnotes", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_TOP_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "name": "C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERRER_FRAGMENT_ID_SLUG", + "name": "C_STR_REFERRER_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERRER_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "name": "C_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HARD_LINK_IDS_SEPARATOR", + "name": "C_STR_HARD_LINK_IDS_SEPARATOR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HARD_LINK_IDS_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "name": "C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020for\u0020shortcode\u0020syntax\u0020validation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "name": "C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020backlink\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "name": "C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020backlink\u0020tooltip.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020delimiter.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "name": "C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020mirroring\u0020the\u0020tooltip\u0020excerpt\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020separator\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "name": "C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020superscript\u0020style\u0020normalization.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "name": "C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020select\u0020the\u0020script\u0020mode\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_obj_Instance", + "name": "a_obj_Instance", + "summary": "Stores\u0020a\u0020singleton\u0020reference\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_obj_Instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Container", + "name": "a_arr_Container", + "summary": "Contains\u0020all\u0020Settings\u0020Container\u0020names.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Container" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Default", + "name": "a_arr_Default", + "summary": "Contains\u0020all\u0020Default\u0020Settings\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Default" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Settings", + "name": "a_arr_Settings", + "summary": "Contains\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container\u0020as\u0020soon\u0020as\u0020this\u0020class\u0020is\u0020initialized.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Settings" + }, { + "fqsen": "\\MCI_Footnotes_Task", + "name": "MCI_Footnotes_Task", + "summary": "Searches\u0020and\u0020replaces\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Task.html" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hooks\u0020to\u0020replace\u0020Footnotes\u0020in\u0020the\u0020content\u0020of\u0020a\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_head\u0028\u0029", + "name": "wp_head", + "summary": "Outputs\u0020the\u0020custom\u0020css\u0020to\u0020the\u0020header\u0020of\u0020the\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_head" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_footer\u0028\u0029", + "name": "wp_footer", + "summary": "Displays\u0020the\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020slug\u0020if\u0020enabled.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_footer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_title\u0028\u0029", + "name": "the_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020post\/page\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_the_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_content\u0028\u0029", + "name": "the_content", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_content" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_excerpt\u0028\u0029", + "name": "the_excerpt", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020excerpt\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_excerpt" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_title\u0028\u0029", + "name": "widget_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020widget\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_text\u0028\u0029", + "name": "widget_text", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020widget.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_text" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_post\u0028\u0029", + "name": "the_post", + "summary": "Replaces\u0020footnotes\u0020in\u0020each\u0020Content\u0020var\u0020of\u0020the\u0020current\u0020Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_the_post" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AreplacePostObject\u0028\u0029", + "name": "replacePostObject", + "summary": "Replace\u0020all\u0020Footnotes\u0020in\u0020a\u0020WP_Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_replacePostObject" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Aexec\u0028\u0029", + "name": "exec", + "summary": "Replaces\u0020all\u0020footnotes\u0020that\u0020occur\u0020in\u0020the\u0020given\u0020content.", + "url": "classes/MCI-Footnotes-Task.html#method_exec" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Asearch\u0028\u0029", + "name": "search", + "summary": "Replaces\u0020all\u0020footnotes\u0020in\u0020the\u0020given\u0020content\u0020and\u0020appends\u0020them\u0020to\u0020the\u0020static\u0020property.", + "url": "classes/MCI-Footnotes-Task.html#method_search" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Generates\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Task.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_arr_Footnotes", + "name": "a_arr_Footnotes", + "summary": "Contains\u0020all\u0020footnotes\u0020found\u0020on\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_arr_Footnotes" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AllowLoveMe", + "name": "a_bool_AllowLoveMe", + "summary": "Flag\u0020if\u0020the\u0020display\u0020of\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020is\u0020allowed\u0020on\u0020the\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AllowLoveMe" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_Prefix", + "name": "a_str_Prefix", + "summary": "Prefix\u0020for\u0020the\u0020Footnote\u0020html\u0020element\u0020ID.", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_Prefix" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_PostId", + "name": "a_int_PostId", + "summary": "Infinite\u0020scroll\u0020\/\u0020autoload\u0020or\u0020archive\u0020view", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_PostId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ReferenceContainerId", + "name": "a_int_ReferenceContainerId", + "summary": "Multiple\u0020reference\u0020containers\u0020in\u0020content\u0020and\u0020widgets", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ReferenceContainerId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020optimization", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_HardLinksEnable", + "name": "a_bool_HardLinksEnable", + "summary": "Hard\u0020links\u0020for\u0020AMP\u0020compatibility", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_HardLinksEnable" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_ReferrerLinkSlug", + "name": "a_str_ReferrerLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_ReferrerLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_FootnoteLinkSlug", + "name": "a_str_FootnoteLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_FootnoteLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkIdsSeparator", + "name": "a_str_LinkIdsSeparator", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkIdsSeparator" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_PostContainerIdCompound", + "name": "a_str_PostContainerIdCompound", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_PostContainerIdCompound" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ScrollOffset", + "name": "a_int_ScrollOffset", + "summary": "Scroll\u0020offset", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ScrollOffset" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkSpan", + "name": "a_str_LinkSpan", + "summary": "Optional\u0020link\u0020element\u0020for\u0020footnote\u0020referrers\u0020and\u0020backlinks", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkSpan" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkOpenTag", + "name": "a_str_LinkOpenTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkOpenTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkCloseTag", + "name": "a_str_LinkCloseTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkCloseTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_MirrorTooltipText", + "name": "a_bool_MirrorTooltipText", + "summary": "Dedicated\u0020tooltip\u0020text", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_MirrorTooltipText" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_TooltipShortcode", + "name": "a_str_TooltipShortcode", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_TooltipShortcode" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_TooltipShortcodeLength", + "name": "a_int_TooltipShortcodeLength", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_TooltipShortcodeLength" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_SyntaxErrorFlag", + "name": "a_bool_SyntaxErrorFlag", + "summary": "Footnote\u0020delimiter\u0020syntax\u0020validation", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_SyntaxErrorFlag" + }, { + "fqsen": "\\MCI_Footnotes_Template", + "name": "MCI_Footnotes_Template", + "summary": "Handles\u0020each\u0020Template\u0020file\u0020for\u0020the\u0020Plugin\u0020Frontend\u0020\u0028e.g.\u0020Settings\u0020Dashboard,\u0020Public\u0020pages,\u0020...\u0029.", + "url": "classes/MCI-Footnotes-Template.html" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Reads\u0020and\u0020loads\u0020the\u0020template\u0020file\u0020without\u0020replace\u0020any\u0020placeholder.", + "url": "classes/MCI-Footnotes-Template.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areplace\u0028\u0029", + "name": "replace", + "summary": "Replace\u0020all\u0020placeholders\u0020specified\u0020in\u0020array.", + "url": "classes/MCI-Footnotes-Template.html#method_replace" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areload\u0028\u0029", + "name": "reload", + "summary": "Reloads\u0020the\u0020original\u0020content\u0020of\u0020the\u0020template\u0020file.", + "url": "classes/MCI-Footnotes-Template.html#method_reload" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AgetContent\u0028\u0029", + "name": "getContent", + "summary": "Returns\u0020the\u0020content\u0020of\u0020the\u0020template\u0020file\u0020with\u0020replaced\u0020placeholders.", + "url": "classes/MCI-Footnotes-Template.html#method_getContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aprocess_template\u0028\u0029", + "name": "process_template", + "summary": "Process\u0020template\u0020file", + "url": "classes/MCI-Footnotes-Template.html#method_process_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aget_template\u0028\u0029", + "name": "get_template", + "summary": "Get\u0020the\u0020template", + "url": "classes/MCI-Footnotes-Template.html#method_get_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_DASHBOARD", + "name": "C_STR_DASHBOARD", + "summary": "Directory\u0020name\u0020for\u0020dashboard\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_DASHBOARD" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_PUBLIC", + "name": "C_STR_PUBLIC", + "summary": "Directory\u0020name\u0020for\u0020public\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_PUBLIC" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_OriginalContent", + "name": "a_str_OriginalContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_OriginalContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_ReplacedContent", + "name": "a_str_ReplacedContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize\u0020with\u0020replaced\u0020place\u0020holders.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_ReplacedContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024plugin_directory", + "name": "plugin_directory", + "summary": "Plugin\u0020Directory", + "url": "classes/MCI-Footnotes-Template.html#property_plugin_directory" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase", + "name": "MCI_Footnotes_WidgetBase", + "summary": "Base\u0020Class\u0020for\u0020all\u0020Plugin\u0020Widgets.\u0020Registers\u0020each\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020child\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetWidgetWidth\u0028\u0029", + "name": "getWidgetWidth", + "summary": "Returns\u0020the\u0020width\u0020of\u0020the\u0020Widget.\u0020Default\u0020width\u0020is\u0020250\u0020pixel.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getWidgetWidth" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Registers\u0020the\u0020child\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer", + "name": "MCI_Footnotes_Widget_ReferenceContainer", + "summary": "Registers\u0020a\u0020Widget\u0020to\u0020put\u0020the\u0020Reference\u0020Container\u0020to\u0020the\u0020widget\u0020area.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020the\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Aform\u0028\u0029", + "name": "form", + "summary": "Outputs\u0020the\u0020Settings\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_form" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Awidget\u0028\u0029", + "name": "widget", + "summary": "Outputs\u0020the\u0020Content\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_widget" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG", + "name": "MCI_Footnotes_WYSIWYG", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewVisualEditorButton\u0028\u0029", + "name": "newVisualEditorButton", + "summary": "Append\u0020a\u0020new\u0020Button\u0020to\u0020the\u0020WYSIWYG\u0020editor\u0020of\u0020Posts\u0020and\u0020Pages.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newVisualEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewPlainTextEditorButton\u0028\u0029", + "name": "newPlainTextEditorButton", + "summary": "Add\u0020a\u0020new\u0020button\u0020to\u0020the\u0020plain\u0020text\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newPlainTextEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AincludeScripts\u0028\u0029", + "name": "includeScripts", + "summary": "Includes\u0020the\u0020Plugins\u0020WYSIWYG\u0020editor\u0020script.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_includeScripts" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AajaxCallback\u0028\u0029", + "name": "ajaxCallback", + "summary": "AJAX\u0020Callback\u0020function\u0020when\u0020the\u0020Footnotes\u0020Button\u0020is\u0020clicked.\u0020Either\u0020in\u0020the\u0020Plain\u0020text\u0020or\u0020Visual\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_ajaxCallback" + }, { + "fqsen": "\\MCI_Footnotes_requirePhpFiles\u0028\u0029", + "name": "MCI_Footnotes_requirePhpFiles", + "summary": "Requires\u0020\u0028require_once\u0029\u0020all\u0020\u002A.php\u0020files\u0020inside\u0020a\u0020specific\u0020Directory.", + "url": "namespaces/default.html#function_MCI_Footnotes_requirePhpFiles" + }, { + "fqsen": "\\", + "name": "\\", + "summary": "", + "url": "namespaces/default.html" + } ] +); diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html new file mode 100644 index 0000000..c9f9b75 --- /dev/null +++ b/docs/namespaces/default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                          +

                                                                                                                                                          Documentation

                                                                                                                                                          + + + + + +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + + + + +
                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                          + +
                                                                                                                                                          +

                                                                                                                                                          API Documentation

                                                                                                                                                          + + + +

                                                                                                                                                          + Interfaces, Classes and Traits + +

                                                                                                                                                          + +
                                                                                                                                                          + +
                                                                                                                                                          MCI_Footnotes_Config
                                                                                                                                                          +
                                                                                                                                                          Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Convert
                                                                                                                                                          +
                                                                                                                                                          Converts data types and Footnotes specific values.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Layout_Init
                                                                                                                                                          +
                                                                                                                                                          Handles the Settings interface of the Plugin.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_LayoutEngine
                                                                                                                                                          +
                                                                                                                                                          Layout Engine for the administration dashboard.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                          +
                                                                                                                                                          Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Layout_Settings
                                                                                                                                                          +
                                                                                                                                                          Displays and handles all Settings of the Plugin.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Hooks
                                                                                                                                                          +
                                                                                                                                                          Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes
                                                                                                                                                          +
                                                                                                                                                          Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Language
                                                                                                                                                          +
                                                                                                                                                          Loads text domain of current or default language for localization.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Settings
                                                                                                                                                          +
                                                                                                                                                          Loads the settings values, sets to default values if undefined.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Task
                                                                                                                                                          +
                                                                                                                                                          Searches and replaces the footnotes.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Template
                                                                                                                                                          +
                                                                                                                                                          Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_WidgetBase
                                                                                                                                                          +
                                                                                                                                                          Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                          +
                                                                                                                                                          Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                          +
                                                                                                                                                          MCI_Footnotes_WYSIWYG
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          + + +

                                                                                                                                                          + Table of Contents + +

                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                          +
                                                                                                                                                          Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                          + +
                                                                                                                                                          + + + +
                                                                                                                                                          +

                                                                                                                                                          + Functions + +

                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                          + + +

                                                                                                                                                          Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                          + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                          + +
                                                                                                                                                          Parameters
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + $p_str_Directory + : string +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          Absolute Directory path to lookup for *.php files

                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + + +
                                                                                                                                                          + Tags + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          + author +
                                                                                                                                                          +
                                                                                                                                                          + +

                                                                                                                                                          Stefan Herndler

                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + since +
                                                                                                                                                          +
                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          + + +
                                                                                                                                                          +
                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                          +

                                                                                                                                                          Search results

                                                                                                                                                          + +
                                                                                                                                                          +
                                                                                                                                                          +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + + +
                                                                                                                                                            + + + + diff --git a/docs/packages/Default.html b/docs/packages/Default.html new file mode 100644 index 0000000..d4680ea --- /dev/null +++ b/docs/packages/Default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                            +

                                                                                                                                                            Documentation

                                                                                                                                                            + + + + + +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + + + + +
                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                            + +
                                                                                                                                                            +

                                                                                                                                                            Default

                                                                                                                                                            + + + +

                                                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                                                            + +
                                                                                                                                                            + +
                                                                                                                                                            MCI_Footnotes_Config
                                                                                                                                                            +
                                                                                                                                                            Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Convert
                                                                                                                                                            +
                                                                                                                                                            Converts data types and Footnotes specific values.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Layout_Init
                                                                                                                                                            +
                                                                                                                                                            Handles the Settings interface of the Plugin.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_LayoutEngine
                                                                                                                                                            +
                                                                                                                                                            Layout Engine for the administration dashboard.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                            +
                                                                                                                                                            Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Layout_Settings
                                                                                                                                                            +
                                                                                                                                                            Displays and handles all Settings of the Plugin.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Hooks
                                                                                                                                                            +
                                                                                                                                                            Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes
                                                                                                                                                            +
                                                                                                                                                            Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Language
                                                                                                                                                            +
                                                                                                                                                            Loads text domain of current or default language for localization.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Settings
                                                                                                                                                            +
                                                                                                                                                            Loads the settings values, sets to default values if undefined.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Task
                                                                                                                                                            +
                                                                                                                                                            Searches and replaces the footnotes.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Template
                                                                                                                                                            +
                                                                                                                                                            Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_WidgetBase
                                                                                                                                                            +
                                                                                                                                                            Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                            +
                                                                                                                                                            Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                            +
                                                                                                                                                            MCI_Footnotes_WYSIWYG
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            + + +

                                                                                                                                                            + Table of Contents + +

                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                            +
                                                                                                                                                            Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                            + +
                                                                                                                                                            + + + +
                                                                                                                                                            +

                                                                                                                                                            + Functions + +

                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                            + + +

                                                                                                                                                            Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                            + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                            + +
                                                                                                                                                            Parameters
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + $p_str_Directory + : string +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            Absolute Directory path to lookup for *.php files

                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + + +
                                                                                                                                                            + Tags + +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            + author +
                                                                                                                                                            +
                                                                                                                                                            + +

                                                                                                                                                            Stefan Herndler

                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + since +
                                                                                                                                                            +
                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            + + +
                                                                                                                                                            +
                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                            +

                                                                                                                                                            Search results

                                                                                                                                                            + +
                                                                                                                                                            +
                                                                                                                                                            +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              + + +
                                                                                                                                                              + + + + diff --git a/docs/packages/default.html b/docs/packages/default.html new file mode 100644 index 0000000..3d3e60c --- /dev/null +++ b/docs/packages/default.html @@ -0,0 +1,116 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                              +

                                                                                                                                                              Documentation

                                                                                                                                                              + + + + + +
                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              + + + + +
                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                              + +
                                                                                                                                                              +

                                                                                                                                                              API Documentation

                                                                                                                                                              + +

                                                                                                                                                              + Packages + +

                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              Default
                                                                                                                                                              +
                                                                                                                                                              + + + + + + + + +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                              +

                                                                                                                                                              Search results

                                                                                                                                                              + +
                                                                                                                                                              +
                                                                                                                                                              +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                + + +
                                                                                                                                                                + + + + diff --git a/docs/reports/deprecated.html b/docs/reports/deprecated.html new file mode 100644 index 0000000..31e5420 --- /dev/null +++ b/docs/reports/deprecated.html @@ -0,0 +1,106 @@ + + + + + Documentation » Deprecated elements + + + + + + + + + + + + + + + + +
                                                                                                                                                                +

                                                                                                                                                                Documentation

                                                                                                                                                                + + + + + +
                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                + + + + +
                                                                                                                                                                + + +
                                                                                                                                                                +

                                                                                                                                                                Deprecated

                                                                                                                                                                + + +
                                                                                                                                                                + No deprecated elements have been found in this project. +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                +

                                                                                                                                                                Search results

                                                                                                                                                                + +
                                                                                                                                                                +
                                                                                                                                                                +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + +
                                                                                                                                                                  + + + + diff --git a/docs/reports/errors.html b/docs/reports/errors.html new file mode 100644 index 0000000..340516e --- /dev/null +++ b/docs/reports/errors.html @@ -0,0 +1,174 @@ + + + + + Documentation » Compilation errors + + + + + + + + + + + + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Documentation

                                                                                                                                                                  + + + + + +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + +
                                                                                                                                                                  + + +
                                                                                                                                                                  +

                                                                                                                                                                  Errors

                                                                                                                                                                  + +

                                                                                                                                                                  Table of Contents

                                                                                                                                                                  +
                                                                                                                                                                  if identical footnotes are combined -.footnote_plugin_index = first if not -.footnote_index = or in first in 3-column table -.footnote_plugin_symbol = second in 3-column table -.footnote_plugin_link = or (identical footnotes not combined) -.footnote_backlink = or -.footnote_index_arrow = nested , symbol only -.footnote_plugin_text = second , or third in 3-column table -*/ - -.footnotes_reference_container { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -/* -label -*/ - -.footnote_container_prepare { - display: block !important; - padding-top: 24px !important; -} - -.footnote_container_prepare > p { - line-height: 1.3 !important; - margin-top: 1em !important; - margin-bottom: 0.25em !important; - padding: 0 !important; - font-weight: normal !important; - /* bottom border optional since 2.2.5 */ - display: block !important; - -webkit-margin-before: 0.83em !important; - -webkit-margin-after: 0.83em !important; - -webkit-margin-start: 0px !important; - -webkit-margin-end: 0px !important; - text-align: left !important; - vertical-align: middle; -} - -.footnote_container_prepare > p > span:first-child, - .footnote_container_prepare > p > span:nth-child(3) { - text-align: start !important; - font-size: 1.5em !important; -} - -/* -collapse button -fully clickable, not sign only -*/ - -.footnote_reference_container_collapse_button { - cursor: pointer; - padding: 0 0.5em; - font-size: 1.3em !important; - vertical-align: 2px; - text-decoration: none !important; -} - -h2 > .footnote_reference_container_collapse_button, -h3 > .footnote_reference_container_collapse_button, -h4 > .footnote_reference_container_collapse_button, -h5 > .footnote_reference_container_collapse_button, -h6 > .footnote_reference_container_collapse_button { - font-size: inherit !important; -} - -.footnote_container_prepare > p > span:last-child a, -.footnote_reference_container_collapse_button a { - text-decoration: none !important; -} - -/* -table -*/ - -.footnote-reference-container, -.footnotes_table { - width: 100%; - border: none; -} - -/* -footnotes - -@since 2.0.0 borderless table cells, thanks to @ragonesi bug report -@see -@since 2.0.1 enforce borderless text cells through !important property, thanks to @ragonesi bug report -@see -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi, -.footnote_plugin_symbol, -.footnote_plugin_text { - border: none !important; - text-align: left !important; - vertical-align: top !important; - padding: 5px 6px 10px 0 !important; -} - -.footnote_backlink, -.footnote_backlink:link, -.footnote_plugin_link, -.footnote_plugin_link:link, -.main-content .footnote_backlink, -.main-content .footnote_backlink:link, -.main-content .footnote_plugin_link, -.main-content .footnote_plugin_link:link { - text-decoration: none !important; - border-bottom: none !important; -} - -.footnote_backlink, -.footnote_plugin_link { - white-space: nowrap; -} - -.pointer, -.footnote_index, -.footnote_backlink { - cursor: pointer; -} - -/* -These rules when enabled cause the backlink to take an overline -when hovered in some themes, not in others: -.footnote_plugin_index:hover, -.footnote_plugin_index_combi:hover, -.footnote_plugin_index.pointer:hover, -.footnote_plugin_index_combi.pointer:hover, -*/ - -.footnote_backlink:hover, -.footnote_plugin_link:hover, -.footnote_plugin_text a:hover { - text-decoration: unset; - text-decoration: underline; /*deprioritized to ease customization*/ -} - -.footnote_plugin_text { - width: unset; /*unset width of text column to fix site issues*/ -} - -/* -These rules are just defaults preventing the table from filling the width. -They are not very effective by lack of table-layout: fixed; -since 2.1.4 settings are optionally available, with table-layout: fixed; - -By default, the backlink column is auto-expanding to fit widest. -Not using 'max-content' as that causes no-wrap and overflows. -These are overridden if settings are enabled. -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi { - max-width: 100px; - width: 2.5em; -} - -/* -Responsive -*/ - -@media only screen and (max-width: 768px) { - - .footnote_plugin_index, - .footnote_plugin_index_combi { - max-width: 80px; - } -} - - -/**************************************************************** -Footnotes printing style rules - -Printing a table, browsers tend to avoid page breaks inside, -but it takes a wrapper to avoid a page break before the table -just after the reference container headline. - -UI elements (expand/collapse button, backlink arrows) are hidden. - -Link color set to inherit, so referrers/numbers are not grayed out. - -@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report -@see - */ - -.footnotes_reference_container { - page-break-inside: avoid; -} - -@media print { - - .footnote_tooltip, - .footnote_reference_container_collapse_button, - .footnote_index_arrow { - display: none; - } - - .footnote_plugin_tooltip_text { - color: inherit; - } - - .footnote_plugin_index a, - .footnote_plugin_index_combi a { - color: inherit; - text-decoration: none !important; - } - - /* Edit button in WP2020 (added as a service) */ - div.post-meta-edit-link-wrapper { - display: none; - } -} - -/** - * MCI Footnotes logo - * - * The classes with 'heading' fixing display in dashboard - * have all their rules moved to settings.css so as to alleviate - * the common stylesheet. Still these rules are only used if the - * Footnotes ad link logo is present in the page footer per user - * dashboard setting. Making these rules conditional like those - * pertaining to tooltips, either jQuery or alternative, would - * double the number of united minified stylesheets shipped with - * the plugin. Hence these are present by default at the bottom. - * - * @see class/config.php - * @see css/settings.css - */ - -.footnotes_logo, -.footnotes_logo:hover { - text-decoration: none; - font-weight: normal; -} - -.footnotes_logo_part1 { - color: #2bb975; -} - -.footnotes_logo_part2 { - color: #545f5a; -} +/* + * .footnote_plugin_tooltip_text = inner + * .footnote_tooltip = inner + */ + +.footnote_referrer, +.footnote_referrer:link, +.footnote_referrer:hover, +.footnote_referrer > a, +.footnote_referrer > a:link, +.footnote_referrer > a:hover, +.footnote_plugin_tooltip_text, +.footnote_plugin_tooltip_text:hover, +.main-content .footnote_referrer, +.main-content .footnote_referrer:link, +.main-content .footnote_referrer:hover, +.main-content .footnote_referrer > a, +.main-content .footnote_referrer > a:link, +.main-content .footnote_referrer > a:hover, +.main-content .footnote_plugin_tooltip_text, +.main-content .footnote_plugin_tooltip_text:hover { + text-decoration: none !important; + border-bottom: none !important; + box-shadow: none !important; +} + +/** + * Footnote referrer (not “tooltip text”) + * + * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. + * + * @since 2.1.1 + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. + * + * @since 2.5.4 + * @reporter @wisenilesh + * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ + */ + +.footnote_plugin_tooltip_text { + line-height: 0; + position: relative !important; + cursor: pointer; +} + +/** + * Tooltips + * + * - Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. + * + * @since 2.1.6 + * @reporter @russianicons + * @link https://wordpress.org/support/topic/counter-styles-not-working/#post-13767299 + */ + +.footnote_tooltip { + display: none; + z-index: 2147483647 !important; + cursor: auto; + text-align: left; + padding: 12px; + line-height: 1.2; + font-weight: normal; + font-style: normal; +} + +/** + * Alternative tooltips + * + * These default position values may be overridden by internal CSS. + */ + +.footnote_referrer.relative { + position: relative; +} + +.footnote_tooltip.position { + display: unset; + position: absolute; + bottom: 24px; + left: -50px; + width: 400px; +} + +/* +fade-in parameters +*/ + +.footnote_tooltip.shown { + visibility: visible; + opacity: 1; + transition-property: visibility opacity; + transition-timing-function: linear; +/* +property values of settings are inline CSS + transition-delay: 0ms; + transition-duration: 200ms; +*/ +} + +/* +fade-out parameters +*/ + +.footnote_tooltip.hidden { + visibility: hidden; + opacity: 0; + transition-property: visibility opacity; + transition-timing-function: linear; +/* +property values of settings are inline CSS + transition-delay: 400ms; + transition-duration: 200ms; +*/ +} + +/* +Read-on button +*/ + +.footnote_tooltip_continue { + font-style: italic; + color: green; + text-decoration: none !important; + cursor: pointer; + white-space: nowrap; +} + +.footnote_tooltip_continue:hover { + color: blue; + text-decoration: underline !important; +} + + +/***************************************************** +Footnote reference container + +Templates: +templates/public/reference-container.html +templates/public/reference-container-body.html +templates/public/reference-container-combi.html +templates/public/reference-container-switch.html +templates/public/reference-container-3column.html + +Optional responsive basic page layout support +stylesheets: +css/layout-reference-container.css +css/layout-main-content.css +css/layout-page-content.css + +Classes: +.footnotes_reference_container = enclosing
                                                                                                                                                                  +.footnote_container_prepare = label
                                                                                                                                                                  +.footnote_reference_container_label = +.footnote_reference_container_collapse_button = sibling +.footnote-reference-container = misleading and inconsistent; alias: +.footnotes_table = +.footnotes_plugin_reference_row = +.footnote_plugin_index_combi = first - - - - + + + + + + diff --git a/templates/public/reference-container-body-combi.html b/templates/public/reference-container-body-combi.html index 49f9b8f..b69a453 100644 --- a/templates/public/reference-container-body-combi.html +++ b/templates/public/reference-container-body-combi.html @@ -1,14 +1,14 @@ - - - - - + + + + + diff --git a/templates/public/reference-container-body-switch.html b/templates/public/reference-container-body-switch.html index c3127d4..1f824e3 100644 --- a/templates/public/reference-container-body-switch.html +++ b/templates/public/reference-container-body-switch.html @@ -1,19 +1,19 @@ - - - - - + + + + + diff --git a/templates/public/reference-container-body.html b/templates/public/reference-container-body.html index bcd3ec4..f7158fd 100755 --- a/templates/public/reference-container-body.html +++ b/templates/public/reference-container-body.html @@ -1,24 +1,24 @@ - - - - - + + + + + diff --git a/templates/public/reference-container.html b/templates/public/reference-container.html index 9ce0632..05d9052 100644 --- a/templates/public/reference-container.html +++ b/templates/public/reference-container.html @@ -1,83 +1,83 @@ - -
                                                                                                                                                                  -
                                                                                                                                                                  <[[element]] - >[[name]][+]
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  if identical footnotes are combined +.footnote_plugin_index = first if not +.footnote_index = or in first in 3-column table +.footnote_plugin_symbol = second in 3-column table +.footnote_plugin_link = or (identical footnotes not combined) +.footnote_backlink = or +.footnote_index_arrow = nested , symbol only +.footnote_plugin_text = second , or third in 3-column table +*/ + +.footnotes_reference_container { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* +label +*/ + +.footnote_container_prepare { + display: block !important; + padding-top: 24px !important; +} + +.footnote_container_prepare > p { + line-height: 1.3 !important; + margin-top: 1em !important; + margin-bottom: 0.25em !important; + padding: 0 !important; + font-weight: normal !important; + /* bottom border optional since 2.2.5 */ + display: block !important; + -webkit-margin-before: 0.83em !important; + -webkit-margin-after: 0.83em !important; + -webkit-margin-start: 0px !important; + -webkit-margin-end: 0px !important; + text-align: left !important; + vertical-align: middle; +} + +.footnote_container_prepare > p > span:first-child, + .footnote_container_prepare > p > span:nth-child(3) { + text-align: start !important; + font-size: 1.5em !important; +} + +/* +collapse button +fully clickable, not sign only +*/ + +.footnote_reference_container_collapse_button { + cursor: pointer; + padding: 0 0.5em; + font-size: 1.3em !important; + vertical-align: 2px; + text-decoration: none !important; +} + +h2 > .footnote_reference_container_collapse_button, +h3 > .footnote_reference_container_collapse_button, +h4 > .footnote_reference_container_collapse_button, +h5 > .footnote_reference_container_collapse_button, +h6 > .footnote_reference_container_collapse_button { + font-size: inherit !important; +} + +.footnote_container_prepare > p > span:last-child a, +.footnote_reference_container_collapse_button a { + text-decoration: none !important; +} + +/* +table +*/ + +.footnote-reference-container, +.footnotes_table { + width: 100%; + border: none; +} + +/* +footnotes + +@since 2.0.0 borderless table cells, thanks to @ragonesi bug report +@see +@since 2.0.1 enforce borderless text cells through !important property, thanks to @ragonesi bug report +@see +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi, +.footnote_plugin_symbol, +.footnote_plugin_text { + border: none !important; + text-align: left !important; + vertical-align: top !important; + padding: 5px 6px 10px 0 !important; +} + +.footnote_backlink, +.footnote_backlink:link, +.footnote_plugin_link, +.footnote_plugin_link:link, +.main-content .footnote_backlink, +.main-content .footnote_backlink:link, +.main-content .footnote_plugin_link, +.main-content .footnote_plugin_link:link { + text-decoration: none !important; + border-bottom: none !important; +} + +.footnote_backlink, +.footnote_plugin_link { + white-space: nowrap; +} + +.pointer, +.footnote_index, +.footnote_backlink { + cursor: pointer; +} + +/* +These rules when enabled cause the backlink to take an overline +when hovered in some themes, not in others: +.footnote_plugin_index:hover, +.footnote_plugin_index_combi:hover, +.footnote_plugin_index.pointer:hover, +.footnote_plugin_index_combi.pointer:hover, +*/ + +.footnote_backlink:hover, +.footnote_plugin_link:hover, +.footnote_plugin_text a:hover { + text-decoration: unset; + text-decoration: underline; /*deprioritized to ease customization*/ +} + +.footnote_plugin_text { + width: unset; /*unset width of text column to fix site issues*/ +} + +/* +These rules are just defaults preventing the table from filling the width. +They are not very effective by lack of table-layout: fixed; +since 2.1.4 settings are optionally available, with table-layout: fixed; + +By default, the backlink column is auto-expanding to fit widest. +Not using 'max-content' as that causes no-wrap and overflows. +These are overridden if settings are enabled. +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi { + max-width: 100px; + width: 2.5em; +} + +/* +Responsive +*/ + +@media only screen and (max-width: 768px) { + + .footnote_plugin_index, + .footnote_plugin_index_combi { + max-width: 80px; + } +} + + +/**************************************************************** +Footnotes printing style rules + +Printing a table, browsers tend to avoid page breaks inside, +but it takes a wrapper to avoid a page break before the table +just after the reference container headline. + +UI elements (expand/collapse button, backlink arrows) are hidden. + +Link color set to inherit, so referrers/numbers are not grayed out. + +@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report +@see + */ + +.footnotes_reference_container { + page-break-inside: avoid; +} + +@media print { + + .footnote_tooltip, + .footnote_reference_container_collapse_button, + .footnote_index_arrow { + display: none; + } + + .footnote_plugin_tooltip_text { + color: inherit; + } + + .footnote_plugin_index a, + .footnote_plugin_index_combi a { + color: inherit; + text-decoration: none !important; + } + + /* Edit button in WP2020 (added as a service) */ + div.post-meta-edit-link-wrapper { + display: none; + } +} + +/** + * MCI Footnotes logo + * + * The classes with 'heading' fixing display in dashboard + * have all their rules moved to settings.css so as to alleviate + * the common stylesheet. Still these rules are only used if the + * Footnotes ad link logo is present in the page footer per user + * dashboard setting. Making these rules conditional like those + * pertaining to tooltips, either jQuery or alternative, would + * double the number of united minified stylesheets shipped with + * the plugin. Hence these are present by default at the bottom. + * + * @see class/config.php + * @see css/settings.css + */ + +.footnotes_logo, +.footnotes_logo:hover { + text-decoration: none; + font-weight: normal; +} + +.footnotes_logo_part1 { + color: #2bb975; +} + +.footnotes_logo_part2 { + color: #545f5a; +} diff --git a/css/dev-tooltips-alternative.css b/css/dev-tooltips-alternative.css index e22944a..d12e639 100644 --- a/css/dev-tooltips-alternative.css +++ b/css/dev-tooltips-alternative.css @@ -1,63 +1,63 @@ -/* -*/ -/*input[type=text], input[type=password], textarea, select*/ -#footnote_inputfield_readon_label, -#footnote_inputfield_references_label, -#footnote_inputfield_love { - padding-left: 8px !important; - padding-right: 8px !important; - width: 80% !important; -} - -#footnote_inputfield_reference_container_place { - width: 310px; -} - -#footnote_inputfield_counter_style, -#footnotes_inputfield_page_layout_support { - width: 505px; -} - -#footnote_inputfield_placeholder_start, -#footnote_inputfield_placeholder_end, -#footnote_inputfield_custom_mouse_over_box_excerpt_length { - width: 180px; -} -#footnote_inputfield_placeholder_start_user_defined, -#footnote_inputfield_placeholder_end_user_defined { - width: 320px; -} - -#footnote_inputfield_combine_identical, -#footnotes_inputfield_scroll_offset, -#footnotes_inputfield_scroll_duration, -#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, -#footnote_inputfield_custom_mouse_over_box_offset_x, -#footnote_inputfield_custom_mouse_over_box_offset_y, -#footnote_inputfield_custom_mouse_over_box_max_width, -#footnotes_inputfield_alternative_mouse_over_box_offset_x, -#footnotes_inputfield_alternative_mouse_over_box_offset_y, -#footnotes_inputfield_alternative_mouse_over_box_width, -#footnotes_inputfield_mouse_over_box_fade_in_delay, -#footnotes_inputfield_mouse_over_box_fade_in_duration, -#footnotes_inputfield_mouse_over_box_fade_out_delay, -#footnotes_inputfield_mouse_over_box_fade_out_duration, -#footnote_inputfield_custom_mouse_over_box_border_width, -#footnote_inputfield_custom_mouse_over_box_border_radius { - width: 80px; -} - -#footnote_inputfield_custom_hyperlink_symbol, -#footnotes_inputfield_backlinks_terminator_option, -#footnotes_inputfield_backlinks_separator_option { - width: 230px; -} - -#footnotes_inputfield_reference_container_top_margin, -#footnotes_inputfield_reference_container_bottom_margin, -#footnotes_inputfield_backlinks_column_width_scalar, -#footnotes_inputfield_backlinks_column_max_width_scalar, -#footnotes_inputfield_mouse_over_box_font_size_scalar { - width: 85px; -} - -#footnotes_inputfield_backlinks_column_width_unit, -#footnotes_inputfield_backlinks_column_max_width_unit, -#footnotes_inputfield_mouse_over_box_font_size_unit { - width: 140px; -} - -/************************************************************ -Headings and labels -*/ - -label { - display: inline-block; -} - -.postbox > h3 { - height: 32px !important; - line-height: 32px !important; -} - -.postbox > h3 > span { - padding: 0 10px; -} - -.postbox > .inside > table { - border: none !important; -} - -.postbox > .inside >table > tbody > tr > td:first-child { - width: 15% !important; - font-weight: bold !important; -} - -.footnote_placeholder_box_container { - text-align: center !important; -} - -span.footnote_highlight_placeholder { - font-weight: bold !important; - padding: 0 8px !important; -} - -.footnote_placeholder_box_example { - border: 2px solid #2bb975 !important; - border-radius: 4px !important; - padding: 16px 0 !important; - width: 50% !important; - display: block !important; - margin: 20px auto !important; - text-align: center !important; -} - -/************************************************************ -Special table layout - -Hooks and priority levels: -initialized from style attributes in templates -IE doesn’t support nth child, but these are not critical -*/ -.expert_lookup tr th:first-child, -.expert_lookup tr td:first-child { - width: 170px !important; -} -.expert_lookup tr th:nth-child(2), -.expert_lookup tr td:nth-child(2) { - width: 65px !important; -} -.expert_lookup tr th:nth-child(3), -.expert_lookup tr td:nth-child(3) { - width: 200px !important; -} -.expert_lookup tr td:nth-child(3) input { - width: 190px; -} -.expert_lookup tr th:last-child, -.expert_lookup tr td:last-child { - white-space: nowrap; -} - -/* -Custom CSS - -The number of CSS classes recommended for customization -significantly increased from 4 to 18 as of v2.4.0. - -Localized notices are dropped to ease translators’ task. -CSS classes are listed directly in the template -templates/dashboard/customize-css.html - -For better maintainability and readability of the source -list, the

                                                                                                                                                                  end tags are omitted per HTML5 standard: - - -The textarea has monospace font, but no other features -helping edit CSS, like tab support and syntactic colors. -*/ -#customize_css_new tr td:first-child { - width: 38% !important; - font-weight: normal !important; -} -.customize_css_new tr td:first-child span:first-child { - font-weight: bold !important; -} -.customize_css_new .list { - padding-top: 10px; -} -.customize_css_new .list p { - font-family: monospace; - padding: 0 10px; - text-indent: -10px; - margin: .5em 0; -} - -#footnote_inputfield_custom_css_new { - height: 500px; -} -#footnote_inputfield_custom_css, -#footnote_inputfield_custom_css_new { - width: 96%; - resize: both; - overflow: scroll; - font-family: monospace; -} - -/************************************************************ -Notices - -These spans were previously formatted using the em element. -But the intended semantics was not emphasis. -In locales using boldface to emphasize, the effect is the -exact opposite of the intention. - -So we must use spans with explicit italic font style. -Scripts not featuring italic fonts fall back to normal, -and that is just fine, as italic is only needed here for -scripts that do have italic, and failing to use it would -look weird. - -since 2.1.4 -*/ -.footnotes_notice { - font-style: italic; - display: inline-block; - text-align: end; -} - -/************************************************************ -Descriptions - -padded div above or below a settings table - -Use case: more extensive information not fitting into a brief -notice after the end of the settings box. -*/ -.footnotes_description { - padding: 0 4%; -} -.footnotes_description p { - font-size: 1.06em; - font-style: italic; -} +/* +*/ +/*input[type=text], input[type=password], textarea, select*/ +#footnote_inputfield_readon_label, +#footnote_inputfield_references_label, +#footnote_inputfield_love { + padding-left: 8px !important; + padding-right: 8px !important; + width: 80% !important; +} + +#footnote_inputfield_reference_container_place { + width: 310px; +} + +#footnote_inputfield_counter_style, +#footnotes_inputfield_page_layout_support { + width: 505px; +} + +#footnote_inputfield_placeholder_start, +#footnote_inputfield_placeholder_end, +#footnote_inputfield_custom_mouse_over_box_excerpt_length { + width: 180px; +} +#footnote_inputfield_placeholder_start_user_defined, +#footnote_inputfield_placeholder_end_user_defined { + width: 320px; +} + +#footnote_inputfield_combine_identical, +#footnotes_inputfield_scroll_offset, +#footnotes_inputfield_scroll_duration, +#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, +#footnote_inputfield_custom_mouse_over_box_offset_x, +#footnote_inputfield_custom_mouse_over_box_offset_y, +#footnote_inputfield_custom_mouse_over_box_max_width, +#footnotes_inputfield_alternative_mouse_over_box_offset_x, +#footnotes_inputfield_alternative_mouse_over_box_offset_y, +#footnotes_inputfield_alternative_mouse_over_box_width, +#footnotes_inputfield_mouse_over_box_fade_in_delay, +#footnotes_inputfield_mouse_over_box_fade_in_duration, +#footnotes_inputfield_mouse_over_box_fade_out_delay, +#footnotes_inputfield_mouse_over_box_fade_out_duration, +#footnote_inputfield_custom_mouse_over_box_border_width, +#footnote_inputfield_custom_mouse_over_box_border_radius { + width: 80px; +} + +#footnote_inputfield_custom_hyperlink_symbol, +#footnotes_inputfield_backlinks_terminator_option, +#footnotes_inputfield_backlinks_separator_option { + width: 230px; +} + +#footnotes_inputfield_reference_container_top_margin, +#footnotes_inputfield_reference_container_bottom_margin, +#footnotes_inputfield_backlinks_column_width_scalar, +#footnotes_inputfield_backlinks_column_max_width_scalar, +#footnotes_inputfield_mouse_over_box_font_size_scalar { + width: 85px; +} + +#footnotes_inputfield_backlinks_column_width_unit, +#footnotes_inputfield_backlinks_column_max_width_unit, +#footnotes_inputfield_mouse_over_box_font_size_unit { + width: 140px; +} + +/************************************************************ +Headings and labels +*/ + +label { + display: inline-block; +} + +.postbox > h3 { + height: 32px !important; + line-height: 32px !important; +} + +.postbox > h3 > span { + padding: 0 10px; +} + +.postbox > .inside > table { + border: none !important; +} + +.postbox > .inside >table > tbody > tr > td:first-child { + width: 15% !important; + font-weight: bold !important; +} + +.footnote_placeholder_box_container { + text-align: center !important; +} + +span.footnote_highlight_placeholder { + font-weight: bold !important; + padding: 0 8px !important; +} + +.footnote_placeholder_box_example { + border: 2px solid #2bb975 !important; + border-radius: 4px !important; + padding: 16px 0 !important; + width: 50% !important; + display: block !important; + margin: 20px auto !important; + text-align: center !important; +} + +/************************************************************ +Special table layout + +Hooks and priority levels: +initialized from style attributes in templates +IE doesn’t support nth child, but these are not critical +*/ +.expert_lookup tr th:first-child, +.expert_lookup tr td:first-child { + width: 170px !important; +} +.expert_lookup tr th:nth-child(2), +.expert_lookup tr td:nth-child(2) { + width: 65px !important; +} +.expert_lookup tr th:nth-child(3), +.expert_lookup tr td:nth-child(3) { + width: 200px !important; +} +.expert_lookup tr td:nth-child(3) input { + width: 190px; +} +.expert_lookup tr th:last-child, +.expert_lookup tr td:last-child { + white-space: nowrap; +} + +/* +Custom CSS + +The number of CSS classes recommended for customization +significantly increased from 4 to 18 as of v2.4.0. + +Localized notices are dropped to ease translators’ task. +CSS classes are listed directly in the template +templates/dashboard/customize-css.html + +For better maintainability and readability of the source +list, the

                                                                                                                                                                  end tags are omitted per HTML5 standard: + + +The textarea has monospace font, but no other features +helping edit CSS, like tab support and syntactic colors. +*/ +#customize_css_new tr td:first-child { + width: 38% !important; + font-weight: normal !important; +} +.customize_css_new tr td:first-child span:first-child { + font-weight: bold !important; +} +.customize_css_new .list { + padding-top: 10px; +} +.customize_css_new .list p { + font-family: monospace; + padding: 0 10px; + text-indent: -10px; + margin: .5em 0; +} + +#footnote_inputfield_custom_css_new { + height: 500px; +} +#footnote_inputfield_custom_css, +#footnote_inputfield_custom_css_new { + width: 96%; + resize: both; + overflow: scroll; + font-family: monospace; +} + +/************************************************************ +Notices + +These spans were previously formatted using the em element. +But the intended semantics was not emphasis. +In locales using boldface to emphasize, the effect is the +exact opposite of the intention. + +So we must use spans with explicit italic font style. +Scripts not featuring italic fonts fall back to normal, +and that is just fine, as italic is only needed here for +scripts that do have italic, and failing to use it would +look weird. + +since 2.1.4 +*/ +.footnotes_notice { + font-style: italic; + display: inline-block; + text-align: end; +} + +/************************************************************ +Descriptions + +padded div above or below a settings table + +Use case: more extensive information not fitting into a brief +notice after the end of the settings box. +*/ +.footnotes_description { + padding: 0 4%; +} +.footnotes_description p { + font-size: 1.06em; + font-style: italic; +} diff --git a/features.txt b/features.txt index c5a4b23..59f5368 100644 --- a/features.txt +++ b/features.txt @@ -1,20 +1,20 @@ - - -== Footnotes Features == -- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes on a single page - - Maybe increase PHP max execution time while processing the Footnotes task -- different background for every odd table row - -- Offer a set of pre-defined styles for the footnotes.Reference.Container -There should be 2 pre-defined styles for the footnotes.Reference.Container and the ability to customize or add templates. -the currently used one should be one of those templates and pre-defined styles offered but not the default setting. - - -== Footnotes Bugs == -- Setting "Excerpt No" doesn't work - - -== TODO == - - Statistics: How many Footnotes in each post/page - - Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes) + + +== Footnotes Features == +- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes on a single page + - Maybe increase PHP max execution time while processing the Footnotes task +- different background for every odd table row + +- Offer a set of pre-defined styles for the footnotes.Reference.Container +There should be 2 pre-defined styles for the footnotes.Reference.Container and the ability to customize or add templates. +the currently used one should be one of those templates and pre-defined styles offered but not the default setting. + + +== Footnotes Bugs == +- Setting "Excerpt No" doesn't work + + +== TODO == + - Statistics: How many Footnotes in each post/page + - Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes) - Anonymous stats to the developers \ No newline at end of file diff --git a/footnotes.php b/footnotes.php index ef4848f..e05f2d9 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,75 +1,75 @@ -run(); - -/** - * Sets the stylesheet enqueuing mode for production. - * - * @since 2.5.5 - * @var bool - * @see class/init.php - * - * In production, a minified CSS file tailored to the settings is enqueued. - * - * Developing stylesheets is meant to be easier when this is set to false. - * WARNING: This facility designed for development must NOT be used in production. - */ -define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); +run(); + +/** + * Sets the stylesheet enqueuing mode for production. + * + * @since 2.5.5 + * @var bool + * @see class/init.php + * + * In production, a minified CSS file tailored to the settings is enqueued. + * + * Developing stylesheets is meant to be easier when this is set to false. + * WARNING: This facility designed for development must NOT be used in production. + */ +define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index aa35d1c..732cfb9 100644 --- a/includes.php +++ b/includes.php @@ -1,37 +1,38 @@ - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read . \ No newline at end of file diff --git a/readme.txt b/readme.txt index 5dbb96f..82e80f3 100755 --- a/readme.txt +++ b/readme.txt @@ -1,622 +1,622 @@ -=== footnotes === -Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges -Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing -Requires at least: 3.9 -Tested up to: 5.6.1 -Requires PHP: 5.6 -Stable Tag: 2.5.5 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html - -== Description == - -Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ -Cheers for the review, folks! - -https://www.youtube.com/watch?v=HzHaMAAJwbI - -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. - -= Main Features = -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. - -= Example Usage = -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -= Where to get footnotes? = -The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). - -= Support = -Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). - -Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). - -= Development = -Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). - -== Frequently Asked Questions == - -= Is your Plugin a copy of footnotes x? = - -No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. - -= Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = - -1. For anyone interested in converting from the FD Footnotes plugin: -Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 -2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! - -== Installation == -- Visit your WordPress Admin area -- Navigate to `Plugins\Add` -- Search for **footnotes** and find this Plugin among others -- Install the latest version of the **footnotes** Plugin from WordPress.org -- Activate the Plugin - -== Screenshots == -1. Find the footnotes plugin settings in the newly added "ManFisher" Menu -2. Settings for the *References Container* -3. Settings for **footnotes** styling -4. Settings for **footnotes** love -5. Other Settings -6. The HowTo section in the **footnotes** settings -7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? - -== Changelog == - -= 2.5.6 = -- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. -- Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. - -= 2.5.5 = -- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. -- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. -- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. -- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. -- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. -- Update: Dashboard: decrease font size and padding of the descriptions. - -= 2.5.4 = -- 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. -- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. -- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. -- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. -- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. -- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. -- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. -- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. -- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. -- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. -- Bugfix: Editor button: Classic Editor text mode: correct label to singular. -- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. - -= 2.5.3 = -- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. - -= 2.5.2 = -- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. -- Bugfix: Localization: plugin language file name changes effective in version control system. - -= 2.5.1 = -- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. -- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. -- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. -- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. -- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. -- Update: Readme/documentation: add new contributors in the file header’s Contributors field. -- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. - -= 2.5.0 = -- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. -- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. -- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. -- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. -- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. - -= 2.4.0 = -- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. -- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. -- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. -- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. -- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. -- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. -- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. -- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. - -= 2.3.0 = -- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. -- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. -- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. -- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. -- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. -- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. -- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. -- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. -- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. - -= 2.2.10 = -- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. -- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. -- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. - -= 2.2.9 = -- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. -- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. -- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. -- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. - -= 2.2.8 = -- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - -= 2.2.7 = -- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - -= 2.2.6 = -- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. -- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - -= 2.2.5 = -- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. -- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. -- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. -- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. -- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). -- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). -- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. - -= 2.2.4 = -- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. -- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. - -= 2.2.3 = -- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. - -= 2.2.2 = -- Bugfix: Dashboard: Link element setting only under General settings > Reference container. -- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. -- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. - -= 2.2.1 = -- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. - -= 2.2.0 = -- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. -- Adding: Start/end short codes: more predefined options. -- Adding: Numbering styles: lowercase Roman numerals support. -- Update: Priority levels: update the notice in the dashboard Priority tab. -- Update: Dashboard: Tooltip settings: group into 3 thematic containers. -- Update: Dashboard: Main settings: group into 3 specific containers. -- Update: Dashboard: move link element option to the Referrers options. -- Update: Dashboard: move URL wrap option to the Reference container options. -- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. -- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. -- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. -- Bugfix: Localization: correct arguments for plugin textdomain load function. -- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. -- Adding: Footnotes mention in the footer: more options. - -= 2.1.6 = -- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. -- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. -- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. -- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. -- Update: Dashboard: reorder tabs and update tab labels. -- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. -- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. -- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. - -= 2.1.5 = -- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - -= 2.1.4 = -- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. -- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. -- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. -- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. -- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). -- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. -- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. -- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. -- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Referrers: Styling: disable hover underline. -- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. -- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. -- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. -- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. -- Bugfix: Reference container: Label: delete overflow hidden rule. -- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. -- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. -- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. -- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. -- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. -- Update: Dashboard: Notices: use explicit italic style. -- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. -- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. -- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. - -= 2.1.3 = -- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. -- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. -- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. -- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. -- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. -- Bugfix: Styling: raise Custom CSS priority to override settings. -- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. - -= 2.1.2 = -- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. -- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. -- Update: Dashboard: WordPress documentation URLs of the hooks. -- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. - -= 2.1.1 = -- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. -- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. -- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. -- Bugfix: Libraries: jQuery Tools: complete minification. -- Bugfix: Libraries: make script loads depend on tooltip implementation option. -- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. -- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. -- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. -- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. -- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. -- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. -- Bugfix: Reference container: Table rows: fix top and bottom padding. -- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. -- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. -- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. -- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. -- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. -- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. - -= 2.1.0 = -- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. -- Bugfix: Referrers: disable bottom border for theme compatibility. -- Update: Accessibility: add 'speaker-mute' class to reference container. -- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. -- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - -= 2.0.8 = -- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). - -= 2.0.7 = -- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. -- Update: Set priority level back to 10 assuming it is unproblematic. -- Update: Added backwards compatible support for legacy arrow and index placeholders in template. -- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. - -= 2.0.6 = -- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. -- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. -- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. -- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. -- Bugfix: Reference container: IDs: slightly increased left padding. -- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. -- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). -- Bugfix: Reference container: Collapse button fully clickable, not sign only. -- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. -- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). -- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). -- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). -- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. - -= 2.0.5 = -- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. -- Bugfix: Reference container: unset width of text column to fix site issues. -- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. -- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. -- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). - -= 2.0.4 = -- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: GDPR: Add jQuery UI from WordPress instead of third party. -- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. -- Bugfix: Reference container: remove inconvenient left/right cellpadding. -- Bugfix: Tooltips: improve layout with inherited font size by lower line height. -- Bugfix: Tooltips: 'Continue reading' button: disable default underline. -- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. -- Bugfix: Dashboard: fix display of two headings containing the logo. - -= 2.0.3 = -- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. -- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. -- Bugfix: Fragment IDs: Prepended post ID to footnote number. -- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. -- Bugfix: Print style: prevent a page break just after the reference container label. -- Bugfix: Print style: Hide reference collapse button. -- Update: Reference container: Headline: remove padding before reference container label. -- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. - -= 2.0.2 = -- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. -- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. -- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. -- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. - -= 2.0.1 = -- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. -- Update: Translations: revised fr_FR. - -= 2.0.0 = -- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: -- Update: **symbol for backlinks** removed -- Update: hyperlink moved to the reference number -- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. -- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. -- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. -- Bugfix: footnote links script independent -- Bugfix: Get the “Continue reading” link to work in the mouse-over box -- Bugfix: Debug printed posts and pages -- Bugfix: Display of combined identical notes -- Update: Adjusted scrolling time and offset -- Bugfix: No borders around footnotes in the container -- Bugfix: Mouse-over box display timing -- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES - -= 1.6.6 = -- Beginning of translation to French - -= 1.6.5 = -- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. -- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. -- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text -- Bugfix: Dashboard: fix error on demo under the Preview tab. - -= 1.6.4 = -- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. -- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - -= 1.6.3 = -- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress - -= 1.6.2 = -- Update: Changed the Preview tab -- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled - -= 1.6.1 = -- Update: Translations -- Bugfix: Move to anchor - -= 1.6.0 = -- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) -- Adding: Setting to customize the mouse-over box shadow -- Adding: Translation: United States -- Adding: Translation: Austria -- Adding: Translation: Spanish (many thanks to Pablo L.) -- Update: Translations (de_DE and en_GB) -- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) -- Update: ManFisher note styling -- Update: Tested with latest nightly build of WordPress 4.1 -- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed - -= 1.5.7 = -- Adding: Setting to define the positioning of the mouse-over box -- Adding: Setting to define an offset for the mouse-over box (precise positioning) -- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) -- Bugfix: Rating calculation for the 'other plugins' list - -= 1.5.6 = -- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. -- Adding: .pot file to enable Translations for everybody -- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) -- Update: Translation file names -- Update: Translation EN and DE -- Update: Styling of the superscript (need to check custom CSS code for the superscript) -- Update: Description of CSS classes for the 'customize CSS' text area -- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) -- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting -- Bugfix: Enable multiple WP_Post objects for the_post hook - -= 1.5.5 = -- Adding: Expert mode setting -- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) -- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes -- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) -- Bugfix: Activation, Deactivation and Uninstall hook class name -- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin -- Bugfix: Display the Reference container in the Footer correctly - -= 1.5.4 = -- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) -- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) -- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) -- Update: Receiving list of other Plugins from the Developer Team from an external server -- Update: Translations (EN and DE) -- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) -- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) -- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database - -= 1.5.3 = -- Adding: Developer's homepage to the 'other Plugins' list -- Update: Smoothy scroll to an anchor using Javascript -- Bugfix: Set the vertical align for each cell in the Reference container to TOP - -= 1.5.2 = -- Adding: Setting to enable/disable the mouse-over box -- Adding: Current WordPress Theme to the Diagnostics sub page -- Adding: ManFisher note in the "other Plugins" sub page -- Update: Removed unnecessary hidden inputs from the Settings page -- Update: Merged public CSS files to reduce the output and improve the performance -- Update: Translations (EN and DE) -- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting -- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) -- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' - -= 1.5.1 = -- Bugfix: Broken Settings link in the Plugin listing -- Bugfix: Translation overhaul for German - -= 1.5.0 = -- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" -- Adding: Sub Page to list all other Plugins of the Contributors -- Adding: Hyperlink to manfisher.eu in the "other plugins" page -- Update: Refactored the whole source code -- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" -- Bugfix: Line up Footnotes with multiple lines in the Reference container -- Bugfix: Load text domain -- Bugfix: Display the Footnotes button in the plain text editor of posts/pages - -= 1.4.0 = -- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) -- Update: Changed e-Mail support address to the WordPress support forum -- Update: Language EN and DE -- Adding: Tab for Plugin Diagnostics -- Adding: Donate link to the installed Plugin overview page -- Adding: Donate button to the "HowTo" tab - -= 1.3.4 = -- Bugfix: Settings access permission vor sub-sites -- Bugfix: Setting 'combine identical footnotes' working as it should - -= 1.3.3 = -- Update: Changed the Author name from a fictitious entity towards a real registered company -- Update: Changed the Author URI - -= 1.3.2 = -- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) -- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) -- Update: language EN and DE -- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference -- Adding: Setting to enter a user defined hyperlink symbol -- - -= 1.3.1 = -- Bugfix: Allow settings to be empty -- Bugfix: Removed space between the hyperlink and superscript in the footnotes index -- Adding: Setting to customize the text before and after the footnotes index in superscript - -= 1.3.0 = -- Bugfix: Changed tooltip class to be unique -- Bugfix: Changed superscript styling to not manipulate the line height -- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks -- Update: Reformatted code -- Adding: new settings tab for custom CSS settings - -= 1.2.5 = -- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) - -= 1.2.4 = -- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) -- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) -- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) - -= 1.2.3 = -- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) -- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) -- Bugfix: Removed Widget text formatting -- Bugfix: Load default settings value of setting doesn't exist yet (first usage) -- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content -- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) - -= 1.2.2 = -- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) -- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer -- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" -- Bugfix: Replace footnote short code -- Update: Combined buttons for the "collapse/expand" reference container - -= 1.2.1 = -- Bugfix: HowTo example will be displayed correctly if a user defined short code is set - -= 1.2.0 = -- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag -- Feature: Icon for the WYSIWYG-editor button -- Feature: Pre defined footnote short codes -- Experimental: User defined short code for defining footnotes -- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" -- Update: Moved footnotes 'love' settings to a separate container -- Update: Translation for new settings and for the Widget description -- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" - -= 1.1.1 = -- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) -- Update: Setting where the reference container appears on public pages can also be set to the widget area -- Adding: Link to the wordpress.org support page in the plugin main page -- Update: Changed plugin URL from GitHub to WordPress -- Bugfix: Uninstall function to really remove all settings done in the settings page -- Bugfix: Load default settings after plugin is installed -- Update: Translation for support link and new setting option -- Adding: Label to display the user the short code to not display the 'love me' slug - -= 1.1.0 = -- Update: Global styling for the public plugin name -- Update: Easier usage of the public plugin name in translations -- Update: New Layout for the settings page to group similar settings to get a better overview -- Update: Display settings submit button only if there is at least 1 editable setting in the current tab -- Adding: Setting where the reference container appears on public pages (needs some corrections!) -- Bugfix: Displays only one reference container in front of the footer on category pages - -= 1.0.6 = -- Bugfix: Uninstall function to delete all plugin settings -- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above -- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over -- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' - -= 1.0.5 = -- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. -- Update: Plugin description for public directories (WordPress.org and GitHub) -- Feature: the footnotes WordPress Plugin now has its very own CI - - Update: Styling - - Update: Settings to support the styling -- Adding: Inspirational Screenshots for further development -- Adding: Settings screenshot -- Update: i18n fine-tuning - -= 1.0.4 = -- Update: replacing function when footnote is a link (bugfix) -- Footnote hover box remains until cursor leaves footnote or hover box -- Links in the footnote hover box are click able -- Adding: setting to allow footnotes on Summarized Posts -- Adding: setting to tell the world you're using footnotes plugin -- Adding: setting for the counter style of the footnote index - - Arabic Numbers (1, 2, 3, 4, 5, ...) - - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) - - Latin Characters lower-case (a, b, c, d, e, ...) - - Latin Characters upper-case (A, B, C, D, E, ...) - - Roman Numerals (I, II, III, IV, V, ...) -- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it -- Update: translations for the new settings -- Switch back the version numbering scheme to have 3 digits - -= 1.0.3 = -- Adding: setting to use personal starting and ending tag for the footnotes -- Update: translations for the new setting -- Update: reading settings and fallback to default values (bugfix) - -= 1.0.2 = -- Adding: setting to collapse the reference container by default -- Adding: link behind the footnotes to automatically jump to the reference container -- Adding: function to easy output input fields for the settings page -- Update: translation for the new setting - -= 1.0.1 = -- Separated functions in different files for a better overview -- Adding: a version control to each file / class / function / variable -- Adding: layout for the settings menu, settings split in tabs and not a list-view -- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) -- Update: translations for EN and DE -- Changed version number from 3 digits to 2 digits - -= 1.0.0 = -- First development Version of the Plugin - -== Upgrade Notice == -to upgrade our plugin is simple. Just update the plugin within your WordPress installation. -To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future +=== footnotes === +Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges +Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing +Requires at least: 3.9 +Tested up to: 5.6.1 +Requires PHP: 5.6 +Stable Tag: 2.5.5 +License: GPLv3 or later +License URI: http://www.gnu.org/licenses/gpl-3.0.html + +== Description == + +Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +Cheers for the review, folks! + +https://www.youtube.com/watch?v=HzHaMAAJwbI + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. + += Main Features = +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + += Example Usage = +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + += Where to get footnotes? = +The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). + += Support = +Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). + +Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). + += Development = +Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). + +== Frequently Asked Questions == + += Is your Plugin a copy of footnotes x? = + +No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. + += Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = + +1. For anyone interested in converting from the FD Footnotes plugin: +Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 +2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! + +== Installation == +- Visit your WordPress Admin area +- Navigate to `Plugins\Add` +- Search for **footnotes** and find this Plugin among others +- Install the latest version of the **footnotes** Plugin from WordPress.org +- Activate the Plugin + +== Screenshots == +1. Find the footnotes plugin settings in the newly added "ManFisher" Menu +2. Settings for the *References Container* +3. Settings for **footnotes** styling +4. Settings for **footnotes** love +5. Other Settings +6. The HowTo section in the **footnotes** settings +7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? + +== Changelog == + += 2.5.6 = +- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. +- Bugfix: Alternative tooltips: shrink width to short content. +- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. + += 2.5.5 = +- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. +- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. +- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. +- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. +- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. +- Update: Dashboard: decrease font size and padding of the descriptions. + += 2.5.4 = +- 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. +- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. +- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. +- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. +- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. +- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. +- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. +- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. +- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. +- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. +- Bugfix: Editor button: Classic Editor text mode: correct label to singular. +- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. + += 2.5.3 = +- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. + += 2.5.2 = +- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. +- Bugfix: Localization: plugin language file name changes effective in version control system. + += 2.5.1 = +- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. +- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. +- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. +- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. +- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. +- Update: Readme/documentation: add new contributors in the file header’s Contributors field. +- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. + += 2.5.0 = +- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. +- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. +- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. +- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. +- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. + += 2.4.0 = +- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. +- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. +- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. +- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. +- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. +- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. +- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. +- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. + += 2.3.0 = +- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. +- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. +- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. +- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. +- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. +- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. +- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. +- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. +- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. + += 2.2.10 = +- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. +- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. +- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. + += 2.2.9 = +- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. +- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. +- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. +- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. + += 2.2.8 = +- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + += 2.2.7 = +- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + += 2.2.6 = +- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. +- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. + += 2.2.5 = +- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. +- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. +- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. +- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. +- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). +- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). +- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. + += 2.2.4 = +- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. +- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. + += 2.2.3 = +- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. + += 2.2.2 = +- Bugfix: Dashboard: Link element setting only under General settings > Reference container. +- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. +- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. + += 2.2.1 = +- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. + += 2.2.0 = +- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. +- Adding: Start/end short codes: more predefined options. +- Adding: Numbering styles: lowercase Roman numerals support. +- Update: Priority levels: update the notice in the dashboard Priority tab. +- Update: Dashboard: Tooltip settings: group into 3 thematic containers. +- Update: Dashboard: Main settings: group into 3 specific containers. +- Update: Dashboard: move link element option to the Referrers options. +- Update: Dashboard: move URL wrap option to the Reference container options. +- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. +- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. +- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. +- Bugfix: Localization: correct arguments for plugin textdomain load function. +- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. +- Adding: Footnotes mention in the footer: more options. + += 2.1.6 = +- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. +- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. +- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. +- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. +- Update: Dashboard: reorder tabs and update tab labels. +- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. +- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. +- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. + += 2.1.5 = +- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + += 2.1.4 = +- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. +- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. +- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. +- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. +- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). +- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. +- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. +- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. +- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Referrers: Styling: disable hover underline. +- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. +- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. +- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. +- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. +- Bugfix: Reference container: Label: delete overflow hidden rule. +- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. +- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. +- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. +- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. +- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. +- Update: Dashboard: Notices: use explicit italic style. +- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. +- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. +- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. + += 2.1.3 = +- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. +- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. +- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. +- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. +- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. +- Bugfix: Styling: raise Custom CSS priority to override settings. +- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. + += 2.1.2 = +- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. +- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. +- Update: Dashboard: WordPress documentation URLs of the hooks. +- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. + += 2.1.1 = +- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. +- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. +- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. +- Bugfix: Libraries: jQuery Tools: complete minification. +- Bugfix: Libraries: make script loads depend on tooltip implementation option. +- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. +- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. +- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. +- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. +- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. +- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. +- Bugfix: Reference container: Table rows: fix top and bottom padding. +- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. +- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. +- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. +- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. +- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. +- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. + += 2.1.0 = +- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. +- Bugfix: Referrers: disable bottom border for theme compatibility. +- Update: Accessibility: add 'speaker-mute' class to reference container. +- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. +- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + += 2.0.8 = +- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). + += 2.0.7 = +- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. +- Update: Set priority level back to 10 assuming it is unproblematic. +- Update: Added backwards compatible support for legacy arrow and index placeholders in template. +- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. + += 2.0.6 = +- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. +- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. +- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. +- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. +- Bugfix: Reference container: IDs: slightly increased left padding. +- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. +- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). +- Bugfix: Reference container: Collapse button fully clickable, not sign only. +- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. +- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). +- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). +- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. + += 2.0.5 = +- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. +- Bugfix: Reference container: unset width of text column to fix site issues. +- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. +- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. +- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). + += 2.0.4 = +- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. +- Update: GDPR: Add jQuery UI from WordPress instead of third party. +- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. +- Bugfix: Reference container: remove inconvenient left/right cellpadding. +- Bugfix: Tooltips: improve layout with inherited font size by lower line height. +- Bugfix: Tooltips: 'Continue reading' button: disable default underline. +- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. +- Bugfix: Dashboard: fix display of two headings containing the logo. + += 2.0.3 = +- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. +- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. +- Bugfix: Fragment IDs: Prepended post ID to footnote number. +- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. +- Bugfix: Print style: prevent a page break just after the reference container label. +- Bugfix: Print style: Hide reference collapse button. +- Update: Reference container: Headline: remove padding before reference container label. +- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. + += 2.0.2 = +- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. +- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. +- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. +- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. + += 2.0.1 = +- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. +- Update: Translations: revised fr_FR. + += 2.0.0 = +- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: +- Update: **symbol for backlinks** removed +- Update: hyperlink moved to the reference number +- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. +- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. +- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. +- Bugfix: footnote links script independent +- Bugfix: Get the “Continue reading” link to work in the mouse-over box +- Bugfix: Debug printed posts and pages +- Bugfix: Display of combined identical notes +- Update: Adjusted scrolling time and offset +- Bugfix: No borders around footnotes in the container +- Bugfix: Mouse-over box display timing +- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES + += 1.6.6 = +- Beginning of translation to French + += 1.6.5 = +- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. +- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. +- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text +- Bugfix: Dashboard: fix error on demo under the Preview tab. + += 1.6.4 = +- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. +- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + += 1.6.3 = +- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress + += 1.6.2 = +- Update: Changed the Preview tab +- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled + += 1.6.1 = +- Update: Translations +- Bugfix: Move to anchor + += 1.6.0 = +- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) +- Adding: Setting to customize the mouse-over box shadow +- Adding: Translation: United States +- Adding: Translation: Austria +- Adding: Translation: Spanish (many thanks to Pablo L.) +- Update: Translations (de_DE and en_GB) +- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) +- Update: ManFisher note styling +- Update: Tested with latest nightly build of WordPress 4.1 +- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed + += 1.5.7 = +- Adding: Setting to define the positioning of the mouse-over box +- Adding: Setting to define an offset for the mouse-over box (precise positioning) +- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) +- Bugfix: Rating calculation for the 'other plugins' list + += 1.5.6 = +- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. +- Adding: .pot file to enable Translations for everybody +- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) +- Update: Translation file names +- Update: Translation EN and DE +- Update: Styling of the superscript (need to check custom CSS code for the superscript) +- Update: Description of CSS classes for the 'customize CSS' text area +- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) +- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting +- Bugfix: Enable multiple WP_Post objects for the_post hook + += 1.5.5 = +- Adding: Expert mode setting +- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) +- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes +- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) +- Bugfix: Activation, Deactivation and Uninstall hook class name +- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin +- Bugfix: Display the Reference container in the Footer correctly + += 1.5.4 = +- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) +- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) +- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) +- Update: Receiving list of other Plugins from the Developer Team from an external server +- Update: Translations (EN and DE) +- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) +- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) +- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database + += 1.5.3 = +- Adding: Developer's homepage to the 'other Plugins' list +- Update: Smoothy scroll to an anchor using Javascript +- Bugfix: Set the vertical align for each cell in the Reference container to TOP + += 1.5.2 = +- Adding: Setting to enable/disable the mouse-over box +- Adding: Current WordPress Theme to the Diagnostics sub page +- Adding: ManFisher note in the "other Plugins" sub page +- Update: Removed unnecessary hidden inputs from the Settings page +- Update: Merged public CSS files to reduce the output and improve the performance +- Update: Translations (EN and DE) +- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting +- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) +- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' + += 1.5.1 = +- Bugfix: Broken Settings link in the Plugin listing +- Bugfix: Translation overhaul for German + += 1.5.0 = +- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" +- Adding: Sub Page to list all other Plugins of the Contributors +- Adding: Hyperlink to manfisher.eu in the "other plugins" page +- Update: Refactored the whole source code +- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" +- Bugfix: Line up Footnotes with multiple lines in the Reference container +- Bugfix: Load text domain +- Bugfix: Display the Footnotes button in the plain text editor of posts/pages + += 1.4.0 = +- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) +- Update: Changed e-Mail support address to the WordPress support forum +- Update: Language EN and DE +- Adding: Tab for Plugin Diagnostics +- Adding: Donate link to the installed Plugin overview page +- Adding: Donate button to the "HowTo" tab + += 1.3.4 = +- Bugfix: Settings access permission vor sub-sites +- Bugfix: Setting 'combine identical footnotes' working as it should + += 1.3.3 = +- Update: Changed the Author name from a fictitious entity towards a real registered company +- Update: Changed the Author URI + += 1.3.2 = +- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) +- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) +- Update: language EN and DE +- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference +- Adding: Setting to enter a user defined hyperlink symbol +- + += 1.3.1 = +- Bugfix: Allow settings to be empty +- Bugfix: Removed space between the hyperlink and superscript in the footnotes index +- Adding: Setting to customize the text before and after the footnotes index in superscript + += 1.3.0 = +- Bugfix: Changed tooltip class to be unique +- Bugfix: Changed superscript styling to not manipulate the line height +- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks +- Update: Reformatted code +- Adding: new settings tab for custom CSS settings + += 1.2.5 = +- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) + += 1.2.4 = +- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) +- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) +- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) + += 1.2.3 = +- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) +- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) +- Bugfix: Removed Widget text formatting +- Bugfix: Load default settings value of setting doesn't exist yet (first usage) +- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content +- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) + += 1.2.2 = +- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) +- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer +- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" +- Bugfix: Replace footnote short code +- Update: Combined buttons for the "collapse/expand" reference container + += 1.2.1 = +- Bugfix: HowTo example will be displayed correctly if a user defined short code is set + += 1.2.0 = +- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag +- Feature: Icon for the WYSIWYG-editor button +- Feature: Pre defined footnote short codes +- Experimental: User defined short code for defining footnotes +- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" +- Update: Moved footnotes 'love' settings to a separate container +- Update: Translation for new settings and for the Widget description +- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" + += 1.1.1 = +- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) +- Update: Setting where the reference container appears on public pages can also be set to the widget area +- Adding: Link to the wordpress.org support page in the plugin main page +- Update: Changed plugin URL from GitHub to WordPress +- Bugfix: Uninstall function to really remove all settings done in the settings page +- Bugfix: Load default settings after plugin is installed +- Update: Translation for support link and new setting option +- Adding: Label to display the user the short code to not display the 'love me' slug + += 1.1.0 = +- Update: Global styling for the public plugin name +- Update: Easier usage of the public plugin name in translations +- Update: New Layout for the settings page to group similar settings to get a better overview +- Update: Display settings submit button only if there is at least 1 editable setting in the current tab +- Adding: Setting where the reference container appears on public pages (needs some corrections!) +- Bugfix: Displays only one reference container in front of the footer on category pages + += 1.0.6 = +- Bugfix: Uninstall function to delete all plugin settings +- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above +- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over +- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' + += 1.0.5 = +- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. +- Update: Plugin description for public directories (WordPress.org and GitHub) +- Feature: the footnotes WordPress Plugin now has its very own CI + - Update: Styling + - Update: Settings to support the styling +- Adding: Inspirational Screenshots for further development +- Adding: Settings screenshot +- Update: i18n fine-tuning + += 1.0.4 = +- Update: replacing function when footnote is a link (bugfix) +- Footnote hover box remains until cursor leaves footnote or hover box +- Links in the footnote hover box are click able +- Adding: setting to allow footnotes on Summarized Posts +- Adding: setting to tell the world you're using footnotes plugin +- Adding: setting for the counter style of the footnote index + - Arabic Numbers (1, 2, 3, 4, 5, ...) + - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) + - Latin Characters lower-case (a, b, c, d, e, ...) + - Latin Characters upper-case (A, B, C, D, E, ...) + - Roman Numerals (I, II, III, IV, V, ...) +- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it +- Update: translations for the new settings +- Switch back the version numbering scheme to have 3 digits + += 1.0.3 = +- Adding: setting to use personal starting and ending tag for the footnotes +- Update: translations for the new setting +- Update: reading settings and fallback to default values (bugfix) + += 1.0.2 = +- Adding: setting to collapse the reference container by default +- Adding: link behind the footnotes to automatically jump to the reference container +- Adding: function to easy output input fields for the settings page +- Update: translation for the new setting + += 1.0.1 = +- Separated functions in different files for a better overview +- Adding: a version control to each file / class / function / variable +- Adding: layout for the settings menu, settings split in tabs and not a list-view +- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) +- Update: translations for EN and DE +- Changed version number from 3 digits to 2 digits + += 1.0.0 = +- First development Version of the Plugin + +== Upgrade Notice == +to upgrade our plugin is simple. Just update the plugin within your WordPress installation. +To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future diff --git a/templates/dashboard/customize-css-migration.html b/templates/dashboard/customize-css-migration.html index 5a8ef97..25ce519 100644 --- a/templates/dashboard/customize-css-migration.html +++ b/templates/dashboard/customize-css-migration.html @@ -1,18 +1,18 @@ -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-css]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - - - - - -
                                                                                                                                                                  [[label-css]][[css]]
                                                                                                                                                                  [[label-show-legacy]][[show-legacy]] [[notice-show-legacy]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-show-legacy]]

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-css]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                  [[label-css]][[css]]
                                                                                                                                                                  [[label-show-legacy]][[show-legacy]] [[notice-show-legacy]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-show-legacy]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/customize-css-new.html b/templates/dashboard/customize-css-new.html index 4364e71..d6dff15 100644 --- a/templates/dashboard/customize-css-new.html +++ b/templates/dashboard/customize-css-new.html @@ -1,33 +1,33 @@ - - - - - - - -
                                                                                                                                                                  [[headline]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  .footnote_referrer = enclosing <span> -

                                                                                                                                                                  .footnote_referrer > a = optional <a> enclosing the <sup> -

                                                                                                                                                                  .footnote_plugin_tooltip_text = inner <sup>, not tooltip -

                                                                                                                                                                  -

                                                                                                                                                                  .footnote_tooltip = inner <span> -

                                                                                                                                                                  .footnote_tooltip_continue = nested <span> -

                                                                                                                                                                  -

                                                                                                                                                                  .footnotes_reference_container = enclosing <div> -

                                                                                                                                                                  .footnote_container_prepare = label <div> -

                                                                                                                                                                  .footnote_reference_container_label = <span> -

                                                                                                                                                                  .footnote_reference_container_collapse_button = sibling <span> -

                                                                                                                                                                  -

                                                                                                                                                                  .footnotes_table = <table> -

                                                                                                                                                                  .footnotes_plugin_reference_row = <tr> -

                                                                                                                                                                  .footnote_plugin_index_combi = first <td> if identical footnotes are combined -

                                                                                                                                                                  .footnote_plugin_index = first <td> if identical footnotes are not combined -

                                                                                                                                                                  .footnote_index = <a> or <span> in first <td> in 3-column table -

                                                                                                                                                                  .footnote_plugin_symbol = second <td> in 3-column table -

                                                                                                                                                                  .footnote_plugin_link = <a> or <span> if identical footnotes are not combined -

                                                                                                                                                                  .footnote_backlink = <a> or <span> if identical footnotes are combined, or in second <td> in 3-column table -

                                                                                                                                                                  .footnote_index_arrow = nested <span>, symbol only -

                                                                                                                                                                  .footnote_plugin_text = second <td>, or third <td> in 3-column table -

                                                                                                                                                                  -
                                                                                                                                                                  [[css]]
                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                  [[headline]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  .footnote_referrer = enclosing <span> +

                                                                                                                                                                  .footnote_referrer > a = optional <a> enclosing the <sup> +

                                                                                                                                                                  .footnote_plugin_tooltip_text = inner <sup>, not tooltip +

                                                                                                                                                                  +

                                                                                                                                                                  .footnote_tooltip = inner <span> +

                                                                                                                                                                  .footnote_tooltip_continue = nested <span> +

                                                                                                                                                                  +

                                                                                                                                                                  .footnotes_reference_container = enclosing <div> +

                                                                                                                                                                  .footnote_container_prepare = label <div> +

                                                                                                                                                                  .footnote_reference_container_label = <span> +

                                                                                                                                                                  .footnote_reference_container_collapse_button = sibling <span> +

                                                                                                                                                                  +

                                                                                                                                                                  .footnotes_table = <table> +

                                                                                                                                                                  .footnotes_plugin_reference_row = <tr> +

                                                                                                                                                                  .footnote_plugin_index_combi = first <td> if identical footnotes are combined +

                                                                                                                                                                  .footnote_plugin_index = first <td> if identical footnotes are not combined +

                                                                                                                                                                  .footnote_index = <a> or <span> in first <td> in 3-column table +

                                                                                                                                                                  .footnote_plugin_symbol = second <td> in 3-column table +

                                                                                                                                                                  .footnote_plugin_link = <a> or <span> if identical footnotes are not combined +

                                                                                                                                                                  .footnote_backlink = <a> or <span> if identical footnotes are combined, or in second <td> in 3-column table +

                                                                                                                                                                  .footnote_index_arrow = nested <span>, symbol only +

                                                                                                                                                                  .footnote_plugin_text = second <td>, or third <td> in 3-column table +

                                                                                                                                                                  +
                                                                                                                                                                  [[css]]
                                                                                                                                                                  diff --git a/templates/dashboard/customize-css.html b/templates/dashboard/customize-css.html index 6a5152f..ab4074b 100644 --- a/templates/dashboard/customize-css.html +++ b/templates/dashboard/customize-css.html @@ -1,11 +1,11 @@ -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-css]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - -
                                                                                                                                                                  [[label-css]][[css]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-css]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                  [[label-css]][[css]]
                                                                                                                                                                  diff --git a/templates/dashboard/customize-hyperlink-arrow.html b/templates/dashboard/customize-hyperlink-arrow.html index 0608266..297f2e5 100644 --- a/templates/dashboard/customize-hyperlink-arrow.html +++ b/templates/dashboard/customize-hyperlink-arrow.html @@ -1,15 +1,15 @@ - - - - - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-symbol]]

                                                                                                                                                                  -
                                                                                                                                                                  + + + + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-symbol]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/customize-superscript.html b/templates/dashboard/customize-superscript.html index b6f5f02..295f972 100644 --- a/templates/dashboard/customize-superscript.html +++ b/templates/dashboard/customize-superscript.html @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-superscript]][[superscript]]
                                                                                                                                                                  [[label-normalize]][[normalize]] [[notice-normalize]]
                                                                                                                                                                  [[label-before]][[before]]
                                                                                                                                                                  [[label-after]][[after]]
                                                                                                                                                                  [[label-link]][[notice-link]]
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-superscript]][[superscript]]
                                                                                                                                                                  [[label-normalize]][[normalize]] [[notice-normalize]]
                                                                                                                                                                  [[label-before]][[before]]
                                                                                                                                                                  [[label-after]][[after]]
                                                                                                                                                                  [[label-link]][[notice-link]]
                                                                                                                                                                  diff --git a/templates/dashboard/diagnostics.html b/templates/dashboard/diagnostics.html index 1c70134..450d9e2 100644 --- a/templates/dashboard/diagnostics.html +++ b/templates/dashboard/diagnostics.html @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[plugins]] - -
                                                                                                                                                                  [[label-server]][[server]]
                                                                                                                                                                  [[label-php]][[php]]
                                                                                                                                                                  [[label-user-agent]][[user-agent]]
                                                                                                                                                                  [[label-max-execution-time]][[max-execution-time]]
                                                                                                                                                                  [[label-memory-limit]][[memory-limit]]
                                                                                                                                                                  [[label-php-extensions]][[php-extensions]]
                                                                                                                                                                  [[label-wordpress]][[wordpress]]
                                                                                                                                                                  [[label-theme]][[theme]]
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[plugins]] + +
                                                                                                                                                                  [[label-server]][[server]]
                                                                                                                                                                  [[label-php]][[php]]
                                                                                                                                                                  [[label-user-agent]][[user-agent]]
                                                                                                                                                                  [[label-max-execution-time]][[max-execution-time]]
                                                                                                                                                                  [[label-memory-limit]][[memory-limit]]
                                                                                                                                                                  [[label-php-extensions]][[php-extensions]]
                                                                                                                                                                  [[label-wordpress]][[wordpress]]
                                                                                                                                                                  [[label-theme]][[theme]]
                                                                                                                                                                  diff --git a/templates/dashboard/editor-button.html b/templates/dashboard/editor-button.html index ca69429..c12624d 100644 --- a/templates/dashboard/editor-button.html +++ b/templates/dashboard/editor-button.html @@ -1,62 +1,62 @@ - - + + diff --git a/templates/dashboard/expert-lookup.html b/templates/dashboard/expert-lookup.html index f499ef4..b3b3ab8 100644 --- a/templates/dashboard/expert-lookup.html +++ b/templates/dashboard/expert-lookup.html @@ -1,50 +1,50 @@ -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-1]]

                                                                                                                                                                  -

                                                                                                                                                                  [[description-2]]

                                                                                                                                                                  -

                                                                                                                                                                  [[description-3]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[head-hook]][[head-checkbox]][[head-numbox]][[head-url]]
                                                                                                                                                                  [[label-the-title]][[the-title]][[priority-the-title]][[url-the-title]]
                                                                                                                                                                  [[label-the-content]][[the-content]][[priority-the-content]][[url-the-content]]
                                                                                                                                                                  [[label-the-excerpt]][[the-excerpt]][[priority-the-excerpt]][[url-the-excerpt]]
                                                                                                                                                                  [[label-widget-title]][[widget-title]][[priority-widget-title]][[url-widget-title]]
                                                                                                                                                                  [[label-widget-text]][[widget-text]][[priority-widget-text]][[url-widget-text]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-4]]

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-1]]

                                                                                                                                                                  +

                                                                                                                                                                  [[description-2]]

                                                                                                                                                                  +

                                                                                                                                                                  [[description-3]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[head-hook]][[head-checkbox]][[head-numbox]][[head-url]]
                                                                                                                                                                  [[label-the-title]][[the-title]][[priority-the-title]][[url-the-title]]
                                                                                                                                                                  [[label-the-content]][[the-content]][[priority-the-content]][[url-the-content]]
                                                                                                                                                                  [[label-the-excerpt]][[the-excerpt]][[priority-the-excerpt]][[url-the-excerpt]]
                                                                                                                                                                  [[label-widget-title]][[widget-title]][[priority-widget-title]][[url-widget-title]]
                                                                                                                                                                  [[label-widget-text]][[widget-text]][[priority-widget-text]][[url-widget-text]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-4]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/how-to-donate.html b/templates/dashboard/how-to-donate.html index 97c825b..74f737d 100644 --- a/templates/dashboard/how-to-donate.html +++ b/templates/dashboard/how-to-donate.html @@ -1,2 +1,2 @@ - \ No newline at end of file diff --git a/templates/dashboard/how-to-help.html b/templates/dashboard/how-to-help.html index ecb67a5..0250fc6 100644 --- a/templates/dashboard/how-to-help.html +++ b/templates/dashboard/how-to-help.html @@ -1,17 +1,17 @@ -
                                                                                                                                                                  - [[label-start]] [[start]] -
                                                                                                                                                                  - [[label-end]] [[end]] -
                                                                                                                                                                  - -
                                                                                                                                                                  - [[example-code]] -
                                                                                                                                                                  - [[example-string]] -
                                                                                                                                                                  - [[example]] -
                                                                                                                                                                  - -
                                                                                                                                                                  - [[information]] +
                                                                                                                                                                  + [[label-start]] [[start]] +
                                                                                                                                                                  + [[label-end]] [[end]] +
                                                                                                                                                                  + +
                                                                                                                                                                  + [[example-code]] +
                                                                                                                                                                  + [[example-string]] +
                                                                                                                                                                  + [[example]] +
                                                                                                                                                                  + +
                                                                                                                                                                  + [[information]]
                                                                                                                                                                  \ No newline at end of file diff --git a/templates/dashboard/manfisher.html b/templates/dashboard/manfisher.html index c1f88d0..1dc464b 100644 --- a/templates/dashboard/manfisher.html +++ b/templates/dashboard/manfisher.html @@ -1,11 +1,11 @@ -

                                                                                                                                                                  ManFisher

                                                                                                                                                                  - -
                                                                                                                                                                  -

                                                                                                                                                                  a note from the mastermind behind footnotes

                                                                                                                                                                  - -

                                                                                                                                                                  Ideology

                                                                                                                                                                  -

                                                                                                                                                                  You know WordPress is a great community effort and boatloads of people are involved and spending their spare time to freely (free as in money) contribute to WordPress as a platform or at the very core. Our aim as developers and those gravitating around developer's halos is to give back to the community with our own ideas which we think are great and well worth our whiles to put our own time into. For some of us, it would be a huge honour to serve the WordPress core developer team.

                                                                                                                                                                  - -

                                                                                                                                                                  the ManFisher menu

                                                                                                                                                                  -

                                                                                                                                                                  Will soon disappear as the company name changed and I believe it's overbearing to have that menu for such a simple function as footnotes

                                                                                                                                                                  +

                                                                                                                                                                  ManFisher

                                                                                                                                                                  + +
                                                                                                                                                                  +

                                                                                                                                                                  a note from the mastermind behind footnotes

                                                                                                                                                                  + +

                                                                                                                                                                  Ideology

                                                                                                                                                                  +

                                                                                                                                                                  You know WordPress is a great community effort and boatloads of people are involved and spending their spare time to freely (free as in money) contribute to WordPress as a platform or at the very core. Our aim as developers and those gravitating around developer's halos is to give back to the community with our own ideas which we think are great and well worth our whiles to put our own time into. For some of us, it would be a huge honour to serve the WordPress core developer team.

                                                                                                                                                                  + +

                                                                                                                                                                  the ManFisher menu

                                                                                                                                                                  +

                                                                                                                                                                  Will soon disappear as the company name changed and I believe it's overbearing to have that menu for such a simple function as footnotes

                                                                                                                                                                  \ No newline at end of file diff --git a/templates/dashboard/mouse-over-box-appearance.html b/templates/dashboard/mouse-over-box-appearance.html index 82aa401..3985b34 100644 --- a/templates/dashboard/mouse-over-box-appearance.html +++ b/templates/dashboard/mouse-over-box-appearance.html @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-font-size]][[font-size-enable]][[font-size-scalar]][[font-size-unit]] [[notice-font-size]]
                                                                                                                                                                  [[label-color]][[color]] [[notice-color]]
                                                                                                                                                                  [[label-background]][[background]] [[notice-background]]
                                                                                                                                                                  [[label-border-width]][[border-width]] [[notice-border-width]]
                                                                                                                                                                  [[label-border-color]][[border-color]] [[notice-border-color]]
                                                                                                                                                                  [[label-border-radius]][[border-radius]] [[notice-border-radius]]
                                                                                                                                                                  [[label-box-shadow-color]][[box-shadow-color]] [[notice-box-shadow-color]]
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-font-size]][[font-size-enable]][[font-size-scalar]][[font-size-unit]] [[notice-font-size]]
                                                                                                                                                                  [[label-color]][[color]] [[notice-color]]
                                                                                                                                                                  [[label-background]][[background]] [[notice-background]]
                                                                                                                                                                  [[label-border-width]][[border-width]] [[notice-border-width]]
                                                                                                                                                                  [[label-border-color]][[border-color]] [[notice-border-color]]
                                                                                                                                                                  [[label-border-radius]][[border-radius]] [[notice-border-radius]]
                                                                                                                                                                  [[label-box-shadow-color]][[box-shadow-color]] [[notice-box-shadow-color]]
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-dimensions.html b/templates/dashboard/mouse-over-box-dimensions.html index 3a14f80..d4f7be7 100644 --- a/templates/dashboard/mouse-over-box-dimensions.html +++ b/templates/dashboard/mouse-over-box-dimensions.html @@ -1,8 +1,8 @@ - - - - - - - -
                                                                                                                                                                  [[label-max-width]][[max-width]] [[width]] [[notice-max-width]]
                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                  [[label-max-width]][[max-width]] [[width]] [[notice-max-width]]
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-display.html b/templates/dashboard/mouse-over-box-display.html index c3968c2..dc42fc9 100644 --- a/templates/dashboard/mouse-over-box-display.html +++ b/templates/dashboard/mouse-over-box-display.html @@ -1,15 +1,15 @@ - - - - - - - - - - - -
                                                                                                                                                                  [[label-enable]][[enable]] [[notice-enable]]
                                                                                                                                                                  [[label-alternative]][[alternative]] [[notice-alternative]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-alternative]]

                                                                                                                                                                  -
                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                  [[label-enable]][[enable]] [[notice-enable]]
                                                                                                                                                                  [[label-alternative]][[alternative]] [[notice-alternative]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-alternative]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-position.html b/templates/dashboard/mouse-over-box-position.html index 705c55f..31769c9 100644 --- a/templates/dashboard/mouse-over-box-position.html +++ b/templates/dashboard/mouse-over-box-position.html @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-position]][[position]] [[position-alternative]] [[notice-position]]
                                                                                                                                                                  [[label-offset-x]][[offset-x]] [[offset-x-alternative]] [[notice-offset-x]]
                                                                                                                                                                  [[label-offset-y]][[offset-y]] [[offset-y-alternative]] [[notice-offset-y]]
                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-position]][[position]] [[position-alternative]] [[notice-position]]
                                                                                                                                                                  [[label-offset-x]][[offset-x]] [[offset-x-alternative]] [[notice-offset-x]]
                                                                                                                                                                  [[label-offset-y]][[offset-y]] [[offset-y-alternative]] [[notice-offset-y]]
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-text.html b/templates/dashboard/mouse-over-box-text.html index c09e133..5579edc 100644 --- a/templates/dashboard/mouse-over-box-text.html +++ b/templates/dashboard/mouse-over-box-text.html @@ -1,22 +1,22 @@ -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-delimiter]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-delimiter]][[delimiter]] [[notice-delimiter]]
                                                                                                                                                                  [[label-mirror]][[mirror]] [[notice-mirror]]
                                                                                                                                                                  [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-mirror]]

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-delimiter]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-delimiter]][[delimiter]] [[notice-delimiter]]
                                                                                                                                                                  [[label-mirror]][[mirror]] [[notice-mirror]]
                                                                                                                                                                  [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-mirror]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-timing.html b/templates/dashboard/mouse-over-box-timing.html index ecbdd79..e58759e 100644 --- a/templates/dashboard/mouse-over-box-timing.html +++ b/templates/dashboard/mouse-over-box-timing.html @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-fade-in-delay]][[fade-in-delay]] [[notice-fade-in-delay]]
                                                                                                                                                                  [[label-fade-in-duration]][[fade-in-duration]] [[notice-fade-in-duration]]
                                                                                                                                                                  [[label-fade-out-delay]][[fade-out-delay]] [[notice-fade-out-delay]]
                                                                                                                                                                  [[label-fade-out-duration]][[fade-out-duration]] [[notice-fade-out-duration]]
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-fade-in-delay]][[fade-in-delay]] [[notice-fade-in-delay]]
                                                                                                                                                                  [[label-fade-in-duration]][[fade-in-duration]] [[notice-fade-in-duration]]
                                                                                                                                                                  [[label-fade-out-delay]][[fade-out-delay]] [[notice-fade-out-delay]]
                                                                                                                                                                  [[label-fade-out-duration]][[fade-out-duration]] [[notice-fade-out-duration]]
                                                                                                                                                                  diff --git a/templates/dashboard/mouse-over-box-truncation.html b/templates/dashboard/mouse-over-box-truncation.html index bea6ed4..283c9a9 100644 --- a/templates/dashboard/mouse-over-box-truncation.html +++ b/templates/dashboard/mouse-over-box-truncation.html @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-truncation]][[truncation]]
                                                                                                                                                                  [[label-max-length]][[max-length]] [[notice-max-length]]
                                                                                                                                                                  [[label-readon]][[readon]]
                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-truncation]][[truncation]]
                                                                                                                                                                  [[label-max-length]][[max-length]] [[notice-max-length]]
                                                                                                                                                                  [[label-readon]][[readon]]
                                                                                                                                                                  diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 5e9e6df..91fc1e4 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -1,91 +1,91 @@ -
                                                                                                                                                                  -
                                                                                                                                                                  - - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  -

                                                                                                                                                                  - -

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - -
                                                                                                                                                                  -
                                                                                                                                                                  - [[last-updated-label]]: - -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - - - +
                                                                                                                                                                  +
                                                                                                                                                                  + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  +

                                                                                                                                                                  + +

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  + [[last-updated-label]]: + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + + diff --git a/templates/dashboard/settings-excerpts.html b/templates/dashboard/settings-excerpts.html index e1a316c..13424b6 100644 --- a/templates/dashboard/settings-excerpts.html +++ b/templates/dashboard/settings-excerpts.html @@ -1,11 +1,11 @@ - - - - - - - -
                                                                                                                                                                  [[label-excerpts]][[excerpts]] [[notice-excerpts]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-excerpts]]

                                                                                                                                                                  -
                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                  [[label-excerpts]][[excerpts]] [[notice-excerpts]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-excerpts]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/settings-love.html b/templates/dashboard/settings-love.html index 51c4a1b..0b06e62 100644 --- a/templates/dashboard/settings-love.html +++ b/templates/dashboard/settings-love.html @@ -1,12 +1,12 @@ - - - - - - - - - - - -
                                                                                                                                                                  [[label-love]][[love]]
                                                                                                                                                                  [[label-no-love]][[no-love]]
                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                  [[label-love]][[love]]
                                                                                                                                                                  [[label-no-love]][[no-love]]
                                                                                                                                                                  diff --git a/templates/dashboard/settings-numbering.html b/templates/dashboard/settings-numbering.html index bd772d2..75f29c3 100644 --- a/templates/dashboard/settings-numbering.html +++ b/templates/dashboard/settings-numbering.html @@ -1,15 +1,15 @@ - - - - - - - - - - - -
                                                                                                                                                                  [[label-counter-style]][[counter-style]]
                                                                                                                                                                  [[label-identical]][[identical]] [[notice-identical]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-identical]]

                                                                                                                                                                  -
                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                  [[label-counter-style]][[counter-style]]
                                                                                                                                                                  [[label-identical]][[identical]] [[notice-identical]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-identical]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/settings-reference-container.html b/templates/dashboard/settings-reference-container.html index 5bc7553..0de6a3b 100644 --- a/templates/dashboard/settings-reference-container.html +++ b/templates/dashboard/settings-reference-container.html @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-name]][[name]]
                                                                                                                                                                  [[label-element]][[element]]
                                                                                                                                                                  [[label-border]][[border]]
                                                                                                                                                                  [[label-collapse]][[collapse]]
                                                                                                                                                                  [[label-script]][[script]] [[notice-script]]
                                                                                                                                                                  [[label-position]][[position]] [[notice-position]]
                                                                                                                                                                  [[label-shortcode]][[shortcode]] [[notice-shortcode]]
                                                                                                                                                                  [[label-startpage]][[startpage]]
                                                                                                                                                                  [[label-margin-top]][[margin-top]] [[notice-margin-top]]
                                                                                                                                                                  [[label-margin-bottom]][[margin-bottom]] [[notice-margin-bottom]]
                                                                                                                                                                  [[label-page-layout]][[page-layout]] [[notice-page-layout]]
                                                                                                                                                                  [[label-url-wrap]][[url-wrap]] [[notice-url-wrap]]
                                                                                                                                                                  [[label-symbol]][[symbol-enable]] [[notice-symbol]]
                                                                                                                                                                  [[label-switch]][[switch]]
                                                                                                                                                                  [[label-3column]][[3column]] [[notice-3column]]
                                                                                                                                                                  [[label-row-borders]][[row-borders]]
                                                                                                                                                                  [[label-separator]] - [[separator-enable]] - [[separator-options]] - [[separator-custom]] - [[notice-separator]] -
                                                                                                                                                                  [[label-terminator]] - [[terminator-enable]] - [[terminator-options]] - [[terminator-custom]] - [[notice-terminator]] -
                                                                                                                                                                  [[label-width]] - [[width-enable]] - [[width-scalar]] - [[width-unit]] - [[notice-width]] -
                                                                                                                                                                  [[label-max-width]] - [[max-width-enable]] - [[max-width-scalar]] - [[max-width-unit]] - [[notice-max-width]] -
                                                                                                                                                                  [[label-line-break]][[line-break]] - [[notice-line-break]] -
                                                                                                                                                                  [[label-link]][[link]] [[notice-link]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-link]]

                                                                                                                                                                  -
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-name]][[name]]
                                                                                                                                                                  [[label-element]][[element]]
                                                                                                                                                                  [[label-border]][[border]]
                                                                                                                                                                  [[label-collapse]][[collapse]]
                                                                                                                                                                  [[label-script]][[script]] [[notice-script]]
                                                                                                                                                                  [[label-position]][[position]] [[notice-position]]
                                                                                                                                                                  [[label-shortcode]][[shortcode]] [[notice-shortcode]]
                                                                                                                                                                  [[label-startpage]][[startpage]]
                                                                                                                                                                  [[label-margin-top]][[margin-top]] [[notice-margin-top]]
                                                                                                                                                                  [[label-margin-bottom]][[margin-bottom]] [[notice-margin-bottom]]
                                                                                                                                                                  [[label-page-layout]][[page-layout]] [[notice-page-layout]]
                                                                                                                                                                  [[label-url-wrap]][[url-wrap]] [[notice-url-wrap]]
                                                                                                                                                                  [[label-symbol]][[symbol-enable]] [[notice-symbol]]
                                                                                                                                                                  [[label-switch]][[switch]]
                                                                                                                                                                  [[label-3column]][[3column]] [[notice-3column]]
                                                                                                                                                                  [[label-row-borders]][[row-borders]]
                                                                                                                                                                  [[label-separator]] + [[separator-enable]] + [[separator-options]] + [[separator-custom]] + [[notice-separator]] +
                                                                                                                                                                  [[label-terminator]] + [[terminator-enable]] + [[terminator-options]] + [[terminator-custom]] + [[notice-terminator]] +
                                                                                                                                                                  [[label-width]] + [[width-enable]] + [[width-scalar]] + [[width-unit]] + [[notice-width]] +
                                                                                                                                                                  [[label-max-width]] + [[max-width-enable]] + [[max-width-scalar]] + [[max-width-unit]] + [[notice-max-width]] +
                                                                                                                                                                  [[label-line-break]][[line-break]] + [[notice-line-break]] +
                                                                                                                                                                  [[label-link]][[link]] [[notice-link]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-link]]

                                                                                                                                                                  +
                                                                                                                                                                  diff --git a/templates/dashboard/settings-scrolling.html b/templates/dashboard/settings-scrolling.html index 743bdcd..32c792d 100644 --- a/templates/dashboard/settings-scrolling.html +++ b/templates/dashboard/settings-scrolling.html @@ -1,36 +1,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                  [[label-scroll-offset]][[scroll-offset]] [[notice-scroll-offset]]
                                                                                                                                                                  [[label-scroll-duration]][[scroll-duration]] [[notice-scroll-duration]]
                                                                                                                                                                  [[label-hard-links]][[hard-links]] [[notice-hard-links]]
                                                                                                                                                                  [[label-footnote]][[footnote]] [[notice-footnote]]
                                                                                                                                                                  [[label-referrer]][[referrer]] [[notice-referrer]]
                                                                                                                                                                  [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                  [[label-backlink-tooltips]][[backlink-tooltips]] [[notice-backlink-tooltips]]
                                                                                                                                                                  [[label-backlink-tooltip-text]][[backlink-tooltip-text]] [[notice-backlink-tooltip-text]]
                                                                                                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                  [[label-scroll-offset]][[scroll-offset]] [[notice-scroll-offset]]
                                                                                                                                                                  [[label-scroll-duration]][[scroll-duration]] [[notice-scroll-duration]]
                                                                                                                                                                  [[label-hard-links]][[hard-links]] [[notice-hard-links]]
                                                                                                                                                                  [[label-footnote]][[footnote]] [[notice-footnote]]
                                                                                                                                                                  [[label-referrer]][[referrer]] [[notice-referrer]]
                                                                                                                                                                  [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                  [[label-backlink-tooltips]][[backlink-tooltips]] [[notice-backlink-tooltips]]
                                                                                                                                                                  [[label-backlink-tooltip-text]][[backlink-tooltip-text]] [[notice-backlink-tooltip-text]]
                                                                                                                                                                  diff --git a/templates/dashboard/settings-start-end.html b/templates/dashboard/settings-start-end.html index 633b8df..cf3744a 100644 --- a/templates/dashboard/settings-start-end.html +++ b/templates/dashboard/settings-start-end.html @@ -1,63 +1,63 @@ -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-escapement]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - - - - - -
                                                                                                                                                                  [[label-short-code-start]] - [[short-code-start]] - [[short-code-start-user]] -
                                                                                                                                                                  [[label-short-code-end]] - [[short-code-end]] - [[short-code-end-user]] -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-parentheses]]

                                                                                                                                                                  -
                                                                                                                                                                  - - - - - - - -
                                                                                                                                                                  [[label-syntax]][[syntax]] [[notice-syntax]]
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  [[description-syntax]]

                                                                                                                                                                  -
                                                                                                                                                                  - +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-escapement]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + + + + + +
                                                                                                                                                                  [[label-short-code-start]] + [[short-code-start]] + [[short-code-start-user]] +
                                                                                                                                                                  [[label-short-code-end]] + [[short-code-end]] + [[short-code-end-user]] +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-parentheses]]

                                                                                                                                                                  +
                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                  [[label-syntax]][[syntax]] [[notice-syntax]]
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  [[description-syntax]]

                                                                                                                                                                  +
                                                                                                                                                                  + diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index 50c5c2b..cb400de 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -1,24 +1,24 @@ - -<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - ><[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_plugin_tooltip_text" - >[[before]][[index]][[after]][[anchor-element]] + +<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + ><[[sup-span]] + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_plugin_tooltip_text" + >[[before]][[index]][[after]][[anchor-element]] diff --git a/templates/public/footnote.html b/templates/public/footnote.html index 0f0b2d9..10b884c 100755 --- a/templates/public/footnote.html +++ b/templates/public/footnote.html @@ -1,20 +1,20 @@ - -<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - ><[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_plugin_tooltip_text" - >[[before]][[index]][[after]][[anchor-element]][[text]] + +<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + ><[[sup-span]] + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_plugin_tooltip_text" + >[[before]][[index]][[after]][[anchor-element]][[text]] diff --git a/templates/public/js-reference-container.html b/templates/public/js-reference-container.html index d1ec848..2fdc2b9 100644 --- a/templates/public/js-reference-container.html +++ b/templates/public/js-reference-container.html @@ -1,88 +1,88 @@ - -
                                                                                                                                                                  -
                                                                                                                                                                  <[[element]] - >[[name]][+]
                                                                                                                                                                  -
                                                                                                                                                                  - - - [[content]] - -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - + +
                                                                                                                                                                  +
                                                                                                                                                                  <[[element]] + >[[name]][+]
                                                                                                                                                                  +
                                                                                                                                                                  + + + [[content]] + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + diff --git a/templates/public/reference-container-body-3column.html b/templates/public/reference-container-body-3column.html index 2d5613f..1a750f7 100644 --- a/templates/public/reference-container-body-3column.html +++ b/templates/public/reference-container-body-3column.html @@ -1,29 +1,29 @@ - -
                                                                                                                                                                  <[[link-span]] - id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_index" - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - >[[index]][[terminator]][[anchor-element]]<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" - class="footnote_backlink" - [[hard-link]] - >[[arrow]][[text]]
                                                                                                                                                                  <[[link-span]] + id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_index" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + >[[index]][[terminator]][[anchor-element]]<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" + class="footnote_backlink" + [[hard-link]] + >[[arrow]][[text]]
                                                                                                                                                                  [[backlinks]][[text]]
                                                                                                                                                                  [[backlinks]][[text]]
                                                                                                                                                                  <[[link-span]] - class="footnote_plugin_link" - [[hard-link]] - >[[index]][[terminator]][[arrow]][[anchor-element]][[text]]
                                                                                                                                                                  <[[link-span]] + class="footnote_plugin_link" + [[hard-link]] + >[[index]][[terminator]][[arrow]][[anchor-element]][[text]]
                                                                                                                                                                  <[[link-span]] - class="footnote_plugin_link" - [[hard-link]] - >[[arrow]][[index]][[terminator]][[anchor-element]][[text]]
                                                                                                                                                                  <[[link-span]] + class="footnote_plugin_link" + [[hard-link]] + >[[arrow]][[index]][[terminator]][[anchor-element]][[text]]
                                                                                                                                                                  - - [[content]] - -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - + +
                                                                                                                                                                  +
                                                                                                                                                                  <[[element]] + >[[name]][+]
                                                                                                                                                                  +
                                                                                                                                                                  + + + [[content]] + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + diff --git a/templates/public/tooltip.html b/templates/public/tooltip.html index eab35b8..deefba3 100644 --- a/templates/public/tooltip.html +++ b/templates/public/tooltip.html @@ -1,18 +1,18 @@ - - + + From 9a8e7c0851226992699dac3c0a343191c89d856b Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:44:18 +0000 Subject: [PATCH 020/144] Update codebase to be WP Coding Standard-compliant. This is a squashed copy of `wp-coding-standard--rebase` to try and fix the line-ending diff issue we're having. --- .gitignore | 3 + README.md | 5 +- _tools/setup.sh | 4 + class/config.php | 23 +- class/convert.php | 238 ++- class/hooks.php | 70 +- class/init.php | 220 ++- class/language.php | 35 +- class/settings.php | 731 +++++----- class/task.php | 1840 +++++++++++++----------- class/template.php | 193 ++- class/widgets/base.php | 47 +- class/widgets/reference-container.php | 49 +- class/wysiwyg.php | 72 +- composer.json | 11 + contrib/pre-commit | 61 + footnotes.php | 43 +- includes.php | 37 +- readme.txt | 6 +- templates/dashboard/other-plugins.html | 2 +- 20 files changed, 1880 insertions(+), 1810 deletions(-) create mode 100644 _tools/setup.sh create mode 100644 composer.json create mode 100644 contrib/pre-commit diff --git a/.gitignore b/.gitignore index 7fdc234..b6fe4af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .phpdoc/ +vendor/ + +*.bak diff --git a/README.md b/README.md index 40216d0..375cb0c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) + - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) @@ -25,8 +26,8 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) 1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` ## Updating Documentation diff --git a/_tools/setup.sh b/_tools/setup.sh new file mode 100644 index 0000000..fd4c786 --- /dev/null +++ b/_tools/setup.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cp contrib/pre-commit .git/hooks/pre-commit +chmod +x .git/hooks/pre-commit diff --git a/class/config.php b/class/config.php index 98a3245..4025584 100644 --- a/class/config.php +++ b/class/config.php @@ -1,51 +1,46 @@ -foot
                                                                                                                                                                  '; /** * Public Plugin name for dashboard heading - * + * * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * in WPv5.5 being torn apart as if the headline was text-align:justify and not * the last line. That ugly display bug badly affected the plugin’s communication. * The only working solution found so far is using position:fixed in one heading * that isn’t translated, and dropping the logo in another, translatable heading. @@ -58,7 +53,6 @@ class MCI_Footnotes_Config { /** * Html tag for the LOVE symbol. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ @@ -75,7 +69,6 @@ class MCI_Footnotes_Config { /** * Short code to DON'T display the 'LOVE ME' slug on certain pages. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ diff --git a/class/convert.php b/class/convert.php index e1823ad..5847d03 100644 --- a/class/convert.php +++ b/class/convert.php @@ -3,20 +3,18 @@ * Includes the Convert Class. * * @filesource - * @author Stefan Herndler + * @package footnotes * @since 1.5.0 12.09.14 10:56 - * + * * Edited: * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 - * + * * Last modified: 2020-12-12T1541+0100 */ - /** * Converts data types and Footnotes specific values. * - * @author Stefan Herndler * @since 1.5.0 */ class MCI_Footnotes_Convert { @@ -24,30 +22,29 @@ class MCI_Footnotes_Convert { /** * Converts a integer into the user-defined counter style for the footnotes. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index to be converted. - * @param string $p_str_ConvertStyle Style of the new/converted Index. + * @param int $p_int_index Index to be converted. + * @param string $p_str_convert_style Style of the new/converted Index. * @return string Converted Index as string in the defined counter style. - * + * * Edited: * @since 2.2.0 lowercase Roman numerals supported */ - public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") { - switch ($p_str_ConvertStyle) { - case "romanic": - return self::toRomanic($p_int_Index, true); - case "roman_low": - return self::toRomanic($p_int_Index, false); - case "latin_high": - return self::toLatin($p_int_Index, true); - case "latin_low": - return self::toLatin($p_int_Index, false); - case "arabic_leading": - return self::toArabicLeading($p_int_Index); - case "arabic_plain": + public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) { + switch ( $p_str_convert_style ) { + case 'romanic': + return self::to_romanic( $p_int_index, true ); + case 'roman_low': + return self::to_romanic( $p_int_index, false ); + case 'latin_high': + return self::to_latin( $p_int_index, true ); + case 'latin_low': + return self::to_latin( $p_int_index, false ); + case 'arabic_leading': + return self::to_arabic_leading( $p_int_index ); + case 'arabic_plain': default: - return $p_int_Index; + return $p_int_index; } } @@ -55,175 +52,174 @@ class MCI_Footnotes_Convert { * Converts an integer into latin ascii characters, either lower or upper-case. * Function available from A to ZZ ( means 676 footnotes at 1 page possible). * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @param bool $p_bool_UpperCase True to convert the value to upper case letter, otherwise to lower case. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case True to convert the value to upper case letter, otherwise to lower case. * @return string */ - private static function toLatin($p_int_Value, $p_bool_UpperCase) { - // output string - $l_str_Return = ""; - $l_int_Offset = 0; - // check if the value is higher then 26 = Z - while ($p_int_Value > 26) { - // increase offset and reduce counter - $l_int_Offset++; - $p_int_Value -= 26; + private static function to_latin( $p_int_value, $p_bool_upper_case ) { + // Output string. + $l_str_return = ''; + $l_int_offset = 0; + // Check if the value is higher then 26 = Z. + while ( $p_int_value > 26 ) { + // Increase offset and reduce counter. + $l_int_offset++; + $p_int_value -= 26; } - // if offset set (more then Z), then add a new letter in front - if ($l_int_Offset > 0) { - $l_str_Return = chr($l_int_Offset + 64); + // If offset set (more then Z), then add a new letter in front. + if ( $l_int_offset > 0 ) { + $l_str_return = chr( $l_int_offset + 64 ); } - // add the origin letter - $l_str_Return .= chr($p_int_Value + 64); - // return the latin character representing the integer - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Add the origin letter. + $l_str_return .= chr( $p_int_value + 64 ); + // Return the latin character representing the integer. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts an integer to a leading-0 integer. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. * @return string Value with a leading zero. */ - private static function toArabicLeading($p_int_Value) { - // add a leading 0 if number lower then 10 - if ($p_int_Value < 10) { - return "0" . $p_int_Value; + private static function to_arabic_leading( $p_int_value ) { + // Add a leading 0 if number lower then 10. + if ( $p_int_value < 10 ) { + return '0' . $p_int_value; } - return $p_int_Value; + return $p_int_value; } /** * Converts an integer to a romanic letter. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case Whether to uppercase. * @return string - * + * * Edited: * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 */ - private static function toRomanic($p_int_Value, $p_bool_UpperCase) { - // table containing all necessary romanic letters - $l_arr_RomanicLetters = array( - 'M' => 1000, + private static function to_romanic( $p_int_value, $p_bool_upper_case ) { + // Table containing all necessary romanic letters. + $l_arr_romanic_letters = array( + 'M' => 1000, 'CM' => 900, - 'D' => 500, + 'D' => 500, 'CD' => 400, - 'C' => 100, + 'C' => 100, 'XC' => 90, - 'L' => 50, + 'L' => 50, 'XL' => 40, - 'X' => 10, + 'X' => 10, 'IX' => 9, - 'V' => 5, + 'V' => 5, 'IV' => 4, - 'I' => 1 + 'I' => 1, ); - // return value - $l_str_Return = ''; - // iterate through integer value until it is reduced to 0 - while ($p_int_Value > 0) { - foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { - if ($p_int_Value >= $l_int_Arabic) { - $p_int_Value -= $l_int_Arabic; - $l_str_Return .= $l_str_Romanic; + // Return value. + $l_str_return = ''; + // Iterate through integer value until it is reduced to 0. + while ( $p_int_value > 0 ) { + foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) { + if ( $p_int_value >= $l_int_arabic ) { + $p_int_value -= $l_int_arabic; + $l_str_return .= $l_str_romanic; break; } } } - // return romanic letters as string - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Return romanic letters as string. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts a string depending on its value to a boolean. * - * @author Stefan Herndler * @since 1.0-beta - * @param string $p_str_Value String to be converted to boolean. + * @param string $p_str_value String to be converted to boolean. * @return bool Boolean representing the string. */ - public static function toBool($p_str_Value) { - // convert string to lower-case to make it easier - $p_str_Value = strtolower($p_str_Value); - // check if string seems to contain a "true" value - switch ($p_str_Value) { - case "checked": - case "yes": - case "true": - case "on": - case "1": + public static function to_bool( $p_str_value ) { + // Convert string to lower-case to make it easier. + $p_str_value = strtolower( $p_str_value ); + // Check if string seems to contain a "true" value. + switch ( $p_str_value ) { + case 'checked': + case 'yes': + case 'true': + case 'on': + case '1': return true; } - // nothing found that says "true", so we return false + // Nothing found that says "true", so we return false. return false; } /** * Get a html Array short code depending on Arrow-Array key index. * - * @author Stefan Herndler * @since 1.3.2 - * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. + * @param int $p_int_index Index representing the Arrow. If empty all Arrows are specified. * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. */ - public static function getArrow($p_int_Index = -1) { - // define all possible arrows - $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); - // convert index to an integer - if (!is_int($p_int_Index)) { - $p_int_Index = intval($p_int_Index); + public static function get_arrow( $p_int_index = -1 ) { + // Define all possible arrows. + $l_arr_arrows = array( '↑', '↥', '↟', '↩', '↲', '↵', '⇑', '⇡', '⇧', '↑' ); + // Convert index to an integer. + if ( ! is_int( $p_int_index ) ) { + $p_int_index = intval( $p_int_index ); } - // return the whole arrow array - if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { - return $l_arr_Arrows; + // Return the whole arrow array. + if ( $p_int_index < 0 || $p_int_index > count( $l_arr_arrows ) ) { + return $l_arr_arrows; } - // return a single arrow - return $l_arr_Arrows[$p_int_Index]; + // Return a single arrow. + return $l_arr_arrows[ $p_int_index ]; } + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r /** * Displays a Variable. * - * @author Stefan Herndler * @since 1.5.0 - * @param mixed $p_mixed_Value + * @param mixed $p_mixed_value The variable to display. + * @return void */ - public static function debug($p_mixed_Value) { - if (empty($p_mixed_Value)) { - var_dump($p_mixed_Value); + public static function debug( $p_mixed_value ) { + if ( empty( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_array($p_mixed_Value)) { - printf("
                                                                                                                                                                  ");
                                                                                                                                                                  -			print_r($p_mixed_Value);
                                                                                                                                                                  -			printf("
                                                                                                                                                                  "); + } elseif ( is_array( $p_mixed_value ) ) { + printf( '
                                                                                                                                                                  ' );
                                                                                                                                                                  +			print_r( $p_mixed_value );
                                                                                                                                                                  +			printf( '
                                                                                                                                                                  ' ); - } else if (is_object($p_mixed_Value)) { - printf("
                                                                                                                                                                  ");
                                                                                                                                                                  -			print_r($p_mixed_Value);
                                                                                                                                                                  -			printf("
                                                                                                                                                                  "); + } elseif ( is_object( $p_mixed_value ) ) { + printf( '
                                                                                                                                                                  ' );
                                                                                                                                                                  +			print_r( $p_mixed_value );
                                                                                                                                                                  +			printf( '
                                                                                                                                                                  ' ); - } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_numeric( $p_mixed_value ) || is_int( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_date($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_date( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); } else { - var_dump($p_mixed_Value); + var_dump( $p_mixed_value ); } - echo "
                                                                                                                                                                  "; + echo '
                                                                                                                                                                  '; } + // phpcs:disable } diff --git a/class/hooks.php b/class/hooks.php index e86d106..8a0a42a 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,11 +1,11 @@ -ClearAll(); } /** * Add Links to the Plugin in the "installed Plugins" page. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Links Current Links. - * @param string $p_str_PluginFileName Plugins init file name. + * @param array $p_arr_links Current Links. + * @param string $p_str_plugin_file_name Plugins init file name. * @return array */ - public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { - // append link to the WordPress Plugin page - $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the Settings page - $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the PlayPal Donate function - $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // return new links - return $p_arr_Links; + public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { + // Append link to the WordPress Plugin page. + $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); + // Append link to the settings page. + $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); + // Append link to the PayPal donate function. + $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); + // Return new links. + return $p_arr_links; } } diff --git a/class/init.php b/class/init.php index e1001a3..d21ca5a 100644 --- a/class/init.php +++ b/class/init.php @@ -1,12 +1,11 @@ -initializeDashboard(); - // initialize the Plugin Task - $this->initializeTask(); + // Initialize the Plugin Dashboard. + $this->initialize_dashboard(); + // Initialize the Plugin Task. + $this->initialize_task(); - // Register all Public Stylesheets and Scripts - add_action('init', array($this, 'registerPublic')); - // Enqueue all Public Stylesheets and Scripts - add_action('wp_enqueue_scripts', array($this, 'registerPublic')); - // Register all Widgets of the Plugin. - add_action('widgets_init', array($this, 'initializeWidgets')); + // Register all Public Stylesheets and Scripts. + add_action( 'init', array( $this, 'register_public' ) ); + // Enqueue all Public Stylesheets and Scripts. + add_action( 'wp_enqueue_scripts', array( $this, 'register_public' ) ); + // Register all Widgets of the Plugin.. + add_action( 'widgets_init', array( $this, 'initialize_widgets' ) ); } /** * Initializes all Widgets of the Plugin. * - * @author Stefan Herndler * @since 1.5.0 * * @@ -129,37 +125,34 @@ class MCI_Footnotes { * and use the bare register_widget() here. * @see self::run() * - * Also, the visibility of initializeWidgets() is not private any longer. + * Also, the visibility of initialize_widgets() is not private any longer. */ - public function initializeWidgets() { - register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); + public function initialize_widgets() { + register_widget( 'MCI_Footnotes_Widget_Reference_container' ); } /** * Initializes the Dashboard of the Plugin and loads them. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeDashboard() { + private function initialize_dashboard() { new MCI_Footnotes_Layout_Init(); } /** * Initializes the Plugin Task and registers the Task hooks. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeTask() { - $this->a_obj_Task = new MCI_Footnotes_Task(); - $this->a_obj_Task->registerHooks(); + private function initialize_task() { + $this->a_obj_task = new MCI_Footnotes_Task(); + $this->a_obj_task->register_hooks(); } /** * Registers and enqueues scripts and stylesheets to the public pages. * - * @author Stefan Herndler * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. @@ -168,7 +161,7 @@ class MCI_Footnotes { * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ - public function registerPublic() { + public function register_public() { /** * Enqueues external scripts. @@ -181,10 +174,10 @@ class MCI_Footnotes { * * The condition about tooltips was missing, only the not-alternative-tooltips part was present. */ - // set conditions re-used for stylesheet enqueuing: - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + // Set conditions re-used for stylesheet enqueuing. + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); /** * Enqueues the jQuery library registered by WordPress. @@ -195,64 +188,42 @@ class MCI_Footnotes { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * jQuery is also used for animated scrolling, so it was loaded by default. * The function wp_enqueue_script() avoids loading the same library multiple times. * After adding the alternative reference container, jQuery has become optional, * but still enabled by default. */ - if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { - + if ( 'jquery' === $l_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) { + wp_enqueue_script( 'jquery' ); - + } - if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { /** * Enqueues the jQuery Tools library shipped with the plugin. * - * redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js - * added versioning 2020-11-18T2150+0100 - * not use '-js' in the handle, is appended automatically + * Redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js. + * + * Add versioning. + * @since 2.1.2 + * @date 2020-11-18T2150+0100 + * + * No '-js' in the handle, is appended automatically. + * + * Deferring to the footer breaks jQuery tooltip display. + * @date 2021-02-23T1105+0100 */ wp_enqueue_script( 'mci-footnotes-jquery-tools', - plugins_url('footnotes/js/jquery.tools.min.js'), + plugins_url( 'footnotes/js/jquery.tools.min.js' ), array(), - '1.2.7.redacted.2' + '1.2.7.redacted.2', ); - /** - * Registers jQuery UI from the JavaScript Content Delivery Network. - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * Used to add jQuery UI following @vonpiernik: - * : - * - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. - * - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * This was enabled in Footnotes v2.0.0 through v2.0.3. - * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 - */ - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 - //wp_enqueue_script( 'jQueryUI' ); - /** - * This is then needed instead of the above first instance: - * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 - */ - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - /** * Enqueues some jQuery UI libraries registered by WordPress. * @@ -308,34 +279,43 @@ class MCI_Footnotes { * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. */ - // set tooltip mode for use in stylesheet name: - if ( self::$a_bool_TooltipsEnabled ) { - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - $l_str_TooltipMode = 'al'; - $l_str_TComplement = 'ternative-tooltips'; + // Set tooltip mode for use in stylesheet name. + if ( self::$a_bool_tooltips_enabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_str_tooltip_mode = 'al'; + $l_str_tcomplement = 'ternative-tooltips'; } else { - $l_str_TooltipMode = 'jq'; - $l_str_TComplement = 'uery-tooltips'; + $l_str_tooltip_mode = 'jq'; + $l_str_tcomplement = 'uery-tooltips'; } } else { - $l_str_TooltipMode = 'no'; - $l_str_TComplement = '-tooltips'; + $l_str_tooltip_mode = 'no'; + $l_str_tcomplement = '-tooltips'; } - // set basic responsive page layout mode for use in stylesheet name: - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - switch ( $l_str_PageLayoutOption ) { - case "reference-container": $l_str_LayoutMode = '1'; break; - case "entry-content" : $l_str_LayoutMode = '2'; break; - case "main-content" : $l_str_LayoutMode = '3'; break; - case "none": default: $l_str_LayoutMode = '0'; break; + // Set basic responsive page layout mode for use in stylesheet name. + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + switch ( $l_str_page_layout_option ) { + case 'reference-container': + $l_str_layout_mode = '1'; + break; + case 'entry-content': + $l_str_layout_mode = '2'; + break; + case 'main-content': + $l_str_layout_mode = '3'; + break; + case 'none': + default: + $l_str_layout_mode = '0'; + break; } - // enqueue the tailored united minified stylesheet: + // Enqueue the tailored united minified stylesheet. wp_enqueue_style( - 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, + 'mci-footnotes-' . $l_str_tooltip_mode . $l_str_tcomplement . '-pagelayout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, @@ -356,12 +336,12 @@ class MCI_Footnotes { wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_PageLayoutOption != 'none') { + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + if ( 'none' !== $l_str_page_layout_option ) { wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + 'mci-footnotes-layout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' ), array(), C_STR_FOOTNOTES_VERSION, diff --git a/class/language.php b/class/language.php index fccf143..cb6b750 100644 --- a/class/language.php +++ b/class/language.php @@ -1,12 +1,11 @@ - array( + 'footnotes_storage' => array( - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_STR_FOOTNOTES_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_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + 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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - // 2.5.4 fast-tracked: - self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + // 2.5.4 fast-tracked. + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - self::C_STR_REFERENCE_CONTAINER_NAME => 'References', - self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', - self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no', - self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', + 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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + 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', - // whether to enqueue additional stylesheet: - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // Whether to enqueue additional stylesheet. + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - // top and bottom margins: - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // Top and bottom margins. + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - // table cell borders: - self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // Table cell borders. + self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - // backlink symbol: - self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // Backlink symbol. + self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - // backlink separators and terminators are often not preferred. - // but a choice must be provided along with the ability to customize: - self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', - self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // Backlink separators and terminators are often not preferred.. + // But a choice must be provided along with the ability to customize. + 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 => '', - // set backlinks column width: - self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // Set backlinks column width. + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - // set backlinks column max. width: - self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // Set backlinks column max. width. + 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', - // whether a
                                                                                                                                                                  tag is inserted: - self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // Whether a
                                                                                                                                                                  tag is inserted. + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - // whether to enable URL line wrapping: - self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // Whether to enable URL line wrapping. + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - // whether to use link elements: - self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // Whether to use link elements. + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', - // excerpt should be disabled: - self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + // Excerpt should be disabled. + self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', - self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', - self::C_STR_FOOTNOTES_LOVE => 'no', + self::C_STR_FOOTNOTES_LOVE => 'no', ), - "footnotes_storage_custom" => array( + 'footnotes_storage_custom' => array( - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - // 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: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // The truncation length is raised from 150 to 200 chars. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - // 2.5.4 fast-tracked: - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', - self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 2.5.4 fast-tracked. + 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 => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - // 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: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover. + // The current line of text (web coordinates origin is top left). + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // The width should be limited to start with, for the box to have shape. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + // Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - // tooltip display durations: - // called mouse over box not tooltip for consistency - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // Tooltip display durations. + // Called mouse over box not tooltip for consistency. + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - // tooltip font size reset to legacy by default since 2.1.4; - // was set to inherit since 2.1.1 as it overrode custom CSS, - // is moved to settings since 2.1.4 2020-12-04T1023+0100 - self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', - self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + // Tooltip font size reset to legacy by default since 2.1.4;. + // Was set to inherit since 2.1.1 as it overrode custom CSS,. + // Is moved to settings since 2.1.4 2020-12-04T1023+0100. + self::C_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', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background. + // By default, due to diverging user preferences. White is neutral. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - 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_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + // The mouse over box corners mustn’t be rounded as that is outdated. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - // Custom CSS migrates to a dedicated tab: - self::C_STR_CUSTOM_CSS => '', + // Custom CSS migrates to a dedicated tab. + self::C_STR_CUSTOM_CSS => '', ), - "footnotes_storage_expert" => array( + 'footnotes_storage_expert' => array( - // These are checkboxes; keyword 'checked' is converted to Boolean true, - // empty string to false (default): + // These are checkboxes; keyword 'checked' is converted to Boolean true,. + // Empty string to false (default). - // Titles should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. - // See - // Yet in titles, footnotes are still buggy, because WordPress - // uses the title string in menus and in the title element. - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + // Titles should all be enabled by default to prevent users from. + // Thinking at first that the feature is broken in post titles.. + // See . + // Yet in titles, footnotes are still buggy, because WordPress. + // Uses the title string in menus and in the title element.. + self::C_STR_EXPERT_LOOKUP_THE_TITLE => '', - self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked', - // And the_excerpt is disabled by default following @nikelaos in - // - // - self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + // And the_excerpt is disabled by default following @nikelaos in. + // . + // . + self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '', - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '', - // 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. - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // 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.. + self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '', - // initially hard-coded default - // shows "9223372036854780000" instead of 9223372036854775807 in the numbox - // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: - // - // interpret -1 as PHP_INT_MAX instead - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // Initially hard-coded default. + // Shows "9223372036854780000" instead of 9223372036854775807 in the numbox. + // Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty. + // . + // Interpret -1 as PHP_INT_MAX instead. + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // 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. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + // 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.. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), - "footnotes_storage_custom_css" => array( + 'footnotes_storage_custom_css' => array( - self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', ), @@ -1074,130 +1033,123 @@ class MCI_Footnotes_Settings { /** * Contains all Settings from each Settings container as soon as this class is initialized. * - * @author Stefan Herndler * @since 1.5.0 * @var array */ - private $a_arr_Settings = array(); + private $a_arr_settings = array(); /** * Class Constructor. Loads all Settings from each WordPress Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ private function __construct() { - $this->loadAll(); + $this->load_all(); } /** * Returns a singleton of this class. * - * @author Stefan Herndler * @since 1.5.0 * @return MCI_Footnotes_Settings */ public static function instance() { - // no instance defined yet, load it - if (self::$a_obj_Instance === null) { - self::$a_obj_Instance = new self(); + // No instance defined yet, load it. + if ( ! self::$a_obj_instance ) { + self::$a_obj_instance = new self(); } - // return a singleton of this class - return self::$a_obj_Instance; + // Return a singleton of this class. + return self::$a_obj_instance; } /** * Returns the name of a specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return str Settings Container name. */ - public function getContainer($p_int_Index) { - return $this->a_arr_Container[$p_int_Index]; + public function get_container( $p_int_index ) { + return $this->a_arr_container[ $p_int_index ]; } /** * Returns the default values of a specific Settings Container. * - * @author Stefan Herndler * @since 1.5.6 - * @param int $p_int_Index Settings Container Aray Key Index. + * @param int $p_int_index Settings Container Aray Key Index. * @return array */ - public function getDefaults($p_int_Index) { - return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; + public function get_defaults( $p_int_index ) { + return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ]; } /** * Loads all Settings from each Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ - private function loadAll() { - // clear current settings - $this->a_arr_Settings = array(); - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // load settings - $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); + 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 ) ); } } /** * Loads all Settings from specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). * * @since ditched trimming whitespace from text box content in response to user request. * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 */ - private function Load($p_int_Index) { - // load all settings from container - $l_arr_Options = get_option($this->getContainer($p_int_Index)); - // load all default settings - $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; + 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 ) ]; - // no settings found, set them to their default value - if (empty($l_arr_Options)) { - return $l_arr_Default; + // No settings found, set them to their default value. + if ( empty( $l_arr_options ) ) { + return $l_arr_default; } - // 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; + // 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; } } - // iterate through each setting in the container - foreach($l_arr_Options as $l_str_Key => $l_str_Value) { - // remove all whitespace at the beginning and end of a setting - // trimming whitespace is ditched: - //$l_str_Value = trim($l_str_Value); - // write the sanitized value back to the setting container - $l_arr_Options[$l_str_Key] = $l_str_Value; + // Iterate through each setting in the container. + foreach ( $l_arr_options as $l_str_key => $l_str_value ) { + // Remove all whitespace at the beginning and end of a setting. + // Trimming whitespace is ditched. + // $l_str_value = trim($l_str_value);. + // Write the sanitized value back to the setting container. + $l_arr_options[ $l_str_key ] = $l_str_value; } - // return settings loaded from Container - return $l_arr_Options; + // Return settings loaded from Container. + return $l_arr_options; } /** * Updates a whole Settings container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index of the Settings container. - * @param array $p_arr_newValues new Settings. + * @param int $p_int_index Index of the Settings container. + * @param array $p_arr_new_values new Settings. * @return bool */ - public function saveOptions($p_int_Index, $p_arr_newValues) { - if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { - $this->loadAll(); + 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(); return true; } return false; @@ -1206,19 +1158,17 @@ class MCI_Footnotes_Settings { /** * Returns the value of specified Settings name. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Key Settings Array Key name. + * @param string $p_str_key Settings Array Key name. * @return mixed Value of the Setting on Success or Null in Settings name is invalid. */ - 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; + 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; } /** * Deletes each Settings Container and loads the default values for each Settings Container. * - * @author Stefan Herndler * @since 1.5.0 * * Edit: This didn’t actually work. @@ -1227,27 +1177,28 @@ class MCI_Footnotes_Settings { * done by deleting and reinstalling (see the warning about database backup). * 2020-12-13T1353+0100 */ - public function ClearAll() { - // iterate through each Settings Container - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // delete the settings container - delete_option($this->getContainer($i)); + 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 ) ); } - // set settings back to the default values - $this->a_arr_Settings = $this->a_arr_Default; + // Set settings back to the default values. + $this->a_arr_settings = $this->a_arr_default; } /** * Register all Settings Container for the Plugin Settings Page in the Dashboard. * Settings Container Label will be the same as the Settings Container Name. * - * @author Stefan Herndler * @since 1.5.0 */ - public function RegisterSettings() { - // register all settings - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - register_setting($this->getContainer($i), $this->getContainer($i)); + 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 ) ); } } } diff --git a/class/task.php b/class/task.php index 249636c..7fc22f1 100644 --- a/class/task.php +++ b/class/task.php @@ -1,12 +1,11 @@ -get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); - $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); - $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); - $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); - $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); + // Get values from settings. + $l_int_the_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) ); + $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) ); + $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) ); + $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) ); + $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) ); - // PHP_INT_MAX can be set by -1: - $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; - $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; - $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; - $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; - $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; + // PHP_INT_MAX can be set by -1. + $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority; + $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority; + $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority; + $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority; + $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority; + // Append custom css to the header. + add_filter( 'wp_head', array( $this, 'wp_head' ), PHP_INT_MAX ); - // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + // Append the love and share me slug to the footer. + add_filter( 'wp_footer', array( $this, 'wp_footer' ), PHP_INT_MAX ); - // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { + add_filter( 'the_title', array( $this, 'the_title' ), $l_int_the_title_priority ); } - // configurable priority level for reference container relative positioning; default 98: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); + // Configurable priority level for reference container relative positioning; default 98. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { + add_filter( 'the_content', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for category pages + * Hook for category pages. * * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. * @@ -462,10 +532,10 @@ class MCI_Footnotes_Task { * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ */ - add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'term_description', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for popup maker popups + * Hook for popup maker popups. * * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @@ -475,22 +545,21 @@ class MCI_Footnotes_Task { * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ */ - add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) { + add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), $l_int_the_excerpt_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) { + add_filter( 'widget_title', array( $this, 'widget_title' ), $l_int_widget_title_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) { + add_filter( 'widget_text', array( $this, 'widget_text' ), $l_int_widget_text_priority ); } - /** - * The the_post hook + * The the_post hook. * * - Adding: Hooks: support 'the_post' in response to user request for custom post types. * @@ -555,18 +624,16 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges */ - // reset stored footnotes when displaying the header - self::$a_arr_Footnotes = array(); - self::$a_bool_AllowLoveMe = true; + // Reset stored footnotes when displaying the header. + self::$a_arr_footnotes = array(); + self::$a_bool_allow_love_me = true; } /** * Outputs the custom css to the header of the public page. * - * @author Stefan Herndler * @since 1.5.0 * - * * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. * @since 2.1.3 raise settings priority to override theme stylesheets @@ -579,7 +646,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // insert start tag without switching out of PHP: + // Insert start tag without switching out of PHP. echo "\r\n\r\n"; /** @@ -921,184 +1007,199 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified: + * The script for alternative tooltips is printed formatted, not minified. */ - if ( self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { ?> -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { - echo $this->ReferenceContainer(); + if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + echo wp_kses_post( $this->reference_container() ); } - // get setting for love and share this plugin - $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); - // check if the admin allows to add a link to the footer - if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { + // Get setting for love and share this plugin. + $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); + // Check if the admin allows to add a link to the footer. + if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) { return; } - // set a hyperlink to the word "footnotes" in the Love slug - $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); - // get random love me text - if (strtolower($l_str_LoveMeIndex) == "random") { - $l_str_LoveMeIndex = "text-" . rand(1,7); + // Set a hyperlink to the word "footnotes" in the Love slug. + $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ); + // Get random love me text. + if ( 'random' === strtolower( $l_str_love_me_index ) ) { + $l_str_love_me_index = 'text-' . wp_rand( 1, 7 ); } - switch ($l_str_LoveMeIndex) { - // options named wrt backcompat, simplest is default: - case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; - case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; + switch ( $l_str_love_me_index ) { + // Options named wrt backcompat, simplest is default. + case 'text-1': + /* Translators: 2: Link to plugin page 1: Love heart symbol */ + $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-2': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-4': + /* Translators: 1: Link to plugin page 2: Love heart symbol */ + $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-5': + /* Translators: 1: Love heart symbol 2: Link to plugin page */ + $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); + break; + case 'text-6': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-7': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-3': + default: + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); + break; } - echo sprintf('
                                                                                                                                                                  %s
                                                                                                                                                                  ', $l_str_LoveMeText); + echo sprintf( '
                                                                                                                                                                  %s
                                                                                                                                                                  ', wp_kses_post( $l_str_love_me_text ) ); } /** * Replaces footnotes in the post/page title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function the_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function the_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_content($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + public function the_content( $p_str_content ) { + // phpcs:disable WordPress.PHP.YodaConditions.NotYoda + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ); + // phpcs:enable } /** * Replaces footnotes in the excerpt of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_excerpt($p_str_Content) { - return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); + public function the_excerpt( $p_str_content ) { + return $this->exec( $p_str_content, false, ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT ) ) ); } /** * Replaces footnotes in the widget title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function widget_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current widget. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_text($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + public function widget_text( $p_str_content ) { + // phpcs:disable WordPress.PHP.YodaConditions.NotYoda + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); + // phpcs:enable } /** * Replaces footnotes in each Content var of the current Post object. * - * @author Stefan Herndler * @since 1.5.4 - * @param array|WP_Post $p_mixed_Posts + * @param array|WP_Post $p_mixed_posts The current Post object. */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + public function the_post( &$p_mixed_posts ) { + // Single WP_Post object received. + if ( ! is_array( $p_mixed_posts ) ) { + $p_mixed_posts = $this->replace_post_object( $p_mixed_posts ); return; } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + $num_posts = count( $p_mixed_posts ); + // Array of WP_Post objects received. + for ( $l_int_index = 0; $l_int_index < $num_posts; $l_int_index++ ) { + $p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] ); } } /** * Replace all Footnotes in a WP_Post object. * - * @author Stefan Herndler * @since 1.5.6 - * @param WP_Post $p_obj_Post + * @param WP_Post $p_obj_post The Post object. * @return WP_Post */ - private function replacePostObject($p_obj_Post) { - //MCI_Footnotes_Convert::debug($p_obj_Post); - $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); - $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); - $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); - return $p_obj_Post; + private function replace_post_object( $p_obj_post ) { + $p_obj_post->post_content = $this->exec( $p_obj_post->post_content ); + $p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered ); + $p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt ); + return $p_obj_post; } /** * Replaces all footnotes that occur in the given content. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * - * * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. */ - public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) { - // replace all footnotes in the content, settings are converted to html characters - $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); - // replace all footnotes in the content, settings are NOT converted to html characters - $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); + // Replace all footnotes in the content, settings are converted to html characters. + $p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text ); + // Replace all footnotes in the content, settings are NOT converted to html characters. + $p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text ); /** - * Reference container customized positioning through shortcode + * Reference container customized positioning through shortcode. * * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @@ -1116,50 +1217,48 @@ class MCI_Footnotes_Task { * * @reporter @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 - * */ - // append the reference container or insert at shortcode: - $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); - if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { - $l_str_ReferenceContainerPositionShortcode = '[[references]]'; + // Append the reference container or insert at shortcode. + $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); + if ( empty( $l_str_reference_container_position_shortcode ) ) { + $l_str_reference_container_position_shortcode = '[[references]]'; } - if ( $p_bool_OutputReferences ) { + if ( $p_bool_output_references ) { - if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { + if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) { - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content ); } else { - $p_str_Content .= $this->ReferenceContainer(); + $p_str_content .= $this->reference_container(); } - // increment the container ID: - self::$a_int_ReferenceContainerId++; + // Increment the container ID. + self::$a_int_reference_container_id++; } - // delete position shortcode should any remain: - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); + // Delete position shortcode should any remain. + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content ); - // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found - if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { - self::$a_bool_AllowLoveMe = false; - $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); + // Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. + if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) { + self::$a_bool_allow_love_me = false; + $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content ); } - // return the content with replaced footnotes and optional reference container appended: - return $p_str_Content; + // Return the content with replaced footnotes and optional reference container appended. + return $p_str_content; } /** * Replaces all footnotes in the given content and appends them to the static property. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Content to be searched for footnotes. - * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Content to be searched for footnotes. + * @param bool $p_bool_convert_html_chars html encode settings, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * * @since 2.0.0 various. @@ -1168,37 +1267,37 @@ class MCI_Footnotes_Task { * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. */ - public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { + public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) { - // post ID to make everything unique wrt infinite scroll and archive view - self::$a_int_PostId = get_the_id(); + // Post ID to make everything unique wrt infinite scroll and archive view. + self::$a_int_post_id = get_the_id(); - // contains the index for the next footnote on this page - $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; + // Contains the index for the next footnote on this page. + $l_int_footnote_index = count( self::$a_arr_footnotes ) + 1; - // contains the starting position for the lookup of a footnote - $l_int_PosStart = 0; + // Contains the starting position for the lookup of a footnote. + $l_int_pos_start = 0; - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - // decode html special chars - if ($p_bool_ConvertHtmlChars) { - $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); - $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); + // Decode html special chars. + if ( $p_bool_convert_html_chars ) { + $l_str_starting_tag = htmlspecialchars( $l_str_starting_tag ); + $l_str_ending_tag = htmlspecialchars( $l_str_ending_tag ); } - // if footnotes short code is empty, return the content without changes - if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { - return $p_str_Content; + // If footnotes short code is empty, return the content without changes. + if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) { + return $p_str_content; } /** - * Footnote delimiter syntax validation + * Footnote delimiter syntax validation. * * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * @@ -1219,74 +1318,74 @@ class MCI_Footnotes_Task { * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) { - // make shortcodes conform to regex syntax: - $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); - $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); + // Make shortcodes conform to regex syntax. + $l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag ); + $l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag ); - // apply different regex depending on whether start shortcode is double/triple opening parenthesis: - if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { + // Apply different regex depending on whether start shortcode is double/triple opening parenthesis. + if ( '((' === $l_str_starting_tag || '(((' === $l_str_starting_tag ) { - // this prevents from catching a script containing e.g. a double opening parenthesis: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; + // This prevents from catching a script containing e.g. a double opening parenthesis. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ')[^\{\}])*?)(' . $l_str_start_tag_regex . '|$)#s'; } else { - // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; + // Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ').)*?)(' . $l_str_start_tag_regex . '|$)#s'; } - // check syntax and get error locations: - preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); - if ( empty( $p_arr_ErrorLocation ) ) { - self::$a_bool_SyntaxErrorFlag = false; + // Check syntax and get error locations. + preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location ); + if ( empty( $p_arr_error_location ) ) { + self::$a_bool_syntax_error_flag = false; } - // prevent generating and inserting the warning multiple times: - if ( self::$a_bool_SyntaxErrorFlag ) { + // Prevent generating and inserting the warning multiple times. + if ( self::$a_bool_syntax_error_flag ) { - // get plain text string for error location: - $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); + // Get plain text string for error location. + $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] ); - // limit string length to 300 characters: - if ( strlen( $l_str_ErrorSpotString ) > 300 ) { - $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; + // Limit string length to 300 characters. + if ( strlen( $l_str_error_spot_string ) > 300 ) { + $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…'; } - // compose warning box: - $l_str_SyntaxErrorWarning = '

                                                                                                                                                                  '; - $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                  '; + // Compose warning box. + $l_str_syntax_error_warning = '

                                                                                                                                                                  '; + $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                                                                                                  '; - // syntax validation setting in the dashboard under the General settings tab: - $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); + // Syntax validation setting in the dashboard under the General settings tab. + /* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */ + $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                  '; - $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                  “'; - $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; - $l_str_SyntaxErrorWarning .= '”

                                                                                                                                                                  '; + $l_str_syntax_error_warning .= '

                                                                                                                                                                  '; + $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                                                                                                  “'; + $l_str_syntax_error_warning .= $l_str_error_spot_string; + $l_str_syntax_error_warning .= '”

                                                                                                                                                                  '; - // prepend the warning box to the content: - $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; + // Prepend the warning box to the content. + $p_str_content = $l_str_syntax_error_warning . $p_str_content; - // checked, set flag to false to prevent duplicate warning: - self::$a_bool_SyntaxErrorFlag = false; + // Checked, set flag to false to prevent duplicate warning. + self::$a_bool_syntax_error_flag = false; - return $p_str_Content; + return $p_str_content; } } + // Load referrer templates if footnotes text not hidden. + if ( ! $p_bool_hide_footnotes_text ) { - // load referrer templates if footnotes text not hidden: - if (!$p_bool_HideFootnotesText) { - - // load footnote referrer template file: - if (self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + // Load footnote referrer template file. + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' ); } else { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' ); } /** @@ -1295,56 +1394,57 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. * * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority) */ - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - // load tooltip inline script if jQuery tooltips are enabled: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); + // Load tooltip inline script if jQuery tooltips are enabled. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' ); } - } else { - $l_obj_Template = null; - $l_obj_TemplateTooltip = null; + $l_obj_template = null; + $l_obj_template_tooltip = null; } - // search footnotes short codes in the content + // Search footnotes short codes in the content. do { - // get first occurrence of the footnote start tag short code: - $i_int_LenContent = strlen($p_str_Content); - if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; - $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosStart === false) { + // Get first occurrence of the footnote start tag short code. + $i_int_len_content = strlen( $p_str_content ); + if ( $l_int_pos_start > $i_int_len_content ) { + $l_int_pos_start = $i_int_len_content; + } + $l_int_pos_start = strpos( $p_str_content, $l_str_starting_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_start ) { break; } - // get first occurrence of the footnote end tag short code: - $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosEnd === false) { + // Get first occurrence of the footnote end tag short code. + $l_int_pos_end = strpos( $p_str_content, $l_str_ending_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_end ) { break; } - // calculate the length of the footnote - $l_int_Length = $l_int_PosEnd - $l_int_PosStart; + // Calculate the length of the footnote. + $l_int_length = $l_int_pos_end - $l_int_pos_start; - // get footnote text - $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); + // Get footnote text. + $l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) ); - // get tooltip text if present: - self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); - self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + // Get tooltip text if present. + self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ); + self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode ); + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); } else { - $l_str_TooltipText = ''; + $l_str_tooltip_text = ''; } /** - * URL line wrapping for Unicode non conformant browsers + * URL line wrapping for Unicode non conformant browsers. * * @since 2.1.1 (CSS) * @since 2.1.4 (PHP) @@ -1437,7 +1537,6 @@ class MCI_Footnotes_Task { * @reporter @bernardzit * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * - * * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * @date 2020-12-23T1107+0100 * @@ -1478,48 +1577,48 @@ class MCI_Footnotes_Task { * Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces. * But given they can occur on WP-powered websites, some page builders may probably not. */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - $l_str_FootnoteText = preg_replace( + $l_str_footnote_text = preg_replace( '#(?$1', - $l_str_FootnoteText + $l_str_footnote_text ); } - // Text to be displayed instead of the footnote - $l_str_FootnoteReplaceText = ""; + // Text to be displayed instead of the footnote. + $l_str_footnote_replace_text = ''; - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - // get the configurable parts: - self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); - self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); - self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); + // Get the configurable parts. + self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ); + self::$a_str_footnote_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ); + self::$a_str_link_ids_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ); - // streamline ID concatenation: - self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + // Streamline ID concatenation. + self::$a_str_post_container_id_compound = self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_post_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_reference_container_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; } - // display the footnote referrers and the tooltips: - if (!$p_bool_HideFootnotesText) { - $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Display the footnote referrers and the tooltips. + if ( ! $p_bool_hide_footnotes_text ) { + $l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // display only a truncated footnote text if option enabled: - $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); - $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); + // Display only a truncated footnote text if option enabled. + $l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) ); + $l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) ); - // define excerpt text as footnote text by default: - $l_str_ExcerptText = $l_str_FootnoteText; + // Define excerpt text as footnote text by default. + $l_str_excerpt_text = $l_str_footnote_text; /** - * Tooltip truncation + * Tooltip truncation. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1534,34 +1633,34 @@ class MCI_Footnotes_Task { * This is equivalent to the WordPress default excerpt generation, i.e. without a * custom excerpt and without a delimiter. But WordPress does word count, usually 55. */ - if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { - $l_str_DummyText = strip_tags($l_str_FootnoteText); - if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { - $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); - $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - $l_str_ExcerptText .= ' … <'; - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; - $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; - $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= "_$l_int_Index');\""; + if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) { + $l_str_dummy_text = wp_strip_all_tags( $l_str_footnote_text ); + if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) { + $l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length ); + $l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) ); + $l_str_excerpt_text .= ' … <'; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span'; + $l_str_excerpt_text .= ' class="footnote_tooltip_continue" '; + $l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= '(\'footnote_plugin_reference_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= "_$l_int_index');\""; - // if enabled, add the hard link fragment ID: - if (self::$a_bool_HardLinksEnable) { + // If enabled, add the hard link fragment ID. + if ( self::$a_bool_hard_links_enable ) { - $l_str_ExcerptText .= ' href="#'; - $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; - $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; - $l_str_ExcerptText .= $l_int_Index; - $l_str_ExcerptText .= '"'; + $l_str_excerpt_text .= ' href="#'; + $l_str_excerpt_text .= self::$a_str_footnote_link_slug; + $l_str_excerpt_text .= self::$a_str_post_container_id_compound; + $l_str_excerpt_text .= $l_int_index; + $l_str_excerpt_text .= '"'; } - $l_str_ExcerptText .= '>'; + $l_str_excerpt_text .= '>'; /** - * Configurable read-on button label + * Configurable read-on button label. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1571,55 +1670,56 @@ class MCI_Footnotes_Task { * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ */ - $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); + $l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '' : ''; } } /** - * Referrers element superscript or baseline + * Referrers element superscript or baseline. * * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report + * * @since 2.1.1 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * - * define the HTML element to use for the referrers: + * define the HTML element to use for the referrers. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) { - $l_str_SupSpan = 'sup'; + $l_str_sup_span = 'sup'; } else { - $l_str_SupSpan = 'span'; + $l_str_sup_span = 'span'; } - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkCloseTag = ''; - // self::$a_str_LinkOpenTag will be defined as needed + self::$a_str_link_span = 'a'; + self::$a_str_link_close_tag = ''; + // Self::$a_str_link_open_tag will be defined as needed. - // compose hyperlink address (leading space is in template): - $l_str_FootnoteLinkArgument = 'href="#'; - $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; - $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteLinkArgument .= $l_int_Index; - $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; + // Compose hyperlink address (leading space is in template). + $l_str_footnote_link_argument = 'href="#'; + $l_str_footnote_link_argument .= self::$a_str_footnote_link_slug; + $l_str_footnote_link_argument .= self::$a_str_post_container_id_compound; + $l_str_footnote_link_argument .= $l_int_index; + $l_str_footnote_link_argument .= '" class="footnote_hard_link"'; /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_ReferrerAnchorElement = ''; + $l_str_referrer_anchor_element = ''; } else { @@ -1636,101 +1736,101 @@ class MCI_Footnotes_Task { * * If no hyperlink nor offset anchor is needed, initialize as empty. */ - $l_str_FootnoteLinkArgument = ''; - $l_str_ReferrerAnchorElement = ''; + $l_str_footnote_link_argument = ''; + $l_str_referrer_anchor_element = ''; - // The link element is set independently as it may be needed for styling: - if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { + // The link element is set independently as it may be needed for styling. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED ) ) ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkOpenTag = ''; - self::$a_str_LinkCloseTag = ''; + self::$a_str_link_span = 'a'; + self::$a_str_link_open_tag = ''; + self::$a_str_link_close_tag = ''; } } - // determine tooltip content: - if ( self::$a_bool_TooltipsEnabled ) { - $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; + // Determine tooltip content. + if ( self::$a_bool_tooltips_enabled ) { + $l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text; } else { - $l_str_TooltipContent = ''; + $l_str_tooltip_content = ''; } - + /** * Determine shrink width if alternative tooltips are enabled. - * + * * @since 2.5.6 */ - $l_str_TooltipStyle = ''; - if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { - $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); - if ( $l_int_TooltipLength < 70 ) { - $l_str_TooltipStyle = ' style="width: '; - $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); - $l_str_TooltipStyle .= 'em;"'; + $l_str_tooltip_style = ''; + if ( self::$a_bool_alternative_tooltips_enabled && self::$a_bool_tooltips_enabled ) { + $l_int_tooltip_length = strlen( wp_strip_all_tags( $l_str_tooltip_content ) ); + if ( $l_int_tooltip_length < 70 ) { + $l_str_tooltip_style = ' style="width: '; + $l_str_tooltip_style .= ( $l_int_tooltip_length * .7 ); + $l_str_tooltip_style .= 'em;"'; } } - // fill in 'templates/public/footnote.html': - $l_obj_Template->replace( + // Fill in 'templates/public/footnote.html'. + $l_obj_template->replace( array( - "link-span" => self::$a_str_LinkSpan, - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "hard-link" => $l_str_FootnoteLinkArgument, - "sup-span" => $l_str_SupSpan, - "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - "index" => $l_int_Index, - "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - "anchor-element" => $l_str_ReferrerAnchorElement, - "style" => $l_str_TooltipStyle, - "text" => $l_str_TooltipContent, + 'link-span' => self::$a_str_link_span, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'hard-link' => $l_str_footnote_link_argument, + 'sup-span' => $l_str_sup_span, + 'before' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), + 'index' => $l_int_index, + 'after' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), + 'anchor-element' => $l_str_referrer_anchor_element, + 'style' => $l_str_tooltip_style, + 'text' => $l_str_tooltip_content, ) ); - $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); + $l_str_footnote_replace_text = $l_obj_template->get_content(); - // reset the template - $l_obj_Template->reload(); + // Reset the template. + $l_obj_template->reload(); - // if standard tooltips are enabled but alternative are not: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + // If standard tooltips are enabled but alternative are not. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); - $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); - $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); - $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); - $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); + $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) ); + $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) ); + $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); + $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); + $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); + $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); - // fill in 'templates/public/tooltip.html': - $l_obj_TemplateTooltip->replace( + // Fill in 'templates/public/tooltip.html'. + $l_obj_template_tooltip->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), - "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, - "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, - "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, - "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, - "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, - "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'position' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION ), + 'offset-y' => ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0, + 'offset-x' => ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0, + 'fade-in-delay' => ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : 0, + 'fade-in-duration' => ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : 0, + 'fade-out-delay' => ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : 0, + 'fade-out-duration' => ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : 0, ) ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); - $l_obj_TemplateTooltip->reload(); + $l_str_footnote_replace_text .= $l_obj_template_tooltip->get_content(); + $l_obj_template_tooltip->reload(); } } - // replace the footnote with the template - $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); + // Replace the footnote with the template. + $p_str_content = substr_replace( $p_str_content, $l_str_footnote_replace_text, $l_int_pos_start, $l_int_length + strlen( $l_str_ending_tag ) ); - // add footnote only if not empty - if (!empty($l_str_FootnoteText)) { - // set footnote to the output box at the end - self::$a_arr_Footnotes[] = $l_str_FootnoteText; - // increase footnote index - $l_int_FootnoteIndex++; + // Add footnote only if not empty. + if ( ! empty( $l_str_footnote_text ) ) { + // Set footnote to the output box at the end. + self::$a_arr_footnotes[] = $l_str_footnote_text; + // Increase footnote index. + $l_int_footnote_index++; } /** @@ -1765,19 +1865,18 @@ class MCI_Footnotes_Task { * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. */ - // add offset to the new starting position - $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); + // Add offset to the new starting position. + $l_int_pos_start += $l_int_length + strlen( $l_str_ending_tag ); - } while (true); + } while ( true ); - // return content - return $p_str_Content; + // Return content. + return $p_str_content; } /** * Generates the reference container. * - * @author Stefan Herndler * @since 1.5.0 * @return string * @@ -1788,16 +1887,15 @@ class MCI_Footnotes_Task { * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. */ - public function ReferenceContainer() { + public function reference_container() { - // no footnotes have been replaced on this page: - if (empty(self::$a_arr_Footnotes)) { - return ""; + // No footnotes have been replaced on this page. + if ( empty( self::$a_arr_footnotes ) ) { + return ''; } - /** - * Footnote index backlink symbol + * Footnote index backlink symbol. * * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. * @@ -1806,37 +1904,36 @@ class MCI_Footnotes_Task { * @reporter @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * - * If the backlink symbol is enabled: + * If the backlink symbol is enabled. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) { - // get html arrow - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); - // set html arrow to the first one if invalid index defined - if (is_array($l_str_Arrow)) { - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); + // Get html arrow. + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW ) ); + // Set html arrow to the first one if invalid index defined. + if ( is_array( $l_str_arrow ) ) { + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( 0 ); } - // get user defined arrow - $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); - if (!empty($l_str_ArrowUserDefined)) { - $l_str_Arrow = $l_str_ArrowUserDefined; + // Get user defined arrow. + $l_str_arrow_user_defined = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ); + if ( ! empty( $l_str_arrow_user_defined ) ) { + $l_str_arrow = $l_str_arrow_user_defined; } - // wrap the arrow in a @media print { display:hidden } span: - $l_str_FootnoteArrow = ''; - $l_str_FootnoteArrow .= $l_str_Arrow . ''; + // Wrap the arrow in a @media print { display:hidden } span. + $l_str_footnote_arrow = ''; + $l_str_footnote_arrow .= $l_str_arrow . ''; } else { - // If the backlink symbol isn’t enabled, set it to empty: - $l_str_Arrow = ''; - $l_str_FootnoteArrow = ''; + // If the backlink symbol isn’t enabled, set it to empty. + $l_str_arrow = ''; + $l_str_footnote_arrow = ''; } - /** - * Backlink separator + * Backlink separator. * * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. * @@ -1852,59 +1949,69 @@ class MCI_Footnotes_Task { * Initially a comma was appended in this algorithm for enumerations. * The comma in enumerations is not generally preferred. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + // Check if it is input-configured. + $l_str_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ); - if (empty($l_str_Separator)) { + if ( empty( $l_str_separator ) ) { - // if it is not, check which option is on: - $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); - switch ($l_str_SeparatorOption) { - case 'comma' : $l_str_Separator = ','; break; - case 'semicolon': $l_str_Separator = ';'; break; - case 'en_dash' : $l_str_Separator = ' –'; break; + // If it is not, check which option is on. + $l_str_separator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); + switch ( $l_str_separator_option ) { + case 'comma': + $l_str_separator = ','; + break; + case 'semicolon': + $l_str_separator = ';'; + break; + case 'en_dash': + $l_str_separator = ' –'; + break; } } - } else { - $l_str_Separator = ''; + $l_str_separator = ''; } /** - * Backlink terminator + * Backlink terminator. * * Initially a dot was appended in the table row template. + * * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable: + * @since 2.1.4 the terminator is optional, has options, and is configurable. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + // Check if it is input-configured. + $l_str_terminator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ); - if (empty($l_str_Terminator)) { + if ( empty( $l_str_terminator ) ) { - // if it is not, check which option is on: - $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); - switch ($l_str_TerminatorOption) { - case 'period' : $l_str_Terminator = '.'; break; - case 'parenthesis': $l_str_Terminator = ')'; break; - case 'colon' : $l_str_Terminator = ':'; break; + // If it is not, check which option is on. + $l_str_terminator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); + switch ( $l_str_terminator_option ) { + case 'period': + $l_str_terminator = '.'; + break; + case 'parenthesis': + $l_str_terminator = ')'; + break; + case 'colon': + $l_str_terminator = ':'; + break; } } - } else { - $l_str_Terminator = ''; + $l_str_terminator = ''; } - /** - * Line breaks + * Line breaks. * * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * @@ -1916,18 +2023,19 @@ class MCI_Footnotes_Task { * Variable number length and proportional character width require explicit line breaks. * Otherwise, an ordinary space character offering a line break opportunity is inserted. */ - $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                                                                                                  ' : ' '; + $l_str_line_break = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED ) ) ? '
                                                                                                                                                                  ' : ' '; /** + * Line breaks for source readability. + * * For maintenance and support, table rows in the reference container should be * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below): + * Before the first table row (breaks between rows are ~200 lines below). */ - $l_str_Body = "\r\n\r\n"; - + $l_str_body = "\r\n\r\n"; /** - * Reference container table row template load + * Reference container table row template load. * * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * @@ -1935,34 +2043,34 @@ class MCI_Footnotes_Task { * @date 2020-11-16T2024+0100 */ - // when combining identical footnotes is turned on, another template is needed: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // the combining template allows for backlink clusters and supports cell clicking for single notes: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); + // When combining identical footnotes is turned on, another template is needed. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { + // The combining template allows for backlink clusters and supports cell clicking for single notes. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' ); } else { - // when 3-column layout is turned on (only available if combining is turned off): - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); + // When 3-column layout is turned on (only available if combining is turned off). + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' ); } else { - // when switch symbol and index is turned on, and combining and 3-columns are off: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); + // When switch symbol and index is turned on, and combining and 3-columns are off. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' ); } else { - // default is the standard template: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); + // Default is the standard template. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' ); } } } /** - * Switch backlink symbol and footnote number + * Switch backlink symbol and footnote number. * * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * @@ -1978,36 +2086,37 @@ class MCI_Footnotes_Task { * @since 2.1.4 * @date 2020-11-26T1633+0100 */ - $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); + $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); - // loop through all footnotes found in the page - for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { + // Loop through all footnotes found in the page. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_index = 0; $l_int_index < $num_footnotes; $l_int_index++ ) { - // get footnote text - $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; + // Get footnote text. + $l_str_footnote_text = self::$a_arr_footnotes[ $l_int_index ]; - // if footnote is empty, go to the next one; - // With combine identicals turned on, identicals will be deleted and are skipped: - if (empty($l_str_FootnoteText)) { + // If footnote is empty, go to the next one;. + // With combine identicals turned on, identicals will be deleted and are skipped. + if ( empty( $l_str_footnote_text ) ) { continue; } - // generate content of footnote index cell - $l_int_FirstFootnoteIndex = ($l_int_Index + 1); + // Generate content of footnote index cell. + $l_int_first_footnote_index = ( $l_int_index + 1 ); - // get the footnote index string and - // keep supporting legacy index placeholder: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Get the footnote index string and. + // Keep supporting legacy index placeholder. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); /** - * Case of only one backlink per table row + * Case of only one backlink per table row. * - * If enabled, and for the case the footnote is single, compose hard link: + * If enabled, and for the case the footnote is single, compose hard link. */ - // define anyway: - $l_str_HardLinkAddress = ''; + // Define anyway. + $l_str_hard_link_address = ''; - if (self::$a_bool_HardLinksEnable) { + if ( self::$a_bool_hard_links_enable ) { /** * Use-Backbutton-Hint tooltip, optional and configurable. @@ -2023,43 +2132,42 @@ class MCI_Footnotes_Task { * 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 */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_UseBackbuttonHint = ' title="'; - $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); - $l_str_UseBackbuttonHint .= '"'; + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_use_backbutton_hint = ' title="'; + $l_str_use_backbutton_hint .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ); + $l_str_use_backbutton_hint .= '"'; } else { - $l_str_UseBackbuttonHint = ''; + $l_str_use_backbutton_hint = ''; } /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_FootnoteAnchorElement = ''; + $l_str_footnote_anchor_element = ''; - // compose optional hard link address: - $l_str_HardLinkAddress = ' href="#'; - $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; - $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; - $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; - $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; + // Compose optional hard link address. + $l_str_hard_link_address = ' href="#'; + $l_str_hard_link_address .= self::$a_str_referrer_link_slug; + $l_str_hard_link_address .= self::$a_str_post_container_id_compound; + $l_str_hard_link_address .= $l_str_footnote_id . '"'; + $l_str_hard_link_address .= $l_str_use_backbutton_hint; - // compose optional opening link tag with optional hard link, mandatory for instance: - self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { - // ID, optional hard link address, and class: - $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; - $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= self::$a_int_PostId; - $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= ' href="#'; - $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; - $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; + // ID, optional hard link address, and class. + $l_str_footnote_reference = '<' . self::$a_str_link_span; + $l_str_footnote_reference .= ' id="footnote_plugin_reference_'; + $l_str_footnote_reference .= self::$a_int_post_id; + $l_str_footnote_reference .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_reference .= "_$l_str_footnote_id\""; + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= ' href="#'; + $l_str_footnote_reference .= self::$a_str_referrer_link_slug; + $l_str_footnote_reference .= self::$a_str_post_container_id_compound; + $l_str_footnote_reference .= $l_str_footnote_id . '"'; + $l_str_footnote_reference .= $l_str_use_backbutton_hint; } - $l_str_FootnoteReference .= ' class="footnote_backlink"'; + $l_str_footnote_reference .= ' class="footnote_backlink"'; - // the click event goes in the table cell if footnote remains single: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; + // The click event goes in the table cell if footnote remains single. + $l_str_backlink_event = ' onclick="footnote_move_to_anchor_'; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "('footnote_plugin_tooltip_"; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "_$l_str_footnote_id');\""; + // The dedicated template enumerating backlinks uses another variable. + $l_str_footnote_backlinks = $l_str_footnote_reference; - // the dedicated template enumerating backlinks uses another variable: - $l_str_FootnoteBacklinks = $l_str_FootnoteReference; + // Append the click event right to the backlink item for enumerations;. + // Else it goes in the table cell. + $l_str_footnote_backlinks .= $l_str_backlink_event . '>'; + $l_str_footnote_reference .= '>'; - // append the click event right to the backlink item for enumerations; - // else it goes in the table cell: - $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; - $l_str_FootnoteReference .= '>'; - - // append the optional offset anchor for hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; - $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; + // Append the optional offset anchor for hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= $l_str_footnote_anchor_element; + $l_str_footnote_backlinks .= $l_str_footnote_anchor_element; } - // continue both single note and notes cluster, depending on switch option status: - if ($l_bool_SymbolSwitch) { + // Continue both single note and notes cluster, depending on switch option status. + if ( $l_bool_symbol_switch ) { - $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_footnote_reference .= "$l_str_footnote_id$l_str_footnote_arrow"; + $l_str_footnote_backlinks .= "$l_str_footnote_id$l_str_footnote_arrow"; } else { - $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_footnote_reference .= "$l_str_footnote_arrow$l_str_footnote_id"; + $l_str_footnote_backlinks .= "$l_str_footnote_arrow$l_str_footnote_id"; } - // If that is the only footnote with this text, we’re almost done. + // If that is the only footnote with this text, we’re almost done.. - // check if it isn't the last footnote in the array: - if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { + // Check if it isn't the last footnote in the array. + if ( $l_int_first_footnote_index < count( self::$a_arr_footnotes ) ) { - // get all footnotes that haven't passed yet: - for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { + // Get all footnotes that haven't passed yet. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_check_index = $l_int_first_footnote_index; $l_int_check_index < $num_footnotes; $l_int_check_index++ ) { - // check if a further footnote is the same as the actual one: - if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { + // Check if a further footnote is the same as the actual one. + if ( self::$a_arr_footnotes[ $l_int_check_index ] === $l_str_footnote_text ) { - // if so, set the further footnote as empty so it won't be displayed later: - self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; + // If so, set the further footnote as empty so it won't be displayed later. + self::$a_arr_footnotes[ $l_int_check_index ] = ''; - // set the flag to true for the combined status: - $l_bool_FlagCombined = true; + // Set the flag to true for the combined status. + $l_bool_flag_combined = true; - // update the footnote ID: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Update the footnote ID. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // resume composing the backlinks enumeration: - $l_str_FootnoteBacklinks .= "$l_str_Separator'; - $l_str_FootnoteBacklinks .= $l_str_LineBreak; - $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; - $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; + // Resume composing the backlinks enumeration. + $l_str_footnote_backlinks .= "$l_str_separator'; + $l_str_footnote_backlinks .= $l_str_line_break; + $l_str_footnote_backlinks .= '<' . self::$a_str_link_span; + $l_str_footnote_backlinks .= ' id="footnote_plugin_reference_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id\""; - // insert the optional hard link address: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ' href="#'; - $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; - $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; + // Insert the optional hard link address. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ' href="#'; + $l_str_footnote_backlinks .= self::$a_str_referrer_link_slug; + $l_str_footnote_backlinks .= self::$a_str_post_container_id_compound; + $l_str_footnote_backlinks .= $l_str_footnote_id . '"'; + $l_str_footnote_backlinks .= $l_str_use_backbutton_hint; } - $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; - $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; + $l_str_footnote_backlinks .= ' class="footnote_backlink"'; + $l_str_footnote_backlinks .= ' onclick="footnote_move_to_anchor_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "('footnote_plugin_tooltip_"; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id');\">"; - // append the offset anchor for optional hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ''; + // Append the offset anchor for optional hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ''; } - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId; - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? '' : $l_str_footnote_arrow; + $l_str_footnote_backlinks .= $l_str_footnote_id; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? $l_str_footnote_arrow : ''; } } } - // append terminator and end tag: - $l_str_FootnoteReference .= $l_str_Terminator . ''; - $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; + // Append terminator and end tag. + $l_str_footnote_reference .= $l_str_terminator . ''; + $l_str_footnote_backlinks .= $l_str_terminator . ''; } - // line wrapping of URLs already fixed, see above + // Line wrapping of URLs already fixed, see above. - // get reference container item text if tooltip text goes separate: - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); - self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_MirrorTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); - $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; + // Get reference container item text if tooltip text goes separate. + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) ); + self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_mirror_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); + $l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ); + $l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text; } else { - $l_str_ReferenceText = $l_str_NotTooltipText; + $l_str_reference_text = $l_str_not_tooltip_text; } } else { - $l_str_ReferenceText = $l_str_FootnoteText; + $l_str_reference_text = $l_str_footnote_text; } - // replace all placeholders in table row template: - $l_obj_Template->replace( + // Replace all placeholders in table row template. + $l_obj_template->replace( array( - // placeholder used in all templates: - "text" => $l_str_ReferenceText, + // Placeholder used in all templates. + 'text' => $l_str_reference_text, - // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => self::$a_str_LinkOpenTag, - "link-end" => self::$a_str_LinkCloseTag, - "link-span" => self::$a_str_LinkSpan, - "terminator" => $l_str_Terminator, - "anchor-element" => $l_str_FootnoteAnchorElement, - "hard-link" => $l_str_HardLinkAddress, + // Used in standard layout W/O COMBINED FOOTNOTES. + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ), + 'link-start' => self::$a_str_link_open_tag, + 'link-end' => self::$a_str_link_close_tag, + 'link-span' => self::$a_str_link_span, + 'terminator' => $l_str_terminator, + 'anchor-element' => $l_str_footnote_anchor_element, + 'hard-link' => $l_str_hard_link_address, - // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => $l_bool_FlagCombined ? '' : ' pointer', - "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, - "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + // Used in standard layout WITH COMBINED IDENTICALS TURNED ON. + 'pointer' => $l_bool_flag_combined ? '' : ' pointer', + 'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event, + 'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference, - // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteId, + // Legacy placeholders for use in legacy layout templates. + 'arrow' => $l_str_footnote_arrow, + 'index' => $l_str_footnote_id, ) ); - $l_str_Body .= $l_obj_Template->getContent(); + $l_str_body .= $l_obj_template->get_content(); - // extra line breaks for page source readability: - $l_str_Body .= "\r\n\r\n"; + // Extra line breaks for page source readability. + $l_str_body .= "\r\n\r\n"; - $l_obj_Template->reload(); + $l_obj_template->reload(); } - // call again for robustness when priority levels don’t match any longer: - self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); + // Call again for robustness when priority levels don’t match any longer. + self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); - // streamline: - $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); + // Streamline. + $l_bool_collapse_default = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE ) ); /** - * Reference container label + * Reference container label. * * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. * @@ -2283,7 +2391,7 @@ class MCI_Footnotes_Task { * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. */ - $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); + $l_str_reference_container_label = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ); /** * Select the reference container template according to the script mode. @@ -2294,40 +2402,40 @@ class MCI_Footnotes_Task { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * @reporter @pkverma99 * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 */ - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - if ( $l_str_ScriptMode == 'jquery' ) { + $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); + + if ( 'jquery' === $l_str_script_mode ) { + + // Load 'templates/public/reference-container.html'. + $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container' ); - // load 'templates/public/reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); - } else { - - // load 'templates/public/js-reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); + + // Load 'templates/public/js-reference-container.html'. + $l_obj_template_container = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'js-reference-container' ); } - - $l_obj_TemplateContainer->replace( + + $l_obj_template_container->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), - "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, - "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', - "style" => $l_bool_CollapseDefault ? 'display: none;' : '', - "content" => $l_str_Body, - "scroll-offset" => (self::$a_int_ScrollOffset / 100), - "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'element' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ), + 'name' => empty( $l_str_reference_container_label ) ? ' ' : $l_str_reference_container_label, + 'button-style' => ! $l_bool_collapse_default ? 'display: none;' : '', + 'style' => $l_bool_collapse_default ? 'display: none;' : '', + 'content' => $l_str_body, + 'scroll-offset' => ( self::$a_int_scroll_offset / 100 ), + 'scroll-duration' => intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) ), ) ); - // free all found footnotes if reference container will be displayed - self::$a_arr_Footnotes = array(); + // Free all found footnotes if reference container will be displayed. + self::$a_arr_footnotes = array(); - return $l_obj_TemplateContainer->getContent(); + return $l_obj_template_container->get_content(); } } diff --git a/class/template.php b/class/template.php index 2c0b8d4..d438748 100644 --- a/class/template.php +++ b/class/template.php @@ -1,39 +1,21 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); /** - * Modularize functions + * Modularize functions. * * @since 2.4.0d3 - * - * @author Patrizia Lutz @misfist */ - if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { + $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ); + if ( $template ) { $this->process_template( $template ); } else { return; @@ -133,124 +107,123 @@ class MCI_Footnotes_Template { /** * Replace all placeholders specified in array. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). + * @param array $p_arr_placeholders Placeholders (key = placeholder, value = value). * @return bool True on Success, False if Placeholders invalid. */ - public function replace($p_arr_Placeholders) { - // no placeholders set - if (empty($p_arr_Placeholders)) { + public function replace( $p_arr_placeholders ) { + // No placeholders set. + if ( empty( $p_arr_placeholders ) ) { return false; } - // template content is empty - if (empty($this->a_str_ReplacedContent)) { + // Template content is empty. + if ( empty( $this->a_str_replaced_content ) ) { return false; } - // iterate through each placeholder and replace it with its value - foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { - $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); + // Iterate through each placeholder and replace it with its value. + foreach ( $p_arr_placeholders as $l_str_placeholder => $l_str_value ) { + $this->a_str_replaced_content = str_replace( '[[' . $l_str_placeholder . ']]', $l_str_value, $this->a_str_replaced_content ); } - // success + // Success. return true; } /** * Reloads the original content of the template file. * - * @author Stefan Herndler * @since 1.5.0 */ public function reload() { - $this->a_str_ReplacedContent = $this->a_str_OriginalContent; + $this->a_str_replaced_content = $this->a_str_original_content; } /** * Returns the content of the template file with replaced placeholders. * - * @author Stefan Herndler * @since 1.5.0 * @return string Template content with replaced placeholders. */ - public function getContent() { - return $this->a_str_ReplacedContent; + public function get_content() { + return $this->a_str_replaced_content; } /** - * Process template file - * - * @author Patrizia Lutz @misfist + * Process template file. * * @since 2.4.0d3 * - * @param string $template + * @param string $template The template to be processed. * @return void * - * - * @since 2.0.3 replace tab with a space - * @since 2.0.3 replace 2 spaces with 1 - * @since 2.0.4 collapse multiple spaces - * @since 2.2.6 delete a space before a closing pointy bracket - * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) + * @since 2.0.3 Replace tab with a space. + * @since 2.0.3 Replace 2 spaces with 1. + * @since 2.0.4 Collapse multiple spaces. + * @since 2.2.6 Delete a space before a closing pointy bracket. + * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). */ public function process_template( $template ) { - $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); - $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); + $this->a_str_original_content = preg_replace( '##s', '', wp_remote_get( $template ) ); + $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\t", ' ', $this->a_str_original_content ); + $this->a_str_original_content = preg_replace( '# +#', ' ', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( ' >', '>', $this->a_str_original_content ); $this->reload(); } /** - * Get the template + * Get the template. + * + * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. * - * @author Patrizia Lutz @misfist + * @since 2.4.0d3 Contribution. + * @since 2.5.0 Release. + * + * @contributor @misfist + * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 * - * @since 2.4.0d3 - * - * @param string $p_str_FileType - * @param string $p_str_FileName - * @param string $p_str_Extension + * @param string $p_str_file_type The file type of the template. + * @param string $p_str_file_name The file name of the template. + * @param string $p_str_extension The file extension of the template. * @return mixed false | template path */ - public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { + public function get_template( $p_str_file_type, $p_str_file_name, $p_str_extension = 'html' ) { $located = false; /** - * The directory change be modified - * @usage to change location of templates to `template_parts/footnotes/': + * The directory can be changed. + * + * @usage to change location of templates to 'template_parts/footnotes/': * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/; + * return 'template_parts/footnotes/'; * } ); */ $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension; /** - * Look in active (child) theme + * Look in active theme. */ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - /** - * Look in parent theme - */ + /** + * Look in parent theme in case active is child. + */ } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - /** - * Look in custom directory - */ + /** + * Look in custom plugin directory. + */ } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - /** - * Look in plugin - */ + /** + * Fall back to the templates shipped with the plugin. + */ } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { $located = $this->plugin_directory . 'templates/' . $template_name; } @@ -258,4 +231,4 @@ class MCI_Footnotes_Template { return $located; } -} // end of class +} // End of class. diff --git a/class/widgets/base.php b/class/widgets/base.php index ad41077..cc00326 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,12 +1,12 @@ - __CLASS__, "description" => $this->getDescription()); - $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); - // registers the Widget + $l_arr_widget_options = array( + 'classname' => __CLASS__, + 'description' => $this->get_description(), + ); + $l_arr_control_options = array( + 'id_base' => strtolower( $this->get_id() ), + 'width' => $this->get_widget_width(), + ); + // Registers the Widget. parent::__construct( - strtolower($this->getID()), // unique ID for the widget, has to be lowercase - $this->getName(), // Plugin name to be displayed - $l_arr_WidgetOptions, // Optional Widget Options - $l_arr_ControlOptions // Optional Widget Control Options - ); + strtolower( $this->get_id() ), // Unique ID for the widget, has to be lowercase. + $this->get_name(), // Plugin name to be displayed. + $l_arr_widget_options, // Optional Widget Options. + $l_arr_control_options // Optional Widget Control Options. + ); } } diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 2e322ec..e1fc4be 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,85 +1,78 @@ -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { - echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); + public function widget( $args, $instance ) { + global $g_obj_mci_footnotes; + // Reference container positioning is set to "widget area". + if ( 'widget' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + echo wp_kses_post( $g_obj_mci_footnotes->a_obj_task->Reference_Container() ); } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 3a27477..90fb108 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,83 +1,89 @@ -getContent(); + public static function new_plain_text_editor_button() { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'editor-button' ); + echo wp_kses_post( $l_obj_template->get_content() ); } /** * Includes the Plugins WYSIWYG editor script. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Plugins Scripts to be included to the editor. + * @param array $p_arr_plugins Scripts to be included to the editor. * @return array */ - public static function includeScripts($p_arr_Plugins) { - $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); - return $p_arr_Plugins; + public static function include_scripts( $p_arr_plugins ) { + $p_arr_plugins[ MCI_Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor.js', __FILE__ ); + return $p_arr_plugins; } /** * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. * Returns an JSON encoded array with the Footnotes start and end short code. * - * @author Stefan Herndler * @since 1.5.0 */ - public static function ajaxCallback() { - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + public static function ajax_callback() { + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); + echo wp_json_encode( + array( + 'start' => htmlspecialchars( $l_str_starting_tag ), + 'end' => htmlspecialchars( $l_str_ending_tag ), + ) + ); exit; } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..85ecd48 --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "wp-coding-standards/wpcs": "^2.3" + }, + "scripts": { + "post-install-cmd": [ + "bash _tools/setup.sh" + ] + } +} diff --git a/contrib/pre-commit b/contrib/pre-commit new file mode 100644 index 0000000..0dc792f --- /dev/null +++ b/contrib/pre-commit @@ -0,0 +1,61 @@ +#!/bin/sh + +# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook +# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ + +PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` +STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` + +# Determine if a file list is passed +if [ "$#" -eq 1 ] +then + oIFS=$IFS + IFS=' + ' + SFILES="$1" + IFS=$oIFS +fi +SFILES=${SFILES:-$STAGED_FILES_CMD} + +echo "Checking PHP Lint..." +for FILE in $SFILES +do + php -l -d display_errors=0 $PROJECT/$FILE + if [ $? != 0 ] + then + echo "Fix the error before commit." + exit 1 + fi + FILES="$FILES $PROJECT/$FILE" +done + +if [ -f "$PROJECT/phpcs.ruleset.xml" ] +then + RULESET="$PROJECT/phpcs.ruleset.xml" +elif [ -f "$PROJECT/phpcs.xml.dist" ] +then + RULESET="$PROJECT/phpcs.xml.dist" +else + RULESET="WordPress" +fi + +if [ "$FILES" != "" ] +then + echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Coding standards errors have been detected. Running phpcbf..." + ./vendor/bin/phpcbf --standard="$RULESET" --encoding=utf-8 -n -p $FILES + git add $FILES + echo "Running Code Sniffer again..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Errors found not fixable automatically. You need to manually fix them." + exit 1 + fi + fi +fi + +exit $? diff --git a/footnotes.php b/footnotes.php index e05f2d9..a03d37a 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,14 +1,17 @@ -run(); +// Initialize the Plugin. +$g_obj_mci_footnotes = new MCI_Footnotes(); +// Run the Plugin. +$g_obj_mci_footnotes->run(); /** * Sets the stylesheet enqueuing mode for production. - * + * * @since 2.5.5 * @var bool * @see class/init.php - * + * * In production, a minified CSS file tailored to the settings is enqueued. - * + * * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. - */ + */ define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index 732cfb9..9501097 100644 --- a/includes.php +++ b/includes.php @@ -3,36 +3,37 @@ * Includes all common files. * * @filesource - * @author Stefan Herndler + * @package footnotes * @since 1.5.0 14.09.14 13:40 */ /** - * Requires (require_once) all *.php files inside a specific Directory. + * Requires (`require_once`) all `*.php` files inside a specific Directory. * * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Directory Absolute Directory path to lookup for *.php files + * @param string $p_str_directory Absolute Directory path to lookup for `*.php` files. */ -function MCI_Footnotes_requirePhpFiles($p_str_Directory) { - // append slash at the end of the Directory if not exist - if (substr($p_str_Directory, -1) != "/") { - $p_str_Directory .= "/"; - +function mci_footnotes_require_php_files( $p_str_directory ) { + // Append slash at the end of the Directory if not exist. + if ( '/' !== substr( $p_str_directory, -1 ) ) { + $p_str_directory .= '/'; } - // get all PHP files inside Directory - $l_arr_Files = scandir($p_str_Directory); - // iterate through each class - foreach ($l_arr_Files as $l_str_FileName) { - // skip all non *.php files - if (strtolower(substr($l_str_FileName, -4)) != ".php") { + // Get all PHP files inside Directory. + $l_arr_files = scandir( $p_str_directory ); + // Iterate through each class. + foreach ( $l_arr_files as $l_str_file_name ) { + // Skip all non-PHP files. + if ( '.php' !== strtolower( substr( $l_str_file_name, -4 ) ) ) { continue; } + // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIncludeInspection */ - require_once($p_str_Directory . $l_str_FileName); + require_once $p_str_directory . $l_str_file_name; + // phpcs:enable } } -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets"); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/layout' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/widgets' ); diff --git a/readme.txt b/readme.txt index 82e80f3..766ed9d 100755 --- a/readme.txt +++ b/readme.txt @@ -1,10 +1,10 @@ === footnotes === -Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges +Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 -Stable Tag: 2.5.5 +Stable Tag: 2.5.6 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,7 +80,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.5.6 = - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. +- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. = 2.5.5 = - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 91fc1e4..03ad002 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -54,7 +54,7 @@ type: 'POST', url: '/wp-admin/admin-ajax.php', data: { - action: 'footnotes_getPluginInfo', + action: 'footnotes_get_plugin_info', plugin: '[[plugin-name]]' }, dataType: 'json', From 4736f19b365fe869d65eb4877c47a4baa72095c1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:45:57 +0000 Subject: [PATCH 021/144] Rename dashboard files --- class/dashboard/{layout.php => abstract-engine.php} | 0 class/dashboard/{subpage-diagnostics.php => diagnostics.php} | 0 class/dashboard/{subpage-main.php => settings.php} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename class/dashboard/{layout.php => abstract-engine.php} (100%) rename class/dashboard/{subpage-diagnostics.php => diagnostics.php} (100%) rename class/dashboard/{subpage-main.php => settings.php} (100%) diff --git a/class/dashboard/layout.php b/class/dashboard/abstract-engine.php similarity index 100% rename from class/dashboard/layout.php rename to class/dashboard/abstract-engine.php diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/diagnostics.php similarity index 100% rename from class/dashboard/subpage-diagnostics.php rename to class/dashboard/diagnostics.php diff --git a/class/dashboard/subpage-main.php b/class/dashboard/settings.php similarity index 100% rename from class/dashboard/subpage-main.php rename to class/dashboard/settings.php From adb2ccbc32f5e07fee5fe0861ab75cc388727648 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:47:39 +0000 Subject: [PATCH 022/144] Add temp file --- class/layout/foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 class/layout/foo diff --git a/class/layout/foo b/class/layout/foo new file mode 100644 index 0000000..e69de29 From 8ff0d9ee863a2371a1cdaef0be87b93c1dd79073 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:48:21 +0000 Subject: [PATCH 023/144] Rename `dashboard/` to `layout/`. --- class/{dashboard => layout}/abstract-engine.php | 0 class/{dashboard => layout}/diagnostics.php | 0 class/layout/foo | 0 class/{dashboard => layout}/init.php | 0 class/{dashboard => layout}/settings.php | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename class/{dashboard => layout}/abstract-engine.php (100%) rename class/{dashboard => layout}/diagnostics.php (100%) delete mode 100644 class/layout/foo rename class/{dashboard => layout}/init.php (100%) rename class/{dashboard => layout}/settings.php (100%) diff --git a/class/dashboard/abstract-engine.php b/class/layout/abstract-engine.php similarity index 100% rename from class/dashboard/abstract-engine.php rename to class/layout/abstract-engine.php diff --git a/class/dashboard/diagnostics.php b/class/layout/diagnostics.php similarity index 100% rename from class/dashboard/diagnostics.php rename to class/layout/diagnostics.php diff --git a/class/layout/foo b/class/layout/foo deleted file mode 100644 index e69de29..0000000 diff --git a/class/dashboard/init.php b/class/layout/init.php similarity index 100% rename from class/dashboard/init.php rename to class/layout/init.php diff --git a/class/dashboard/settings.php b/class/layout/settings.php similarity index 100% rename from class/dashboard/settings.php rename to class/layout/settings.php From df6bd2c28232ee21b309d36f244daa6ccad48e6d Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:48:53 +0000 Subject: [PATCH 024/144] Update layout files --- class/layout/abstract-engine.php | 494 +++++------ class/layout/diagnostics.php | 122 +-- class/layout/init.php | 198 ++--- class/layout/settings.php | 1416 +++++++++++++++--------------- 4 files changed, 1125 insertions(+), 1105 deletions(-) diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index d16ad8b..065f563 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -1,12 +1,10 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); + protected function add_section( $p_str_id, $p_str_title, $p_int_settings_container_index, $p_bool_has_submit_button = true ) { + return array( + 'id' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_id, + 'title' => $p_str_title, + 'submit' => $p_bool_has_submit_button, + 'container' => $p_int_settings_container_index, + ); } /** * Returns an array describing a meta box. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SectionID Parent Section ID. - * @param string $p_str_ID Unique ID suffix. - * @param string $p_str_Title Title for the meta box. - * @param string $p_str_CallbackFunctionName Class method name for callback. + * @param string $p_str_section_id Parent Section ID. + * @param string $p_str_id Unique ID suffix. + * @param string $p_str_title Title for the meta box. + * @param string $p_str_callback_function_name Class method name for callback. * @return array meta box description to be able to append a meta box to the output. */ - protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { + protected function add_meta_box( $p_str_section_id, $p_str_id, $p_str_title, $p_str_callback_function_name ) { return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, - "callback" => $p_str_CallbackFunctionName + 'parent' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_section_id, + 'id' => $p_str_id, + 'title' => $p_str_title, + 'callback' => $p_str_callback_function_name, ); } /** * Registers a sub page. * - * @author Stefan Herndler * @since 1.5.0 */ - public function registerSubPage() { + public function register_sub_page() { global $submenu; - // any sub menu for our main menu exists - if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { - // iterate through all sub menu entries of the ManFisher main menu - foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { - if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { - // remove that sub menu and add it again to move it to the bottom - remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); + + if ( array_key_exists( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ), $submenu ) ) { + foreach ( $submenu[ plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ) ] as $l_arr_sub_menu ) { + if ( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ) === $l_arr_sub_menu[2] ) { + remove_submenu_page( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ); } } } - $this->a_str_SubPageHook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug - $this->getSubPageTitle(), // page title - $this->getSubPageTitle(), // menu title - 'manage_options', // capability - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug - array($this, 'displayContent') // function + $this->a_str_sub_page_hook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, + $this->get_sub_page_title(), + $this->get_sub_page_title(), + 'manage_options', + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), + array( $this, 'display_content' ) ); } /** * Registers all sections for a sub page. * - * @author Stefan Herndler * @since 1.5.0 */ - public function registerSections() { - // iterate through each section - foreach($this->getSections() as $l_arr_Section) { - // append tab to the tab-array - $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; + public function register_sections() { + foreach ( $this->get_sections() as $l_arr_section ) { + // Append tab to the tab-array. + $this->a_arr_sections[ $l_arr_section['id'] ] = $l_arr_section; add_settings_section( - $l_arr_Section["id"], // unique id - "", //$l_arr_Section["title"], // title - array($this, 'Description'), // callback function for the description - $l_arr_Section["id"] // parent sub page slug + $l_arr_section['id'], + '', + array( $this, 'Description' ), + $l_arr_section['id'] ); - $this->registerMetaBoxes($l_arr_Section["id"]); + $this->register_meta_boxes( $l_arr_section['id'] ); } } /** * Registers all Meta boxes for a sub page. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_ParentID Parent section unique id. + * @param string $p_str_parent_id Parent section unique id. */ - private function registerMetaBoxes($p_str_ParentID) { - // iterate through each meta box - foreach($this->getMetaBoxes() as $l_arr_MetaBox) { - if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { + private function register_meta_boxes( $p_str_parent_id ) { + // Iterate through each meta box. + foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) { + if ( $p_str_parent_id !== $l_arr_meta_box['parent'] ) { continue; } add_meta_box( - $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id - $l_arr_MetaBox["title"], // meta box title - array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content - $p_str_ParentID, // post type = parent section id - 'main' // context + $p_str_parent_id . '-' . $l_arr_meta_box['id'], + $l_arr_meta_box['title'], + array( $this, $l_arr_meta_box['callback'] ), + $p_str_parent_id, + 'main' ); } } @@ -199,17 +185,12 @@ abstract class MCI_Footnotes_LayoutEngine { /** * Append javascript and css files for specific sub page. * - * @author Stefan Herndler * @since 1.5.0 */ - private function appendScripts() { - // enable meta boxes layout and close functionality - wp_enqueue_script('postbox'); - // add WordPress color picker layout - wp_enqueue_style('wp-color-picker'); - // add WordPress color picker function - wp_enqueue_script('wp-color-picker'); - + private function append_scripts() { + wp_enqueue_script( 'postbox' ); + wp_enqueue_style( 'wp-color-picker' ); + wp_enqueue_script( 'wp-color-picker' ); /** * Registers and enqueues the dashboard stylesheet. @@ -239,314 +220,337 @@ abstract class MCI_Footnotes_LayoutEngine { } - wp_enqueue_style('mci-footnotes-admin'); + wp_enqueue_style( 'mci-footnotes-admin' ); } /** * Displays the content of specific sub page. * - * @author Stefan Herndler * @since 1.5.0 */ - public function displayContent() { - // register and enqueue scripts and styling - $this->appendScripts(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - // store settings - $l_bool_SettingsUpdated = false; - if (array_key_exists("save-settings", $_POST)) { - if ($_POST["save-settings"] == "save") { - unset($_POST["save-settings"]); - unset($_POST["submit"]); - $l_bool_SettingsUpdated = $this->saveSettings(); + public function display_content() { + $this->append_scripts(); + + // TODO: add nonce verification. + + // Get the current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_option( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + // Store settings. + $l_bool_settings_updated = false; + if ( array_key_exists( 'save-settings', $_POST ) ) { + if ( 'save' === $_POST['save-settings'] ) { + unset( $_POST['save-settings'] ); + unset( $_POST['submit'] ); + $l_bool_settings_updated = $this->save_settings(); } } - // display all sections and highlight the active section + // Display all sections and highlight the active section. echo '
                                                                                                                                                                  '; echo '
                                                                                                                                                                  '; - if ($l_bool_SettingsUpdated) { - echo sprintf('
                                                                                                                                                                  %s
                                                                                                                                                                  ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + if ( $l_bool_settings_updated ) { + echo sprintf( '
                                                                                                                                                                  %s
                                                                                                                                                                  ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); } - // form to submit the active section + // Form to submit the active section. echo '
                                                                                                                                                                  '; - //settings_fields($l_arr_ActiveSection["container"]); echo ''; - // outputs the settings field of the active section - do_settings_sections($l_arr_ActiveSection["id"]); - do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); + // Outputs the settings field of the active section. + do_settings_sections( $l_arr_active_section['id'] ); + do_meta_boxes( $l_arr_active_section['id'], 'main', null ); - // add submit button to active section if defined - if ($l_arr_ActiveSection["submit"]) { + // Add submit button to active section if defined. + if ( $l_arr_active_section['submit'] ) { submit_button(); } - // close the form to submit data echo '
                                                                                                                                                                  '; - // close container for the settings page echo '
                                                                                                                                                                  '; - // output special javascript for the expand/collapse function of the meta boxes + + // Echo JavaScript for the expand/collapse function of the meta boxes. echo ''; } /** * Save all Plugin settings. * - * @author Stefan Herndler * @since 1.5.0 * @return bool */ - private function saveSettings() { - $l_arr_newSettings = array(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + private function save_settings() { + $l_arr_new_settings = array(); - // iterate through each value that has to be in the specific container - foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { - // setting is available in the POST array, use it - if (array_key_exists($l_str_Key, $_POST)) { - $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; + // TODO: add nonce verification. + + // Get current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_option( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { + if ( array_key_exists( $l_str_key, $_POST ) ) { + $l_arr_new_settings[ $l_str_key ] = sanitize_option( wp_unslash( $_POST[ $l_str_key ] ) ); } else { - // setting is not defined in the POST array, define it to avoid the Default value - $l_arr_newSettings[$l_str_Key] = ""; + // Setting is not defined in the POST array, define it to avoid the Default value. + $l_arr_new_settings[ $l_str_key ] = ''; } } - // update settings - return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); + // Update settings. + return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); } /** * Output the Description of a section. May be overwritten in any section. * - * @author Stefan Herndler * @since 1.5.0 */ - public function Description() { - // default no description will be displayed + public function description() { + // Default no description will be displayed. } /** * Loads specific setting and returns an array with the keys [id, name, value]. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingKeyName Settings Array key name. + * @param string $p_str_setting_key_name Settings Array key name. * @return array Contains Settings ID, Settings Name and Settings Value. */ - protected function LoadSetting($p_str_SettingKeyName) { - // get current section - reset($this->a_arr_Sections); - $p_arr_Return = array(); - $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); - return $p_arr_Return; + protected function load_setting( $p_str_setting_key_name ) { + // Get current section. + reset( $this->a_arr_sections ); + $p_arr_return = array(); + $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); + return $p_arr_return; } /** * Returns a line break to start a new line. * - * @author Stefan Herndler * @since 1.5.0 * @return string */ - protected function addNewline() { + protected function add_newline() { return '
                                                                                                                                                                  '; } /** * Returns a line break to have a space between two lines. * - * @author Stefan Herndler * @since 1.5.0 * @return string */ - protected function addLineSpace() { + protected function add_line_space() { return '

                                                                                                                                                                  '; } /** * Returns a simple text inside html text. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Text Message to be surrounded with simple html tag (span). + * @param string $p_str_text Message to be surrounded with simple html tag (span). * @return string */ - protected function addText($p_str_Text) { - return sprintf('%s', $p_str_Text); + protected function add_text( $p_str_text ) { + return sprintf( '%s', $p_str_text ); } /** * Returns the html tag for an input/select label. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_Caption Label caption. + * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_caption Label caption. * @return string - * - * Edited 2020-12-01T0159+0100.. - * @since 2.1.6 no colon */ - protected function addLabel($p_str_SettingName, $p_str_Caption) { - if (empty($p_str_Caption)) { - return ""; + protected function add_label( $p_str_setting_name, $p_str_caption ) { + if ( empty( $p_str_caption ) ) { + return ''; } - // remove the colon causing localization issues with French, - // and with languages not using punctuation at all, - // and with languages using other punctuation marks instead of colon, - // e.g. Greek using a raised dot. - // In French, colon is preceded by a space, forcibly non-breaking, - // and narrow per new school. - // Add colon to label strings for inclusion in localization. - // Colon after label is widely preferred best practice, mandatory per style guides. - // - return sprintf('', $p_str_SettingName, $p_str_Caption); - // ^ here deleted colon 2020-12-08T1546+0100 + + /* + * Remove the colon causing localization issues with French, and with + * languages not using punctuation at all, and with languages using other + * punctuation marks instead of colon, e.g. Greek using a raised dot. + * In French, colon is preceded by a space, forcibly non-breaking, and + * narrow per new school. + * Add colon to label strings for inclusion in localization. Colon after + * label is widely preferred best practice, mandatory per + * [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui). + */ + return sprintf( '', $p_str_setting_name, $p_str_caption ); } /** * Returns the html tag for an input [type = text]. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. - * @param bool $p_bool_Readonly Set the input to be read only, default false. - * @param bool $p_bool_Hidden Set the input to be hidden, default false. + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_str_max_length Maximum length of the input, default 999 characters. + * @param bool $p_bool_readonly Set the input to be read only, default false. + * @param bool $p_bool_hidden Set the input to be hidden, default false. * @return string */ - protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { - $l_str_Style = ""; - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - if ($p_bool_Hidden) { - $l_str_Style .= 'display:none;'; + protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) { + $l_str_style = ''; + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + if ( $p_bool_hidden ) { + $l_str_style .= 'display:none;'; } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, - $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $p_str_max_length, + $l_str_style, + $l_arr_data['value'], + $p_bool_readonly ? 'readonly="readonly"' : '' + ); } /** * Returns the html tag for an input [type = checkbox]. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. * @return string */ - protected function addCheckbox($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], - MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); + protected function add_checkbox( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : '' + ); } /** * Returns the html tag for a select box. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre select the current value. - * @param array $p_arr_Options Possible options to be selected. + * @param string $p_str_setting_name Name of the Settings key to pre select the current value. + * @param array $p_arr_options Possible options to be selected. * @return string */ - protected function addSelectBox($p_str_SettingName, $p_arr_Options) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - $l_str_Options = ""; + protected function add_select_box( $p_str_setting_name, $p_arr_options ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + $l_str_options = ''; - /* loop through all array keys */ - foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { - $l_str_Options .= sprintf('', - $l_str_Value, - $l_arr_Data["value"] == $l_str_Value ? "selected" : "", - $l_str_Caption); + foreach ( $p_arr_options as $l_str_value => $l_str_caption ) { + $l_str_options .= sprintf( + '', + $l_str_value, + $l_str_value === $l_arr_data['value'] ? 'selected' : '', + $l_str_caption + ); } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_options + ); } /** * Returns the html tag for a text area. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. + * @param string $p_str_setting_name Name of the Settings key to pre fill the text area. * @return string */ - protected function addTextArea($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + protected function add_textarea( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); } /** * Returns the html tag for an input [type = text] with color selection class. * - * @author Stefan Herndler * @since 1.5.6 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. * @return string */ - protected function addColorSelection($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + protected function add_color_selection( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); } /** * Returns the html tag for an input [type = num]. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_in_Min Minimum value. - * @param int $p_int_Max Maximum value. - * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_in_min Minimum value. + * @param int $p_int_max Maximum value. + * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). * @return string * * Edited: * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 */ - protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); + protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); - if ($p_bool_Deci) { - $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); + if ( $p_bool_deci ) { + $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_value, + $p_in_min, + $p_int_max + ); } else { - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'], + $p_in_min, + $p_int_max + ); } } -} // end of class +} diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php index 33f327a..55b37b6 100644 --- a/class/layout/diagnostics.php +++ b/class/layout/diagnostics.php @@ -1,140 +1,146 @@ -addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) + $this->add_section( 'diagnostics', __( 'Diagnostics', 'footnotes' ), null, false ), ); } /** * Returns an array of all registered meta boxes for each section of the sub page. * - * @author Stefan Herndler * @since 1.5.0 * @return array */ - protected function getMetaBoxes() { + protected function get_meta_boxes() { return array( - $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") + $this->add_meta_box( 'diagnostics', 'diagnostics', __( 'Displays information about the web server, PHP and WordPress', 'footnotes' ), 'Diagnostics' ), ); } /** * Displays a diagnostics about the web server, php and WordPress. * - * @author Stefan Herndler * @since 1.5.0 */ public function Diagnostics() { global $wp_version; - $l_str_PhpExtensions = ""; - // iterate through each PHP extension - foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { - if ($l_int_Index > 0) { - $l_str_PhpExtensions .= ' | '; + $l_str_php_extensions = ''; + // Iterate through each PHP extension. + foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) { + if ( $l_int_index > 0 ) { + $l_str_php_extensions .= ' | '; } - $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); + $l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension ); } - /** @var WP_Theme $l_obj_CurrentTheme */ - $l_obj_CurrentTheme = wp_get_theme(); + $l_obj_current_theme = wp_get_theme(); - $l_str_WordPressPlugins = ""; - // iterate through each installed WordPress Plugin - foreach (get_plugins() as $l_arr_Plugin) { - $l_str_WordPressPlugins .= '
                                                                                                                                                                  ' . $l_arr_Plugin["Name"] . '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '
                                                                                                                                                                  ' . $l_arr_plugin['Name'] . '' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                  ' . $l_arr_Plugin["Name"] . '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '
                                                                                                                                                                  ' . $l_arr_plugin['Name'] . '' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                  ' . $l_arr_Plugin["Name"] . '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '
                                                                                                                                                                  ' . $l_arr_plugin['Name'] . '' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                  + + + + + + + + + + + + +
                                                                                                                                                                  class/dashboard/subpage-main.php1
                                                                                                                                                                  class/language.php1
                                                                                                                                                                  class/settings.php1
                                                                                                                                                                  + + + +

                                                                                                                                                                  subpage-main.php

                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  TypeLineDescription
                                                                                                                                                                  ERROR0Tag "see" with body "@see templates/dashboard/customize-css.html + 2020-12-09T1113+0100" has error "\templates/dashboard/customize-css.html" is not a valid Fqsen.
                                                                                                                                                                  + +

                                                                                                                                                                  language.php

                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  TypeLineDescription
                                                                                                                                                                  ERROR0Tag "see" with body "@see wp-includes/l10n.php:857" has error "\wp-includes/l10n.php:857" is not a valid Fqsen.
                                                                                                                                                                  + +

                                                                                                                                                                  settings.php

                                                                                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                                                                                  TypeLineDescription
                                                                                                                                                                  ERROR0Tag "since" with body "@since ditched trimming whitespace from text box content in response to user request." has error
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Search results

                                                                                                                                                                  + +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + + + + + diff --git a/docs/reports/markers.html b/docs/reports/markers.html new file mode 100644 index 0000000..67e0a4e --- /dev/null +++ b/docs/reports/markers.html @@ -0,0 +1,128 @@ + + + + + Documentation » Markers + + + + + + + + + + + + + + + + +
                                                                                                                                                                    +

                                                                                                                                                                    Documentation

                                                                                                                                                                    + + + + + +
                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    + + + + +
                                                                                                                                                                    + + +
                                                                                                                                                                    +

                                                                                                                                                                    Markers

                                                                                                                                                                    + +

                                                                                                                                                                    Table of Contents

                                                                                                                                                                    + + + + + +
                                                                                                                                                                    class/settings.php1
                                                                                                                                                                    + + +

                                                                                                                                                                    settings.php

                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                    TypeLineDescription
                                                                                                                                                                    TODO89Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                    +

                                                                                                                                                                    Search results

                                                                                                                                                                    + +
                                                                                                                                                                    +
                                                                                                                                                                    +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + + +
                                                                                                                                                                      + + + + From 6d8c32fc636849b244c35bc52c5ace9f82a03c42 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:56:10 +0000 Subject: [PATCH 070/144] Add .phpdoc/ to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fdc234 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.phpdoc/ From 0f41f1a735053f91151ff773f0185799692b7ea9 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 07:52:09 +0000 Subject: [PATCH 071/144] Create LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 5eec0ed6d794ed5e2a99f63a4124ff0826d37a29 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:09:46 +0000 Subject: [PATCH 072/144] Create SECURITY.md --- SECURITY.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..67dd45e --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 2.x.x | :white_check_mark: | +| 1.x.x | :x: | + +## Reporting a Vulnerability + +To securely report a vulnerability, please DO NOT post on the WordPress +Support Forum or create an Issue on this repository. + +Please email [mark@cheret.de](mailto:mark@cheret.de) privately with the +full details of the vulnerability. From 0f222929416ebc670d2fca58170acd32f1785958 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:42:58 +0100 Subject: [PATCH 073/144] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ff05d5..70839f3 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. ## Getting Started From 9bce76c785ba21efa9dc68619710f6cde4027ce1 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:44:24 +0100 Subject: [PATCH 074/144] Update readme.txt update minor language. How do we keep the readme's in sync? --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 1a09e16..1d355b5 100755 --- a/readme.txt +++ b/readme.txt @@ -15,8 +15,8 @@ Cheers for the review, folks! https://www.youtube.com/watch?v=HzHaMAAJwbI -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. = Main Features = - Fully customizable **footnotes** start and end shortcodes; From 62979657160f2007018ac2a1dde201c886cc242f Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:41:13 +0100 Subject: [PATCH 075/144] Update README.md moved image due to repo change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70839f3..7444acd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![footnotes](https://raw.githubusercontent.com/media-competence-institute/footnotes/main/img/footnotes.png) +![footnotes](https://raw.githubusercontent.com/markcheret/footnotes/main/img/footnotes.png) # footnotes From 75f4287aa364383fc4fc8809c1076a23e6639a61 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:54:54 +0100 Subject: [PATCH 076/144] Update CONTRIBUTING.md --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73fa4de..d631099 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,19 @@ -footnotes welcomes contributions! +***footnotes*** welcomes contributions! Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: # Branching -- footnotes uses [GitHub Flow](https://githubflow.github.io/) +- ***footnotes*** uses [GitHub Flow](https://githubflow.github.io/) - branch off of `main` to start developing - give your new branch a descriptive name - when ready, submit a pull request to merge your branch with `main` # Commits -- footnotes uses [Conventional Commits](https://www.conventionalcommits.org) +- ***footnotes*** uses [Conventional Commits](https://www.conventionalcommits.org) - keep individual commits as small as possible # Versioning -- footnotes uses [Semantic Versioning](https://semver.org/) +- ***footnotes*** uses [Semantic Versioning](https://semver.org/) From 5c1884f059117f0e8466132d972031ddefef91c0 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 21 Feb 2021 13:58:08 +0100 Subject: [PATCH 077/144] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7444acd..8a4a9b6 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,19 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +***footnotes*** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. +***footnotes*** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. ## Getting Started 1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) 1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + and submit a [pull request](https://github.com/markcheret/footnotes/pulls). ## Checking WP Coding Standard Compliance @@ -39,13 +39,13 @@ Unit tests are TODO. ## Main Features -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Fully customizable ***footnotes*** start and end shortcodes; +- Styled tooltips supporting hyperlinks display ***footnotes*** or a dedicated text; - Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; +- Display the ***footnotes*** *Reference Container* inside a Widget; - Wide choice of numbering styles; - Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Configure the ***footnotes'*** appearance by dashboard settings and Custom CSS style rules; - Button in both the Visual and the Text editor to add shortcodes around selection. ## Example Usage @@ -63,4 +63,4 @@ The current version is available on the [WordPress.org Plugin Directory](https:/ ## Acknowledgements -Huge thanks to every footnotes user, contributor, bug reporter, feature requester and fan! +Huge thanks to every ***footnotes user***, contributor, bug reporter, feature requester and fan! From 04d1bb390b1f576dc37c82420406afcaea126371 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 13:53:51 +0000 Subject: [PATCH 078/144] Alter formatting, add contribution information --- CONTRIBUTING.md | 36 +++++++++++++++++++++++++++--------- README.md | 14 +++++++------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d631099..5802338 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,37 @@ -***footnotes*** welcomes contributions! +**footnotes** welcomes contributions! -Please follow these guidelines when contributing, as it will give your pull request the best chance of being accepted: +Please follow these guidelines when contributing, as it will give your pull +request the best chance of being accepted: -# Branching +# Requesting Features/Reporting Bugs -- ***footnotes*** uses [GitHub Flow](https://githubflow.github.io/) -- branch off of `main` to start developing -- give your new branch a descriptive name -- when ready, submit a pull request to merge your branch with `main` +- To request a new feature or to report a bug, create an + [Issue](https://github.com/markcheret/footnotes/issues/new/choose) and choose + the correct template + +# Contributing Code + +- **footnotes** uses [GitHub Flow](https://githubflow.github.io/) +- branch off of `main` to start developing (`git checkout -b `) +- ensure that your new branch has a descriptive name +- create a remote copy of your new branch (`git push`) +- create a draft [pull request](https://github.com/markcheret/footnotes/compare) + to merge your branch with `main` — tag any related Issues, and if they are + assigned to a Project board, this will automatically move them into the + ‘In Progress’ bucket +- when you think you're finished, un-draft your pull request — if the PR is + assigned to a Project board, this will automatically move it and any related + Issues into the ‘Review in progress’ bucket # Commits -- ***footnotes*** uses [Conventional Commits](https://www.conventionalcommits.org) +- **footnotes** uses [Conventional Commits](https://www.conventionalcommits.org) - keep individual commits as small as possible # Versioning -- ***footnotes*** uses [Semantic Versioning](https://semver.org/) +- **footnotes** uses [Semantic Versioning](https://semver.org/) + +# Translating + +- Translations are welcome! diff --git a/README.md b/README.md index 8a4a9b6..e0e67da 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -***footnotes*** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. -***footnotes*** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. ## Getting Started @@ -39,13 +39,13 @@ Unit tests are TODO. ## Main Features -- Fully customizable ***footnotes*** start and end shortcodes; -- Styled tooltips supporting hyperlinks display ***footnotes*** or a dedicated text; +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; - Responsive *Reference Container* at the end or positioned by shortcode; -- Display the ***footnotes*** *Reference Container* inside a Widget; +- Display the **footnotes** *Reference Container* inside a Widget; - Wide choice of numbering styles; - Freely configurable and optional backlink symbol; -- Configure the ***footnotes'*** appearance by dashboard settings and Custom CSS style rules; +- Configure the **footnotes'** appearance by dashboard settings and Custom CSS style rules; - Button in both the Visual and the Text editor to add shortcodes around selection. ## Example Usage @@ -63,4 +63,4 @@ The current version is available on the [WordPress.org Plugin Directory](https:/ ## Acknowledgements -Huge thanks to every ***footnotes user***, contributor, bug reporter, feature requester and fan! +Huge thanks to every **footnotes user**, contributor, bug reporter, feature requester and fan! From cf3616f65c228bbeab79aea72c9533e11561668a Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 13:55:22 +0000 Subject: [PATCH 079/144] Fix indentation --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5802338..83e6a64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ request the best chance of being accepted: - To request a new feature or to report a bug, create an [Issue](https://github.com/markcheret/footnotes/issues/new/choose) and choose - the correct template + the correct template # Contributing Code @@ -17,11 +17,11 @@ request the best chance of being accepted: - create a remote copy of your new branch (`git push`) - create a draft [pull request](https://github.com/markcheret/footnotes/compare) to merge your branch with `main` — tag any related Issues, and if they are - assigned to a Project board, this will automatically move them into the - ‘In Progress’ bucket + assigned to a Project board, this will automatically move them into the + ‘In Progress’ bucket - when you think you're finished, un-draft your pull request — if the PR is - assigned to a Project board, this will automatically move it and any related - Issues into the ‘Review in progress’ bucket + assigned to a Project board, this will automatically move it and any related + Issues into the ‘Review in progress’ bucket # Commits From 8d0ebdb8595ab698c50996bc268bcabae928294d Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:00:59 +0000 Subject: [PATCH 080/144] Append line endings --- class/config.php | 166 +- class/convert.php | 458 +- class/dashboard/init.php | 424 +- class/dashboard/layout.php | 1104 ++-- class/dashboard/subpage-diagnostics.php | 278 +- class/dashboard/subpage-main.php | 2364 ++++----- class/hooks.php | 188 +- class/init.php | 746 +-- class/language.php | 216 +- class/settings.php | 2506 ++++----- class/task.php | 4708 ++++++++--------- class/template.php | 522 +- class/widgets/base.php | 176 +- class/widgets/reference-container.php | 170 +- class/wysiwyg.php | 164 +- css/dev-common.css | 1182 ++--- css/dev-tooltips-alternative.css | 126 +- css/dev-tooltips.css | 116 +- css/settings.css | 564 +- features.txt | 38 +- footnotes.php | 148 +- includes.php | 75 +- js/wysiwyg-editor.js | 158 +- license.txt | 1346 ++--- readme.txt | 1250 ++--- .../dashboard/customize-css-migration.html | 36 +- templates/dashboard/customize-css-new.html | 66 +- templates/dashboard/customize-css.html | 22 +- .../dashboard/customize-hyperlink-arrow.html | 30 +- .../dashboard/customize-superscript.html | 48 +- templates/dashboard/diagnostics.html | 74 +- templates/dashboard/editor-button.html | 124 +- templates/dashboard/expert-lookup.html | 100 +- templates/dashboard/how-to-donate.html | 2 +- templates/dashboard/how-to-help.html | 32 +- templates/dashboard/manfisher.html | 20 +- .../dashboard/mouse-over-box-appearance.html | 64 +- .../dashboard/mouse-over-box-dimensions.html | 16 +- .../dashboard/mouse-over-box-display.html | 30 +- .../dashboard/mouse-over-box-position.html | 32 +- templates/dashboard/mouse-over-box-text.html | 44 +- .../dashboard/mouse-over-box-timing.html | 40 +- .../dashboard/mouse-over-box-truncation.html | 32 +- templates/dashboard/other-plugins.html | 182 +- templates/dashboard/settings-excerpts.html | 22 +- templates/dashboard/settings-love.html | 24 +- templates/dashboard/settings-numbering.html | 30 +- .../settings-reference-container.html | 234 +- templates/dashboard/settings-scrolling.html | 72 +- templates/dashboard/settings-start-end.html | 126 +- templates/public/footnote-alternative.html | 48 +- templates/public/footnote.html | 40 +- templates/public/js-reference-container.html | 176 +- .../reference-container-body-3column.html | 58 +- .../reference-container-body-combi.html | 28 +- .../reference-container-body-switch.html | 38 +- .../public/reference-container-body.html | 48 +- templates/public/reference-container.html | 166 +- templates/public/tooltip.html | 36 +- 59 files changed, 10667 insertions(+), 10666 deletions(-) diff --git a/class/config.php b/class/config.php index cb9b7bd..98a3245 100644 --- a/class/config.php +++ b/class/config.php @@ -1,83 +1,83 @@ -foot
                                                                                                                                                                      '; - - /** - * Public Plugin name for dashboard heading - * - * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not - * the last line. That ugly display bug badly affected the plugin’s communication. - * The only working solution found so far is using position:fixed in one heading - * that isn’t translated, and dropping the logo in another, translatable heading. - * - * @since 2.0.4 - * @var string - */ - const C_STR_PLUGIN_HEADING_NAME = 'footnotes'; - - /** - * Html tag for the LOVE symbol. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var string - */ - const C_STR_LOVE_SYMBOL = ''; - - /** - * HTML code for the 'love' symbol used in dashboard heading - * - * @since 2.0.4 - * @var string - */ - const C_STR_LOVE_SYMBOL_HEADING = ''; - - /** - * Short code to DON'T display the 'LOVE ME' slug on certain pages. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var string - */ - const C_STR_NO_LOVE_SLUG = '[[no footnotes: love]]'; -} +foot'; + + /** + * Public Plugin name for dashboard heading + * + * After properly displaying in dashboard headings until WPv5.4, the above started + * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * the last line. That ugly display bug badly affected the plugin’s communication. + * The only working solution found so far is using position:fixed in one heading + * that isn’t translated, and dropping the logo in another, translatable heading. + * + * @since 2.0.4 + * @var string + */ + const C_STR_PLUGIN_HEADING_NAME = 'footnotes'; + + /** + * Html tag for the LOVE symbol. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var string + */ + const C_STR_LOVE_SYMBOL = ''; + + /** + * HTML code for the 'love' symbol used in dashboard heading + * + * @since 2.0.4 + * @var string + */ + const C_STR_LOVE_SYMBOL_HEADING = ''; + + /** + * Short code to DON'T display the 'LOVE ME' slug on certain pages. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var string + */ + const C_STR_NO_LOVE_SLUG = '[[no footnotes: love]]'; +} diff --git a/class/convert.php b/class/convert.php index 767d25c..e1823ad 100644 --- a/class/convert.php +++ b/class/convert.php @@ -1,229 +1,229 @@ - 26) { - // increase offset and reduce counter - $l_int_Offset++; - $p_int_Value -= 26; - } - // if offset set (more then Z), then add a new letter in front - if ($l_int_Offset > 0) { - $l_str_Return = chr($l_int_Offset + 64); - } - // add the origin letter - $l_str_Return .= chr($p_int_Value + 64); - // return the latin character representing the integer - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); - } - return strtolower($l_str_Return); - } - - /** - * Converts an integer to a leading-0 integer. - * - * @author Stefan Herndler - * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @return string Value with a leading zero. - */ - private static function toArabicLeading($p_int_Value) { - // add a leading 0 if number lower then 10 - if ($p_int_Value < 10) { - return "0" . $p_int_Value; - } - return $p_int_Value; - } - - /** - * Converts an integer to a romanic letter. - * - * @author Stefan Herndler - * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @return string - * - * Edited: - * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 - */ - private static function toRomanic($p_int_Value, $p_bool_UpperCase) { - // table containing all necessary romanic letters - $l_arr_RomanicLetters = array( - 'M' => 1000, - 'CM' => 900, - 'D' => 500, - 'CD' => 400, - 'C' => 100, - 'XC' => 90, - 'L' => 50, - 'XL' => 40, - 'X' => 10, - 'IX' => 9, - 'V' => 5, - 'IV' => 4, - 'I' => 1 - ); - // return value - $l_str_Return = ''; - // iterate through integer value until it is reduced to 0 - while ($p_int_Value > 0) { - foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { - if ($p_int_Value >= $l_int_Arabic) { - $p_int_Value -= $l_int_Arabic; - $l_str_Return .= $l_str_Romanic; - break; - } - } - } - // return romanic letters as string - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); - } - return strtolower($l_str_Return); - } - - /** - * Converts a string depending on its value to a boolean. - * - * @author Stefan Herndler - * @since 1.0-beta - * @param string $p_str_Value String to be converted to boolean. - * @return bool Boolean representing the string. - */ - public static function toBool($p_str_Value) { - // convert string to lower-case to make it easier - $p_str_Value = strtolower($p_str_Value); - // check if string seems to contain a "true" value - switch ($p_str_Value) { - case "checked": - case "yes": - case "true": - case "on": - case "1": - return true; - } - // nothing found that says "true", so we return false - return false; - } - - /** - * Get a html Array short code depending on Arrow-Array key index. - * - * @author Stefan Herndler - * @since 1.3.2 - * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. - * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. - */ - public static function getArrow($p_int_Index = -1) { - // define all possible arrows - $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); - // convert index to an integer - if (!is_int($p_int_Index)) { - $p_int_Index = intval($p_int_Index); - } - // return the whole arrow array - if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { - return $l_arr_Arrows; - } - // return a single arrow - return $l_arr_Arrows[$p_int_Index]; - } - - /** - * Displays a Variable. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param mixed $p_mixed_Value - */ - public static function debug($p_mixed_Value) { - if (empty($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else if (is_array($p_mixed_Value)) { - printf("
                                                                                                                                                                      ");
                                                                                                                                                                      -			print_r($p_mixed_Value);
                                                                                                                                                                      -			printf("
                                                                                                                                                                      "); - - } else if (is_object($p_mixed_Value)) { - printf("
                                                                                                                                                                      ");
                                                                                                                                                                      -			print_r($p_mixed_Value);
                                                                                                                                                                      -			printf("
                                                                                                                                                                      "); - - } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else if (is_date($p_mixed_Value)) { - var_dump($p_mixed_Value); - - } else { - var_dump($p_mixed_Value); - } - echo "
                                                                                                                                                                      "; - } -} + 26) { + // increase offset and reduce counter + $l_int_Offset++; + $p_int_Value -= 26; + } + // if offset set (more then Z), then add a new letter in front + if ($l_int_Offset > 0) { + $l_str_Return = chr($l_int_Offset + 64); + } + // add the origin letter + $l_str_Return .= chr($p_int_Value + 64); + // return the latin character representing the integer + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); + } + return strtolower($l_str_Return); + } + + /** + * Converts an integer to a leading-0 integer. + * + * @author Stefan Herndler + * @since 1.0-gamma + * @param int $p_int_Value Value/Index to be converted. + * @return string Value with a leading zero. + */ + private static function toArabicLeading($p_int_Value) { + // add a leading 0 if number lower then 10 + if ($p_int_Value < 10) { + return "0" . $p_int_Value; + } + return $p_int_Value; + } + + /** + * Converts an integer to a romanic letter. + * + * @author Stefan Herndler + * @since 1.0-gamma + * @param int $p_int_Value Value/Index to be converted. + * @return string + * + * Edited: + * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 + */ + private static function toRomanic($p_int_Value, $p_bool_UpperCase) { + // table containing all necessary romanic letters + $l_arr_RomanicLetters = array( + 'M' => 1000, + 'CM' => 900, + 'D' => 500, + 'CD' => 400, + 'C' => 100, + 'XC' => 90, + 'L' => 50, + 'XL' => 40, + 'X' => 10, + 'IX' => 9, + 'V' => 5, + 'IV' => 4, + 'I' => 1 + ); + // return value + $l_str_Return = ''; + // iterate through integer value until it is reduced to 0 + while ($p_int_Value > 0) { + foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { + if ($p_int_Value >= $l_int_Arabic) { + $p_int_Value -= $l_int_Arabic; + $l_str_Return .= $l_str_Romanic; + break; + } + } + } + // return romanic letters as string + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); + } + return strtolower($l_str_Return); + } + + /** + * Converts a string depending on its value to a boolean. + * + * @author Stefan Herndler + * @since 1.0-beta + * @param string $p_str_Value String to be converted to boolean. + * @return bool Boolean representing the string. + */ + public static function toBool($p_str_Value) { + // convert string to lower-case to make it easier + $p_str_Value = strtolower($p_str_Value); + // check if string seems to contain a "true" value + switch ($p_str_Value) { + case "checked": + case "yes": + case "true": + case "on": + case "1": + return true; + } + // nothing found that says "true", so we return false + return false; + } + + /** + * Get a html Array short code depending on Arrow-Array key index. + * + * @author Stefan Herndler + * @since 1.3.2 + * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. + * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. + */ + public static function getArrow($p_int_Index = -1) { + // define all possible arrows + $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); + // convert index to an integer + if (!is_int($p_int_Index)) { + $p_int_Index = intval($p_int_Index); + } + // return the whole arrow array + if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { + return $l_arr_Arrows; + } + // return a single arrow + return $l_arr_Arrows[$p_int_Index]; + } + + /** + * Displays a Variable. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param mixed $p_mixed_Value + */ + public static function debug($p_mixed_Value) { + if (empty($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else if (is_array($p_mixed_Value)) { + printf("
                                                                                                                                                                      ");
                                                                                                                                                                      +			print_r($p_mixed_Value);
                                                                                                                                                                      +			printf("
                                                                                                                                                                      "); + + } else if (is_object($p_mixed_Value)) { + printf("
                                                                                                                                                                      ");
                                                                                                                                                                      +			print_r($p_mixed_Value);
                                                                                                                                                                      +			printf("
                                                                                                                                                                      "); + + } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else if (is_date($p_mixed_Value)) { + var_dump($p_mixed_Value); + + } else { + var_dump($p_mixed_Value); + } + echo "
                                                                                                                                                                      "; + } +} diff --git a/class/dashboard/init.php b/class/dashboard/init.php index 2adbbbf..b18e77c 100644 --- a/class/dashboard/init.php +++ b/class/dashboard/init.php @@ -1,212 +1,212 @@ -a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; - } - } - ksort($this->a_arr_SubPageClasses); - - // register hooks/actions - add_action('admin_init', array($this, 'initializeSettings')); - add_action('admin_menu', array($this, 'registerMainMenu')); - // register AJAX callbacks for Plugin information - add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function initializeSettings() { - MCI_Footnotes_Settings::instance()->RegisterSettings(); - // iterate though each sub class of the layout engine and register their sections - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @author Stefan Herndler - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function registerMainMenu() { - global $menu; - // iterate through each main menu - foreach($menu as $l_arr_MainMenu) { - // iterate through each main menu attribute - foreach($l_arr_MainMenu as $l_str_Attribute) { - // main menu already added, append sub pages and stop - if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { - $this->registerSubPages(); - return; - } - } - } - - // add a new main menu page to the WordPress dashboard - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title - self::C_STR_MAIN_MENU_TITLE, // menu title - 'manage_options', // capability - self::C_STR_MAIN_MENU_SLUG, // menu slug - array($this, "displayOtherPlugins"), // function - plugins_url('footnotes/img/main-menu.png'), // icon url - null // position - ); - $this->registerSubPages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function registerSubPages() { - // first registered sub menu page MUST NOT contain a unique slug suffix - // iterate though each sub class of the layout engine and register their sub page - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSubPage(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayOtherPlugins() { - printf("

                                                                                                                                                                      "); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); - echo $l_obj_Template->getContent(); - - printf('visit Mark Cheret'); - printf("

                                                                                                                                                                      "); - - printf(''); - } - - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function getPluginMetaInformation() { - // get plugin internal name from POST data - $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; - if (empty($l_str_PluginName)) { - echo json_encode(array("error" => "Plugin name invalid.")); - exit; - } - $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; - // call URL and collect data - $l_arr_Response = wp_remote_get($l_str_Url); - // check if response is valid - if (is_wp_error($l_arr_Response)) { - echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); - exit; - } - if (!array_key_exists("body", $l_arr_Response)) { - echo json_encode(array("error" => "Error reading WordPress API response message.")); - exit; - } - // get the body of the response - $l_str_Response = $l_arr_Response["body"]; - // get plugin object - $l_arr_Plugin = json_decode($l_str_Response, true); - if (empty($l_arr_Plugin)) { - echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                                                                                                      URL: " . $l_str_Url . "
                                                                                                                                                                      Response: " . $l_str_Response)); - exit; - } - - $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; - $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; - $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); - - // return Plugin information as JSON encoded string - echo json_encode( - array( - "error" => "", - "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", - "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", - "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", - "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", - "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", - "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", - "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", - "PluginRating" => $l_int_NumRatings, - "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", - "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" - ) - ); - exit; - } -} +a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; + } + } + ksort($this->a_arr_SubPageClasses); + + // register hooks/actions + add_action('admin_init', array($this, 'initializeSettings')); + add_action('admin_menu', array($this, 'registerMainMenu')); + // register AJAX callbacks for Plugin information + add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function initializeSettings() { + MCI_Footnotes_Settings::instance()->RegisterSettings(); + // iterate though each sub class of the layout engine and register their sections + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @author Stefan Herndler + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function registerMainMenu() { + global $menu; + // iterate through each main menu + foreach($menu as $l_arr_MainMenu) { + // iterate through each main menu attribute + foreach($l_arr_MainMenu as $l_str_Attribute) { + // main menu already added, append sub pages and stop + if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { + $this->registerSubPages(); + return; + } + } + } + + // add a new main menu page to the WordPress dashboard + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // page title + self::C_STR_MAIN_MENU_TITLE, // menu title + 'manage_options', // capability + self::C_STR_MAIN_MENU_SLUG, // menu slug + array($this, "displayOtherPlugins"), // function + plugins_url('footnotes/img/main-menu.png'), // icon url + null // position + ); + $this->registerSubPages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function registerSubPages() { + // first registered sub menu page MUST NOT contain a unique slug suffix + // iterate though each sub class of the layout engine and register their sub page + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSubPage(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayOtherPlugins() { + printf("

                                                                                                                                                                      "); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); + echo $l_obj_Template->getContent(); + + printf('visit Mark Cheret'); + printf("

                                                                                                                                                                      "); + + printf(''); + } + + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function getPluginMetaInformation() { + // get plugin internal name from POST data + $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; + if (empty($l_str_PluginName)) { + echo json_encode(array("error" => "Plugin name invalid.")); + exit; + } + $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; + // call URL and collect data + $l_arr_Response = wp_remote_get($l_str_Url); + // check if response is valid + if (is_wp_error($l_arr_Response)) { + echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); + exit; + } + if (!array_key_exists("body", $l_arr_Response)) { + echo json_encode(array("error" => "Error reading WordPress API response message.")); + exit; + } + // get the body of the response + $l_str_Response = $l_arr_Response["body"]; + // get plugin object + $l_arr_Plugin = json_decode($l_str_Response, true); + if (empty($l_arr_Plugin)) { + echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                                                                                                      URL: " . $l_str_Url . "
                                                                                                                                                                      Response: " . $l_str_Response)); + exit; + } + + $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; + $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; + $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); + + // return Plugin information as JSON encoded string + echo json_encode( + array( + "error" => "", + "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", + "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", + "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", + "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", + "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", + "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", + "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", + "PluginRating" => $l_int_NumRatings, + "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", + "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" + ) + ); + exit; + } +} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 57b63c9..d16ad8b 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -1,552 +1,552 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); - } - - /** - * Returns an array describing a meta box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SectionID Parent Section ID. - * @param string $p_str_ID Unique ID suffix. - * @param string $p_str_Title Title for the meta box. - * @param string $p_str_CallbackFunctionName Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { - return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, - "callback" => $p_str_CallbackFunctionName - ); - } - - /** - * Registers a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSubPage() { - global $submenu; - // any sub menu for our main menu exists - if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { - // iterate through all sub menu entries of the ManFisher main menu - foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { - if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { - // remove that sub menu and add it again to move it to the bottom - remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); - } - } - } - - $this->a_str_SubPageHook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug - $this->getSubPageTitle(), // page title - $this->getSubPageTitle(), // menu title - 'manage_options', // capability - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug - array($this, 'displayContent') // function - ); - } - - /** - * Registers all sections for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSections() { - // iterate through each section - foreach($this->getSections() as $l_arr_Section) { - // append tab to the tab-array - $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; - add_settings_section( - $l_arr_Section["id"], // unique id - "", //$l_arr_Section["title"], // title - array($this, 'Description'), // callback function for the description - $l_arr_Section["id"] // parent sub page slug - ); - $this->registerMetaBoxes($l_arr_Section["id"]); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_ParentID Parent section unique id. - */ - private function registerMetaBoxes($p_str_ParentID) { - // iterate through each meta box - foreach($this->getMetaBoxes() as $l_arr_MetaBox) { - if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { - continue; - } - add_meta_box( - $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id - $l_arr_MetaBox["title"], // meta box title - array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content - $p_str_ParentID, // post type = parent section id - 'main' // context - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function appendScripts() { - // enable meta boxes layout and close functionality - wp_enqueue_script('postbox'); - // add WordPress color picker layout - wp_enqueue_style('wp-color-picker'); - // add WordPress color picker function - wp_enqueue_script('wp-color-picker'); - - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style('mci-footnotes-admin'); - } - - /** - * Displays the content of specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayContent() { - // register and enqueue scripts and styling - $this->appendScripts(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - // store settings - $l_bool_SettingsUpdated = false; - if (array_key_exists("save-settings", $_POST)) { - if ($_POST["save-settings"] == "save") { - unset($_POST["save-settings"]); - unset($_POST["submit"]); - $l_bool_SettingsUpdated = $this->saveSettings(); - } - } - - // display all sections and highlight the active section - echo '
                                                                                                                                                                      '; - echo '
                                                                                                                                                                      '; - - if ($l_bool_SettingsUpdated) { - echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - } - - // form to submit the active section - echo '
                                                                                                                                                                      '; - //settings_fields($l_arr_ActiveSection["container"]); - echo ''; - // outputs the settings field of the active section - do_settings_sections($l_arr_ActiveSection["id"]); - do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); - - // add submit button to active section if defined - if ($l_arr_ActiveSection["submit"]) { - submit_button(); - } - // close the form to submit data - echo '
                                                                                                                                                                      '; - // close container for the settings page - echo '
                                                                                                                                                                      '; - // output special javascript for the expand/collapse function of the meta boxes - echo ''; - } - - /** - * Save all Plugin settings. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return bool - */ - private function saveSettings() { - $l_arr_newSettings = array(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - - // iterate through each value that has to be in the specific container - foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { - // setting is available in the POST array, use it - if (array_key_exists($l_str_Key, $_POST)) { - $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; - } else { - // setting is not defined in the POST array, define it to avoid the Default value - $l_arr_newSettings[$l_str_Key] = ""; - } - } - // update settings - return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); - } - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Description() { - // default no description will be displayed - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingKeyName Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function LoadSetting($p_str_SettingKeyName) { - // get current section - reset($this->a_arr_Sections); - $p_arr_Return = array(); - $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); - return $p_arr_Return; - } - - /** - * Returns a line break to start a new line. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addNewline() { - return '
                                                                                                                                                                      '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addLineSpace() { - return '

                                                                                                                                                                      '; - } - - /** - * Returns a simple text inside html text. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function addText($p_str_Text) { - return sprintf('%s', $p_str_Text); - } - - /** - * Returns the html tag for an input/select label. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_Caption Label caption. - * @return string - * - * Edited 2020-12-01T0159+0100.. - * @since 2.1.6 no colon - */ - protected function addLabel($p_str_SettingName, $p_str_Caption) { - if (empty($p_str_Caption)) { - return ""; - } - // remove the colon causing localization issues with French, - // and with languages not using punctuation at all, - // and with languages using other punctuation marks instead of colon, - // e.g. Greek using a raised dot. - // In French, colon is preceded by a space, forcibly non-breaking, - // and narrow per new school. - // Add colon to label strings for inclusion in localization. - // Colon after label is widely preferred best practice, mandatory per style guides. - // - return sprintf('', $p_str_SettingName, $p_str_Caption); - // ^ here deleted colon 2020-12-08T1546+0100 - } - - /** - * Returns the html tag for an input [type = text]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. - * @param bool $p_bool_Readonly Set the input to be read only, default false. - * @param bool $p_bool_Hidden Set the input to be hidden, default false. - * @return string - */ - protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { - $l_str_Style = ""; - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - if ($p_bool_Hidden) { - $l_str_Style .= 'display:none;'; - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, - $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addCheckbox($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], - MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); - } - - /** - * Returns the html tag for a select box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre select the current value. - * @param array $p_arr_Options Possible options to be selected. - * @return string - */ - protected function addSelectBox($p_str_SettingName, $p_arr_Options) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - $l_str_Options = ""; - - /* loop through all array keys */ - foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { - $l_str_Options .= sprintf('', - $l_str_Value, - $l_arr_Data["value"] == $l_str_Value ? "selected" : "", - $l_str_Caption); - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); - } - - /** - * Returns the html tag for a text area. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. - * @return string - */ - protected function addTextArea($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addColorSelection($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_in_Min Minimum value. - * @param int $p_int_Max Maximum value. - * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - - if ($p_bool_Deci) { - $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); - } else { - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); - } - } - -} // end of class + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); + } + + /** + * Returns an array describing a meta box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SectionID Parent Section ID. + * @param string $p_str_ID Unique ID suffix. + * @param string $p_str_Title Title for the meta box. + * @param string $p_str_CallbackFunctionName Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { + return array( + "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, + "id" => $p_str_ID, + "title" => $p_str_Title, + "callback" => $p_str_CallbackFunctionName + ); + } + + /** + * Registers a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSubPage() { + global $submenu; + // any sub menu for our main menu exists + if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { + // iterate through all sub menu entries of the ManFisher main menu + foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { + if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { + // remove that sub menu and add it again to move it to the bottom + remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); + } + } + } + + $this->a_str_SubPageHook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug + $this->getSubPageTitle(), // page title + $this->getSubPageTitle(), // menu title + 'manage_options', // capability + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug + array($this, 'displayContent') // function + ); + } + + /** + * Registers all sections for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSections() { + // iterate through each section + foreach($this->getSections() as $l_arr_Section) { + // append tab to the tab-array + $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; + add_settings_section( + $l_arr_Section["id"], // unique id + "", //$l_arr_Section["title"], // title + array($this, 'Description'), // callback function for the description + $l_arr_Section["id"] // parent sub page slug + ); + $this->registerMetaBoxes($l_arr_Section["id"]); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_ParentID Parent section unique id. + */ + private function registerMetaBoxes($p_str_ParentID) { + // iterate through each meta box + foreach($this->getMetaBoxes() as $l_arr_MetaBox) { + if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { + continue; + } + add_meta_box( + $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id + $l_arr_MetaBox["title"], // meta box title + array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content + $p_str_ParentID, // post type = parent section id + 'main' // context + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function appendScripts() { + // enable meta boxes layout and close functionality + wp_enqueue_script('postbox'); + // add WordPress color picker layout + wp_enqueue_style('wp-color-picker'); + // add WordPress color picker function + wp_enqueue_script('wp-color-picker'); + + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style('mci-footnotes-admin'); + } + + /** + * Displays the content of specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayContent() { + // register and enqueue scripts and styling + $this->appendScripts(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + // store settings + $l_bool_SettingsUpdated = false; + if (array_key_exists("save-settings", $_POST)) { + if ($_POST["save-settings"] == "save") { + unset($_POST["save-settings"]); + unset($_POST["submit"]); + $l_bool_SettingsUpdated = $this->saveSettings(); + } + } + + // display all sections and highlight the active section + echo '
                                                                                                                                                                      '; + echo '
                                                                                                                                                                      '; + + if ($l_bool_SettingsUpdated) { + echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + } + + // form to submit the active section + echo '
                                                                                                                                                                      '; + //settings_fields($l_arr_ActiveSection["container"]); + echo ''; + // outputs the settings field of the active section + do_settings_sections($l_arr_ActiveSection["id"]); + do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); + + // add submit button to active section if defined + if ($l_arr_ActiveSection["submit"]) { + submit_button(); + } + // close the form to submit data + echo '
                                                                                                                                                                      '; + // close container for the settings page + echo '
                                                                                                                                                                      '; + // output special javascript for the expand/collapse function of the meta boxes + echo ''; + } + + /** + * Save all Plugin settings. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return bool + */ + private function saveSettings() { + $l_arr_newSettings = array(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + + // iterate through each value that has to be in the specific container + foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { + // setting is available in the POST array, use it + if (array_key_exists($l_str_Key, $_POST)) { + $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; + } else { + // setting is not defined in the POST array, define it to avoid the Default value + $l_arr_newSettings[$l_str_Key] = ""; + } + } + // update settings + return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); + } + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Description() { + // default no description will be displayed + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingKeyName Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function LoadSetting($p_str_SettingKeyName) { + // get current section + reset($this->a_arr_Sections); + $p_arr_Return = array(); + $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); + return $p_arr_Return; + } + + /** + * Returns a line break to start a new line. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addNewline() { + return '
                                                                                                                                                                      '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addLineSpace() { + return '

                                                                                                                                                                      '; + } + + /** + * Returns a simple text inside html text. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function addText($p_str_Text) { + return sprintf('%s', $p_str_Text); + } + + /** + * Returns the html tag for an input/select label. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_Caption Label caption. + * @return string + * + * Edited 2020-12-01T0159+0100.. + * @since 2.1.6 no colon + */ + protected function addLabel($p_str_SettingName, $p_str_Caption) { + if (empty($p_str_Caption)) { + return ""; + } + // remove the colon causing localization issues with French, + // and with languages not using punctuation at all, + // and with languages using other punctuation marks instead of colon, + // e.g. Greek using a raised dot. + // In French, colon is preceded by a space, forcibly non-breaking, + // and narrow per new school. + // Add colon to label strings for inclusion in localization. + // Colon after label is widely preferred best practice, mandatory per style guides. + // + return sprintf('', $p_str_SettingName, $p_str_Caption); + // ^ here deleted colon 2020-12-08T1546+0100 + } + + /** + * Returns the html tag for an input [type = text]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. + * @param bool $p_bool_Readonly Set the input to be read only, default false. + * @param bool $p_bool_Hidden Set the input to be hidden, default false. + * @return string + */ + protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { + $l_str_Style = ""; + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + if ($p_bool_Hidden) { + $l_str_Style .= 'display:none;'; + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, + $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addCheckbox($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], + MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); + } + + /** + * Returns the html tag for a select box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre select the current value. + * @param array $p_arr_Options Possible options to be selected. + * @return string + */ + protected function addSelectBox($p_str_SettingName, $p_arr_Options) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + $l_str_Options = ""; + + /* loop through all array keys */ + foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { + $l_str_Options .= sprintf('', + $l_str_Value, + $l_arr_Data["value"] == $l_str_Value ? "selected" : "", + $l_str_Caption); + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); + } + + /** + * Returns the html tag for a text area. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. + * @return string + */ + protected function addTextArea($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addColorSelection($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_in_Min Minimum value. + * @param int $p_int_Max Maximum value. + * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + + if ($p_bool_Deci) { + $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); + } else { + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); + } + } + +} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php index 5a1fd49..33f327a 100644 --- a/class/dashboard/subpage-diagnostics.php +++ b/class/dashboard/subpage-diagnostics.php @@ -1,140 +1,140 @@ -addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - */ - protected function getMetaBoxes() { - return array( - $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_PhpExtensions = ""; - // iterate through each PHP extension - foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { - if ($l_int_Index > 0) { - $l_str_PhpExtensions .= ' | '; - } - $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); - } - - /** @var WP_Theme $l_obj_CurrentTheme */ - $l_obj_CurrentTheme = wp_get_theme(); - - $l_str_WordPressPlugins = ""; - // iterate through each installed WordPress Plugin - foreach (get_plugins() as $l_arr_Plugin) { - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Name"] . ''; - $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . ''; - $l_str_WordPressPlugins .= ''; - } - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "server" => $_SERVER["SERVER_NAME"], - - "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php" => phpversion(), - - "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "user-agent" => $_SERVER["HTTP_USER_AGENT"], - - "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "memory-limit" => ini_get('memory_limit'), - - "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php-extensions" => $l_str_PhpExtensions, - - "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "wordpress" => $wp_version, - - "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", - - "plugins" => $l_str_WordPressPlugins - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } +addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + */ + protected function getMetaBoxes() { + return array( + $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_PhpExtensions = ""; + // iterate through each PHP extension + foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { + if ($l_int_Index > 0) { + $l_str_PhpExtensions .= ' | '; + } + $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); + } + + /** @var WP_Theme $l_obj_CurrentTheme */ + $l_obj_CurrentTheme = wp_get_theme(); + + $l_str_WordPressPlugins = ""; + // iterate through each installed WordPress Plugin + foreach (get_plugins() as $l_arr_Plugin) { + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Name"] . ''; + $l_str_WordPressPlugins .= '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . ''; + $l_str_WordPressPlugins .= ''; + } + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "server" => $_SERVER["SERVER_NAME"], + + "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php" => phpversion(), + + "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "user-agent" => $_SERVER["HTTP_USER_AGENT"], + + "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "memory-limit" => ini_get('memory_limit'), + + "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php-extensions" => $l_str_PhpExtensions, + + "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "wordpress" => $wp_version, + + "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", + + "plugins" => $l_str_WordPressPlugins + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } } \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index f4098ad..940a22b 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -1,1182 +1,1182 @@ -addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); - - // sync tab name with mirror in public function CustomCSSMigration(): - $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); - - $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); - $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); - $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); - - return $l_arr_Tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * HyperlinkArrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function getMetaBoxes() { - $l_arr_MetaBoxes = array(); - - // sync box name with mirror in task.php: - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); - } - - $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); - } - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); - - return $l_arr_MetaBoxes; - } - - /** - * Displays all settings for the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function ReferenceContainer() { - - // options for the label element: - $l_arr_LabelElement = array( - "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the positioning of the reference container - $l_arr_Positions = array( - "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), - "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // basic responsive page layout options: - $l_arr_PageLayoutOptions = array( - "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the separating punctuation between backlinks: - $l_arr_Separators = array( - // Unicode character names are conventionally uppercase. - "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because - // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_Terminators = array( - "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): - "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the first column width (per cent is a ratio, not a unit): - $l_arr_WidthUnits = array( - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for reference container script mode: - $l_arr_ScriptMode = array( - "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), - - "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), - - "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), - - "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), - - "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), - "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), - "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), - - "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), - "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-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), - - "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), - "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), - "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), - "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), - "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), - - "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), - "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), - "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), - "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), - "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), - "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), - "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), - "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), - "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), - "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), - "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), - "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), - "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), - "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all options for the footnotes start and end tag short codes - * Displays all options for the footnotes numbering - * Displays all options for the scrolling behavior - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function StartEnd() { - // footnotes start tag short code options: - $l_arr_ShortCodeStart = array( - "((" => "((", - "(((" => "(((", - "{{" => "{{", - "{{{" => "{{{", - "[n]" => "[n]", - "[fn]" => "[fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[ref]" => "[ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // footnotes end tag short code options: - $l_arr_ShortCodeEnd = array( - "))" => "))", - ")))" => ")))", - "}}" => "}}", - "}}}" => "}}}", - "[/n]" => "[/n]", - "[/fn]" => "[/fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[/ref]" => "[/ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the syntax validation: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), - "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), - - "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), - "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), - - // for script showing/hiding user defined text boxes: - "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // option to enable syntax validation, label mirrored in task.php: - "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), - "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Numbering() { - // define some space for the output - $l_str_Space = "     "; - // options for the combination of identical footnotes - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the numbering style of the footnotes: - $l_arr_CounterStyle = array( - "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", - "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", - "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", - "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", - "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", - "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), - - // algorithmically combine identicals: - "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), - "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Support for Ibid. notation added thanks to @meglio in . - "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Scrolling() { - - // options for enabling hard links for AMP compat: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), - "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), - "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable hard links for AMP compat: - "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), - "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), - "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), - "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), - "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable backlink tooltips: - "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), - "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), - "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function Love() { - // options for the acknowledgment display in the footer: - $l_arr_Love = array( - // logo only: - "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // logo followed by heart symbol: - "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // logo preceded by heart symbol: - "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. - "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // "This website uses Footnotes." - "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the Footnotes plugin." - "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the awesome Footnotes plugin." - "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // "No display of any “Footnotes love” mention in the footer" - "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), - - "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the excerpt setting - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function Excerpts() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), - "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. - "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnote referrers - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function Superscript() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for superscript normalize scope: - $l_arr_NormalizeSuperscript = array( - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), - - "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - - "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), - "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnotes mouse-over box. - * - * @author Stefan Herndler - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function MouseOverBox() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), - "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), - "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the name of the plugin as logogram “footnotes”. - "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxPosition() { - - // options for the Mouse-over box position - $l_arr_Position = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the alternative Mouse-over box position - $l_arr_AlternativePosition = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), - "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), - "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxDimensions() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), - "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), - "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTiming() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), - "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), - "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), - "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), - "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTruncation() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), - - "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), - // The feature trims back until the last full word. - "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxText() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), - "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), - "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), - "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxAppearance() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the font size unit: - $l_arr_FontSizeUnits = array( - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), - "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), - "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), - "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), - // To use default: Clear or leave empty. - "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), - // To use default: Clear or leave empty. - "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), - "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), - // To use default: Clear or leave empty. - "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), - "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), - // To use default: Clear or leave empty. - "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the prepended symbol - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function HyperlinkArrow() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), - "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), - "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the custom css box. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function CustomCSS() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text", - // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-2" => ".footnote_tooltip", - // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-3" => ".footnote_plugin_index", - // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-4" => ".footnote_plugin_text", - // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSMigration() { - - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), - "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), - "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the “Referrers and tooltips” settings tab name. - "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSNew() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); - // replace all placeholders - $l_obj_Template->replace( - array( - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), - - "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @author Stefan Herndler - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function LookupHooks() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); - - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), - "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), - "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), - "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", - - "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), - "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), - "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", - - "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), - "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), - "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", - - "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), - "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), - "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", - - "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), - "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), - "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays a short introduction of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Help() { - global $g_obj_MCI_Footnotes; - // load footnotes starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - - if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { - // load user defined starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". - " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". - " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". - " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". - " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - . $l_arr_Footnote_EndingTag["value"] . " World!"; - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "start" => $l_arr_Footnote_StartingTag["value"], - - "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "end" => $l_arr_Footnote_EndingTag["value"], - - "example-code" => $l_str_Example, - "example-string" => "
                                                                                                                                                                      " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), - - "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') - ) - ); - // call wp_head function to get the Styling of the mouse-over box - $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all Donate button to support the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Donate() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); - // replace all placeholders - $l_obj_Template->replace( - array( - "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} +addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); + + // sync tab name with mirror in public function CustomCSSMigration(): + $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); + + $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); + $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); + $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); + + return $l_arr_Tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * HyperlinkArrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function getMetaBoxes() { + $l_arr_MetaBoxes = array(); + + // sync box name with mirror in task.php: + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); + } + + $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); + } + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); + + return $l_arr_MetaBoxes; + } + + /** + * Displays all settings for the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function ReferenceContainer() { + + // options for the label element: + $l_arr_LabelElement = array( + "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the positioning of the reference container + $l_arr_Positions = array( + "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), + "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // basic responsive page layout options: + $l_arr_PageLayoutOptions = array( + "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the separating punctuation between backlinks: + $l_arr_Separators = array( + // Unicode character names are conventionally uppercase. + "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the terminating punctuation after backlinks: + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because + // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_Terminators = array( + "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): + "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the first column width (per cent is a ratio, not a unit): + $l_arr_WidthUnits = array( + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for reference container script mode: + $l_arr_ScriptMode = array( + "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), + + "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), + + "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + + "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), + + "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), + "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), + "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), + + "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), + "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-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), + + "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), + "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), + "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), + "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), + "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), + "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), + + "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), + "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), + "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), + "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), + "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), + "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), + "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), + "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), + "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), + "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), + "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), + "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), + "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), + "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all options for the footnotes start and end tag short codes + * Displays all options for the footnotes numbering + * Displays all options for the scrolling behavior + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function StartEnd() { + // footnotes start tag short code options: + $l_arr_ShortCodeStart = array( + "((" => "((", + "(((" => "(((", + "{{" => "{{", + "{{{" => "{{{", + "[n]" => "[n]", + "[fn]" => "[fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[ref]" => "[ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // footnotes end tag short code options: + $l_arr_ShortCodeEnd = array( + "))" => "))", + ")))" => ")))", + "}}" => "}}", + "}}}" => "}}}", + "[/n]" => "[/n]", + "[/fn]" => "[/fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[/ref]" => "[/ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the syntax validation: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), + "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), + + "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), + "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), + + // for script showing/hiding user defined text boxes: + "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // option to enable syntax validation, label mirrored in task.php: + "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), + "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Numbering() { + // define some space for the output + $l_str_Space = "     "; + // options for the combination of identical footnotes + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the numbering style of the footnotes: + $l_arr_CounterStyle = array( + "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", + "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", + "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", + "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", + "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", + "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), + + // algorithmically combine identicals: + "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), + "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Support for Ibid. notation added thanks to @meglio in . + "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Scrolling() { + + // options for enabling hard links for AMP compat: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), + "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), + "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable hard links for AMP compat: + "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), + "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), + "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), + "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), + "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable backlink tooltips: + "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), + "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), + "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function Love() { + // options for the acknowledgment display in the footer: + $l_arr_Love = array( + // logo only: + "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // logo followed by heart symbol: + "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // logo preceded by heart symbol: + "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. + "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // "This website uses Footnotes." + "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the Footnotes plugin." + "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the awesome Footnotes plugin." + "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // "No display of any “Footnotes love” mention in the footer" + "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), + + "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the excerpt setting + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function Excerpts() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), + "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. + "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnote referrers + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function Superscript() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for superscript normalize scope: + $l_arr_NormalizeSuperscript = array( + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), + + "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + + "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), + "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnotes mouse-over box. + * + * @author Stefan Herndler + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function MouseOverBox() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), + "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), + "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the name of the plugin as logogram “footnotes”. + "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxPosition() { + + // options for the Mouse-over box position + $l_arr_Position = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the alternative Mouse-over box position + $l_arr_AlternativePosition = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), + "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), + "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxDimensions() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), + "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), + "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTiming() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), + "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), + "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), + "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), + "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTruncation() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), + + "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), + // The feature trims back until the last full word. + "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxText() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), + "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), + "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), + "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxAppearance() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the font size unit: + $l_arr_FontSizeUnits = array( + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), + "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), + "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), + "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), + // To use default: Clear or leave empty. + "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), + // To use default: Clear or leave empty. + "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), + "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), + // To use default: Clear or leave empty. + "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), + "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), + // To use default: Clear or leave empty. + "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the prepended symbol + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function HyperlinkArrow() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), + "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), + "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the custom css box. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function CustomCSS() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text", + // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-2" => ".footnote_tooltip", + // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-3" => ".footnote_plugin_index", + // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-4" => ".footnote_plugin_text", + // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSMigration() { + + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), + "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), + "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the “Referrers and tooltips” settings tab name. + "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSNew() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); + // replace all placeholders + $l_obj_Template->replace( + array( + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), + + "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @author Stefan Herndler + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function LookupHooks() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); + + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), + "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), + "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), + "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), + "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", + + "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), + "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), + "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", + + "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), + "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), + "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", + + "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), + "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), + "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", + + "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), + "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), + "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays a short introduction of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Help() { + global $g_obj_MCI_Footnotes; + // load footnotes starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + + if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { + // load user defined starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". + " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". + " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". + " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". + " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + . $l_arr_Footnote_EndingTag["value"] . " World!"; + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "start" => $l_arr_Footnote_StartingTag["value"], + + "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "end" => $l_arr_Footnote_EndingTag["value"], + + "example-code" => $l_str_Example, + "example-string" => "
                                                                                                                                                                      " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), + + "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') + ) + ); + // call wp_head function to get the Styling of the mouse-over box + $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all Donate button to support the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Donate() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); + // replace all placeholders + $l_obj_Template->replace( + array( + "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} diff --git a/class/hooks.php b/class/hooks.php index ceb7147..e86d106 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,94 +1,94 @@ -ClearAll(); - } - - /** - * Add Links to the Plugin in the "installed Plugins" page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Links Current Links. - * @param string $p_str_PluginFileName Plugins init file name. - * @return array - */ - public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { - // append link to the WordPress Plugin page - $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the Settings page - $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the PlayPal Donate function - $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // return new links - return $p_arr_Links; - } -} +ClearAll(); + } + + /** + * Add Links to the Plugin in the "installed Plugins" page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Links Current Links. + * @param string $p_str_PluginFileName Plugins init file name. + * @return array + */ + public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { + // append link to the WordPress Plugin page + $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the Settings page + $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the PlayPal Donate function + $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // return new links + return $p_arr_Links; + } +} diff --git a/class/init.php b/class/init.php index 2eb6ff4..e1001a3 100644 --- a/class/init.php +++ b/class/init.php @@ -1,373 +1,373 @@ -initializeDashboard(); - // initialize the Plugin Task - $this->initializeTask(); - - // Register all Public Stylesheets and Scripts - add_action('init', array($this, 'registerPublic')); - // Enqueue all Public Stylesheets and Scripts - add_action('wp_enqueue_scripts', array($this, 'registerPublic')); - // Register all Widgets of the Plugin. - add_action('widgets_init', array($this, 'initializeWidgets')); - } - - /** - * Initializes all Widgets of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution - * - * @since 1.6.5 - * - * @contributor @felipelavinz - * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 - * - * @reporter @psykonevro - * @link https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ - * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/ - * - * @reporter @daliasued - * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853 - * - * create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0. - * @link https://www.php.net/manual/en/function.create-function.php - * - * The fix is to move add_action() above into run(), - * and use the bare register_widget() here. - * @see self::run() - * - * Also, the visibility of initializeWidgets() is not private any longer. - */ - public function initializeWidgets() { - register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); - } - - /** - * Initializes the Dashboard of the Plugin and loads them. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function initializeDashboard() { - new MCI_Footnotes_Layout_Init(); - } - - /** - * Initializes the Plugin Task and registers the Task hooks. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function initializeTask() { - $this->a_obj_Task = new MCI_Footnotes_Task(); - $this->a_obj_Task->registerHooks(); - } - - /** - * Registers and enqueues scripts and stylesheets to the public pages. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 - */ - public function registerPublic() { - - /** - * Enqueues external scripts. - * - * - Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * The condition about tooltips was missing, only the not-alternative-tooltips part was present. - */ - // set conditions re-used for stylesheet enqueuing: - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - /** - * Enqueues the jQuery library registered by WordPress. - * - * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - * - * @since 2.5.6 - * - * @reporter @hopper87it - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * - * jQuery is also used for animated scrolling, so it was loaded by default. - * The function wp_enqueue_script() avoids loading the same library multiple times. - * After adding the alternative reference container, jQuery has become optional, - * but still enabled by default. - */ - if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { - - wp_enqueue_script( 'jquery' ); - - } - - if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { - - /** - * Enqueues the jQuery Tools library shipped with the plugin. - * - * redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js - * 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.7.redacted.2' - ); - - /** - * Registers jQuery UI from the JavaScript Content Delivery Network. - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * Used to add jQuery UI following @vonpiernik: - * : - * - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. - * - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * This was enabled in Footnotes v2.0.0 through v2.0.3. - * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 - */ - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 - //wp_enqueue_script( 'jQueryUI' ); - /** - * This is then needed instead of the above first instance: - * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 - */ - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - - /** - * Enqueues some jQuery UI libraries registered by WordPress. - * - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * If alternative tooltips are enabled, these libraries are not needed. - */ - wp_enqueue_script( 'jquery-ui-core' ); - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-position' ); - wp_enqueue_script( 'jquery-ui-tooltip' ); - - } - - /** - * Enables enqueuing a new-scheme stylesheet. - * - * @since 2.5.5 - * @date 2021-02-14T1512+0100 - * - * Enables enqueuing the formatted individual stylesheets if false. - * WARNING: This facility is designed for development and must NOT be used in production. - * - * The Boolean may be set at the bottom of the plugin’s main PHP file. - * @see footnotes.php - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - /** - * Enqueues a minified united external stylesheet in production. - * - * - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1543+0100 - * - * @contributor @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * The dashboard stylesheet is minified as-is. - * @see class/dashboard/layout.php - * - * @since 2.0.3 add versioning of public.css for cache busting. - * @date 2020-10-29T1413+0100 - * Plugin version number is needed for busting browser caches after each plugin update. - * @since 2.1.4 automate passing version number for cache busting. - * @date 2020-11-30T0646+0100 - * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. - * - * The media scope argument 'all' is the default. - * No need to use '-css' in the handle, as this is appended automatically. - */ - // set tooltip mode for use in stylesheet name: - if ( self::$a_bool_TooltipsEnabled ) { - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - $l_str_TooltipMode = 'al'; - $l_str_TComplement = 'ternative-tooltips'; - } else { - $l_str_TooltipMode = 'jq'; - $l_str_TComplement = 'uery-tooltips'; - } - } else { - $l_str_TooltipMode = 'no'; - $l_str_TComplement = '-tooltips'; - } - - // set basic responsive page layout mode for use in stylesheet name: - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - switch ( $l_str_PageLayoutOption ) { - case "reference-container": $l_str_LayoutMode = '1'; break; - case "entry-content" : $l_str_LayoutMode = '2'; break; - case "main-content" : $l_str_LayoutMode = '3'; break; - case "none": default: $l_str_LayoutMode = '0'; break; - } - - // enqueue the tailored united minified stylesheet: - wp_enqueue_style( - 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, - plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' - ), - array(), - C_STR_FOOTNOTES_VERSION, - 'all' - ); - - } else { - - /** - * Enqueues external stylesheets, ONLY in development now. - * - * @since 2.1.4 optionally enqueue an extra stylesheet. - * @date 2020-12-04T2231+0100 - * - * This optional layout fix is useful by lack of layout support. - */ - wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_PageLayoutOption != 'none') { - wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_PageLayoutOption, - plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' - ), - array(), - C_STR_FOOTNOTES_VERSION, - 'all' - ); - } - } - } -} +initializeDashboard(); + // initialize the Plugin Task + $this->initializeTask(); + + // Register all Public Stylesheets and Scripts + add_action('init', array($this, 'registerPublic')); + // Enqueue all Public Stylesheets and Scripts + add_action('wp_enqueue_scripts', array($this, 'registerPublic')); + // Register all Widgets of the Plugin. + add_action('widgets_init', array($this, 'initializeWidgets')); + } + + /** + * Initializes all Widgets of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * + * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution + * + * @since 1.6.5 + * + * @contributor @felipelavinz + * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + * + * @reporter @psykonevro + * @link https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/ + * + * @reporter @daliasued + * @link https://wordpress.org/support/topic/deprecated-function-create_function-14/#post-13312853 + * + * create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0. + * @link https://www.php.net/manual/en/function.create-function.php + * + * The fix is to move add_action() above into run(), + * and use the bare register_widget() here. + * @see self::run() + * + * Also, the visibility of initializeWidgets() is not private any longer. + */ + public function initializeWidgets() { + register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); + } + + /** + * Initializes the Dashboard of the Plugin and loads them. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function initializeDashboard() { + new MCI_Footnotes_Layout_Init(); + } + + /** + * Initializes the Plugin Task and registers the Task hooks. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function initializeTask() { + $this->a_obj_Task = new MCI_Footnotes_Task(); + $this->a_obj_Task->registerHooks(); + } + + /** + * Registers and enqueues scripts and stylesheets to the public pages. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 + * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 + */ + public function registerPublic() { + + /** + * Enqueues external scripts. + * + * - Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The condition about tooltips was missing, only the not-alternative-tooltips part was present. + */ + // set conditions re-used for stylesheet enqueuing: + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + + /** + * Enqueues the jQuery library registered by WordPress. + * + * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. + * + * @since 2.5.6 + * + * @reporter @hopper87it + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ + * + * jQuery is also used for animated scrolling, so it was loaded by default. + * The function wp_enqueue_script() avoids loading the same library multiple times. + * After adding the alternative reference container, jQuery has become optional, + * but still enabled by default. + */ + if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { + + wp_enqueue_script( 'jquery' ); + + } + + if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { + + /** + * Enqueues the jQuery Tools library shipped with the plugin. + * + * redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js + * 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.7.redacted.2' + ); + + /** + * Registers jQuery UI from the JavaScript Content Delivery Network. + * + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: + * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + * Used to add jQuery UI following @vonpiernik: + * : + * + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. + * + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: + * + * See + * + * This was enabled in Footnotes v2.0.0 through v2.0.3. + * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + */ + //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 + //wp_enqueue_script( 'jQueryUI' ); + /** + * This is then needed instead of the above first instance: + * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + */ + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + + /** + * Enqueues some jQuery UI libraries registered by WordPress. + * + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * If alternative tooltips are enabled, these libraries are not needed. + */ + wp_enqueue_script( 'jquery-ui-core' ); + wp_enqueue_script( 'jquery-ui-widget' ); + wp_enqueue_script( 'jquery-ui-position' ); + wp_enqueue_script( 'jquery-ui-tooltip' ); + + } + + /** + * Enables enqueuing a new-scheme stylesheet. + * + * @since 2.5.5 + * @date 2021-02-14T1512+0100 + * + * Enables enqueuing the formatted individual stylesheets if false. + * WARNING: This facility is designed for development and must NOT be used in production. + * + * The Boolean may be set at the bottom of the plugin’s main PHP file. + * @see footnotes.php + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + /** + * Enqueues a minified united external stylesheet in production. + * + * - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1543+0100 + * + * @contributor @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The dashboard stylesheet is minified as-is. + * @see class/dashboard/layout.php + * + * @since 2.0.3 add versioning of public.css for cache busting. + * @date 2020-10-29T1413+0100 + * Plugin version number is needed for busting browser caches after each plugin update. + * @since 2.1.4 automate passing version number for cache busting. + * @date 2020-11-30T0646+0100 + * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. + * + * The media scope argument 'all' is the default. + * No need to use '-css' in the handle, as this is appended automatically. + */ + // set tooltip mode for use in stylesheet name: + if ( self::$a_bool_TooltipsEnabled ) { + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + $l_str_TooltipMode = 'al'; + $l_str_TComplement = 'ternative-tooltips'; + } else { + $l_str_TooltipMode = 'jq'; + $l_str_TComplement = 'uery-tooltips'; + } + } else { + $l_str_TooltipMode = 'no'; + $l_str_TComplement = '-tooltips'; + } + + // set basic responsive page layout mode for use in stylesheet name: + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + switch ( $l_str_PageLayoutOption ) { + case "reference-container": $l_str_LayoutMode = '1'; break; + case "entry-content" : $l_str_LayoutMode = '2'; break; + case "main-content" : $l_str_LayoutMode = '3'; break; + case "none": default: $l_str_LayoutMode = '0'; break; + } + + // enqueue the tailored united minified stylesheet: + wp_enqueue_style( + 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, + plugins_url( + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' + ), + array(), + C_STR_FOOTNOTES_VERSION, + 'all' + ); + + } else { + + /** + * Enqueues external stylesheets, ONLY in development now. + * + * @since 2.1.4 optionally enqueue an extra stylesheet. + * @date 2020-12-04T2231+0100 + * + * This optional layout fix is useful by lack of layout support. + */ + wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + if ($l_str_PageLayoutOption != 'none') { + wp_enqueue_style( + 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + plugins_url( + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + ), + array(), + C_STR_FOOTNOTES_VERSION, + 'all' + ); + } + } + } +} diff --git a/class/language.php b/class/language.php index 6172cdf..fccf143 100644 --- a/class/language.php +++ b/class/language.php @@ -1,108 +1,108 @@ - array( - - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', - - self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - - self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - - // 2.5.4 fast-tracked: - self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - - - self::C_STR_REFERENCE_CONTAINER_NAME => 'References', - self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', - self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - - // whether to enqueue additional stylesheet: - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - - // top and bottom margins: - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - - // table cell borders: - self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - - // backlink symbol: - self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - - // backlink separators and terminators are often not preferred. - // but a choice must be provided along with the ability to customize: - self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', - self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', - - // set backlinks column width: - self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - - // set backlinks column max. width: - self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', - - // whether a
                                                                                                                                                                      tag is inserted: - self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - - // whether to enable URL line wrapping: - self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - - // whether to use link elements: - self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', - - // excerpt should be disabled: - self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', - - self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', - - self::C_STR_FOOTNOTES_LOVE => 'no', - - ), - - "footnotes_storage_custom" => array( - - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - - self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - - // 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: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - - // 2.5.4 fast-tracked: - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', - self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - - - // 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: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - - // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: - self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - - // tooltip display durations: - // called mouse over box not tooltip for consistency - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - - // tooltip font size reset to legacy by default since 2.1.4; - // was set to inherit since 2.1.1 as it overrode custom CSS, - // is moved to settings since 2.1.4 2020-12-04T1023+0100 - self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', - self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', - - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - - // Custom CSS migrates to a dedicated tab: - self::C_STR_CUSTOM_CSS => '', - - ), - - "footnotes_storage_expert" => array( - - // These are checkboxes; keyword 'checked' is converted to Boolean true, - // empty string to false (default): - - // Titles should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. - // See - // Yet in titles, footnotes are still buggy, because WordPress - // uses the title string in menus and in the title element. - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', - - self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', - - // And the_excerpt is disabled by default following @nikelaos in - // - // - self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', - - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', - - // 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. - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', - - // initially hard-coded default - // shows "9223372036854780000" instead of 9223372036854775807 in the numbox - // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: - // - // interpret -1 as PHP_INT_MAX instead - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - - // 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. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, - - ), - - "footnotes_storage_custom_css" => array( - - self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', - - ), - - ); - - /** - * Contains all Settings from each Settings container as soon as this class is initialized. - * - * @author Stefan Herndler - * @since 1.5.0 - * @var array - */ - private $a_arr_Settings = array(); - - /** - * Class Constructor. Loads all Settings from each WordPress Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function __construct() { - $this->loadAll(); - } - - /** - * Returns a singleton of this class. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return MCI_Footnotes_Settings - */ - public static function instance() { - // no instance defined yet, load it - if (self::$a_obj_Instance === null) { - self::$a_obj_Instance = new self(); - } - // return a singleton of this class - return self::$a_obj_Instance; - } - - /** - * Returns the name of a specified Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. - * @return str Settings Container name. - */ - public function getContainer($p_int_Index) { - return $this->a_arr_Container[$p_int_Index]; - } - - /** - * Returns the default values of a specific Settings Container. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param int $p_int_Index Settings Container Aray Key Index. - * @return array - */ - public function getDefaults($p_int_Index) { - return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; - } - - /** - * Loads all Settings from each Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function loadAll() { - // clear current settings - $this->a_arr_Settings = array(); - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // load settings - $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); - } - } - - /** - * Loads all Settings from specified Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. - * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). - * - * @since ditched trimming whitespace from text box content in response to user request. - * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 - */ - private function Load($p_int_Index) { - // load all settings from container - $l_arr_Options = get_option($this->getContainer($p_int_Index)); - // load all default settings - $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; - - // no settings found, set them to their default value - if (empty($l_arr_Options)) { - return $l_arr_Default; - } - // 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; - } - } - // iterate through each setting in the container - foreach($l_arr_Options as $l_str_Key => $l_str_Value) { - // remove all whitespace at the beginning and end of a setting - // trimming whitespace is ditched: - //$l_str_Value = trim($l_str_Value); - // write the sanitized value back to the setting container - $l_arr_Options[$l_str_Key] = $l_str_Value; - } - // return settings loaded from Container - return $l_arr_Options; - } - - /** - * Updates a whole Settings container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param int $p_int_Index Index of the Settings container. - * @param array $p_arr_newValues new Settings. - * @return bool - */ - public function saveOptions($p_int_Index, $p_arr_newValues) { - if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { - $this->loadAll(); - return true; - } - return false; - } - - /** - * Returns the value of specified Settings name. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Key Settings Array Key name. - * @return mixed Value of the Setting on Success or Null in Settings name is invalid. - */ - 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; - } - - /** - * Deletes each Settings Container and loads the default values for each Settings Container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edit: This didn’t actually work. - * @since 2.2.0 this function is not called any longer when deleting the plugin, - * 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 - */ - public function ClearAll() { - // iterate through each Settings Container - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // delete the settings container - delete_option($this->getContainer($i)); - } - // set settings back to the default values - $this->a_arr_Settings = $this->a_arr_Default; - } - - /** - * Register all Settings Container for the Plugin Settings Page in the Dashboard. - * Settings Container Label will be the same as the Settings Container Name. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function RegisterSettings() { - // register all settings - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - register_setting($this->getContainer($i), $this->getContainer($i)); - } - } -} + array( + + self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', + self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', + self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', + self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + + + self::C_STR_REFERENCE_CONTAINER_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + + // whether a
                                                                                                                                                                      tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + + self::C_STR_FOOTNOTES_LOVE => 'no', + + ), + + "footnotes_storage_custom" => array( + + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + + + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', + + ), + + "footnotes_storage_expert" => array( + + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): + + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See + // Yet in titles, footnotes are still buggy, because WordPress + // uses the title string in menus and in the title element. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + + // And the_excerpt is disabled by default following @nikelaos in + // + // + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + + ), + + "footnotes_storage_custom_css" => array( + + self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', + + ), + + ); + + /** + * Contains all Settings from each Settings container as soon as this class is initialized. + * + * @author Stefan Herndler + * @since 1.5.0 + * @var array + */ + private $a_arr_Settings = array(); + + /** + * Class Constructor. Loads all Settings from each WordPress Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function __construct() { + $this->loadAll(); + } + + /** + * Returns a singleton of this class. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return MCI_Footnotes_Settings + */ + public static function instance() { + // no instance defined yet, load it + if (self::$a_obj_Instance === null) { + self::$a_obj_Instance = new self(); + } + // return a singleton of this class + return self::$a_obj_Instance; + } + + /** + * Returns the name of a specified Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Settings Container Array Key Index. + * @return str Settings Container name. + */ + public function getContainer($p_int_Index) { + return $this->a_arr_Container[$p_int_Index]; + } + + /** + * Returns the default values of a specific Settings Container. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param int $p_int_Index Settings Container Aray Key Index. + * @return array + */ + public function getDefaults($p_int_Index) { + return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; + } + + /** + * Loads all Settings from each Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function loadAll() { + // clear current settings + $this->a_arr_Settings = array(); + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // load settings + $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); + } + } + + /** + * Loads all Settings from specified Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Settings Container Array Key Index. + * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). + * + * @since ditched trimming whitespace from text box content in response to user request. + * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 + */ + private function Load($p_int_Index) { + // load all settings from container + $l_arr_Options = get_option($this->getContainer($p_int_Index)); + // load all default settings + $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; + + // no settings found, set them to their default value + if (empty($l_arr_Options)) { + return $l_arr_Default; + } + // 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; + } + } + // iterate through each setting in the container + foreach($l_arr_Options as $l_str_Key => $l_str_Value) { + // remove all whitespace at the beginning and end of a setting + // trimming whitespace is ditched: + //$l_str_Value = trim($l_str_Value); + // write the sanitized value back to the setting container + $l_arr_Options[$l_str_Key] = $l_str_Value; + } + // return settings loaded from Container + return $l_arr_Options; + } + + /** + * Updates a whole Settings container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param int $p_int_Index Index of the Settings container. + * @param array $p_arr_newValues new Settings. + * @return bool + */ + public function saveOptions($p_int_Index, $p_arr_newValues) { + if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { + $this->loadAll(); + return true; + } + return false; + } + + /** + * Returns the value of specified Settings name. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Key Settings Array Key name. + * @return mixed Value of the Setting on Success or Null in Settings name is invalid. + */ + 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; + } + + /** + * Deletes each Settings Container and loads the default values for each Settings Container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edit: This didn’t actually work. + * @since 2.2.0 this function is not called any longer when deleting the plugin, + * 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 + */ + public function ClearAll() { + // iterate through each Settings Container + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // delete the settings container + delete_option($this->getContainer($i)); + } + // set settings back to the default values + $this->a_arr_Settings = $this->a_arr_Default; + } + + /** + * Register all Settings Container for the Plugin Settings Page in the Dashboard. + * Settings Container Label will be the same as the Settings Container Name. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function RegisterSettings() { + // register all settings + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + register_setting($this->getContainer($i), $this->getContainer($i)); + } + } +} diff --git a/class/task.php b/class/task.php index 2f40d9a..8eaa58a 100644 --- a/class/task.php +++ b/class/task.php @@ -1,2354 +1,2354 @@ -get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); - $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); - $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); - $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); - $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); - - // PHP_INT_MAX can be set by -1: - $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; - $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; - $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; - $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; - $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; - - - // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); - - // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); - } - - // configurable priority level for reference container relative positioning; default 98: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); - - /** - * Hook for category pages - * - * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. - * - * @since 2.5.0 - * @date 2021-01-05T1402+0100 - * - * @contributor @misfist - * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 - * - * @reporter @vitaefit - * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ - * - * Category pages can have rich HTML content in a term description with article status. - * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. - * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ - */ - add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); - - /** - * Hook for popup maker popups - * - * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. - * - * @since 2.5.1 - * @date 2021-01-18T2038+0100 - * - * @reporter @squatcher - * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ - */ - add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); - } - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); - } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); - } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); - } - - - /** - * The the_post hook - * - * - Adding: Hooks: support 'the_post' in response to user request for custom post types. - * - * @since 1.5.4 - * @accountable @aricura - * @link https://wordpress.org/support/topic/doesnt-work-in-custon-post-types/#post-5339110 - * - * - * - Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. - * - * @since 2.0.5 - * @accountable @pewgeuges - * - * - * - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. - * - * @since 2.0.7 - * @accountable @pewgeuges - * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799 - * @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/#post-13612697 - * - * @reporter @markcheret on behalf of W. Beinert - * @link https://wordpress.org/support/topic/footnotes-now-appear-in-summaries-even-though-this-is-marked-no/ - * - * @reporter @nyamachi - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/ - * - * @reporter @whichgodsaves - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13622694 - * - * @reporter @spiralofhope2 - * @link https://wordpress.org/support/topic/2-0-5-broken/ - * - * @reporter @mmallett - * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13623208 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13624091 - * - * @reporter @widecast - * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13626222 - * - * @reporter @ymorin007 - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13627050 - * - * @reporter @markcheret on behalf of L. Smith - * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/ - * - * @reporter @tashi1es - * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/#post-13630495 - * - * - * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - * - * @since 2.1.0 - * @date 2020-11-08T1839+0100 - * @accountable @pewgeuges - */ - - // reset stored footnotes when displaying the header - self::$a_arr_Footnotes = array(); - self::$a_bool_AllowLoveMe = true; - } - - /** - * Outputs the custom css to the header of the public page. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. - * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. - * @since 2.1.3 raise settings priority to override theme stylesheets - * @since 2.1.4 Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. - * @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings. - * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. - * @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. - * @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. - * @since 2.5.4 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. - */ - public function wp_head() { - - // insert start tag without switching out of PHP: - echo "\r\n\r\n"; - - /** - * Alternative tooltip implementation relying on plain JS and CSS transitions. - * - * - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. - * - * @since 2.1.1 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 - * - * The script for alternative tooltips is printed formatted, not minified: - */ - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - ?> - -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { - echo $this->ReferenceContainer(); - } - // get setting for love and share this plugin - $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); - // check if the admin allows to add a link to the footer - if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { - return; - } - // set a hyperlink to the word "footnotes" in the Love slug - $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); - // get random love me text - if (strtolower($l_str_LoveMeIndex) == "random") { - $l_str_LoveMeIndex = "text-" . rand(1,7); - } - switch ($l_str_LoveMeIndex) { - // options named wrt backcompat, simplest is default: - case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; - case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; - } - echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', $l_str_LoveMeText); - } - - /** - * Replaces footnotes in the post/page title. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function the_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); - } - - /** - * Replaces footnotes in the content of the current page/post. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Page/Post content. - * @return string Content with replaced footnotes. - */ - public function the_content($p_str_Content) { - - /** - * Empties the footnotes list every time Footnotes is run when the_content hook is called. - * - * - Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. - * - * @since 2.5.7 - * - * @reporter @inoruhana - * @link https://wordpress.org/support/topic/footnote-duplicated-in-the-widget/ - * - * Under certain circumstances, footnotes were duplicated, because the footnotes list was - * not emptied every time before the search algorithm was run. That happened eg when both - * the reference container resides in the widget area, and the YOAST SEO plugin is active - * and calls the hook the_content to generate the Open Graph description, while Footnotes - * is set to avoid missing out on the footnotes (in the content) by hooking in as soon as - * the_content is called, whereas at post end Footnotes seems to hook in the_content only - * the time it’s the blog engine processing the post for display and appending the refs. - */ - self::$a_arr_Footnotes = array(); - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); - } - - /** - * Replaces footnotes in the excerpt of the current page/post. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Page/Post content. - * @return string Content with replaced footnotes. - */ - public function the_excerpt($p_str_Content) { - return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); - } - - /** - * Replaces footnotes in the widget title. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function widget_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); - } - - /** - * Replaces footnotes in the content of the current widget. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Widget content. - * @return string Content with replaced footnotes. - */ - public function widget_text($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); - } - - /** - * Replaces footnotes in each Content var of the current Post object. - * - * @author Stefan Herndler - * @since 1.5.4 - * @param array|WP_Post $p_mixed_Posts - */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); - return; - } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); - } - } - - /** - * Replace all Footnotes in a WP_Post object. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param WP_Post $p_obj_Post - * @return WP_Post - */ - private function replacePostObject($p_obj_Post) { - //MCI_Footnotes_Convert::debug($p_obj_Post); - $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); - $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); - $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); - return $p_obj_Post; - } - - /** - * Replaces all footnotes that occur in the given content. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. - * @return string - * - * - * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. - * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. - */ - public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { - - // replace all footnotes in the content, settings are converted to html characters - $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); - // replace all footnotes in the content, settings are NOT converted to html characters - $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); - - /** - * Reference container customized positioning through shortcode - * - * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. - * - * @since 2.2.0 - * @date 2020-12-13T2057+0100 - * - * @reporter @hamshe - * @link https://wordpress.org/support/topic/reference-container-in-elementor/ - * - * - * - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. - * - * @since 2.2.5 - * @date 2020-12-18T1434+0100 - * - * @reporter @hamshe - * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 - * - */ - // append the reference container or insert at shortcode: - $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); - if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { - $l_str_ReferenceContainerPositionShortcode = '[[references]]'; - } - - if ( $p_bool_OutputReferences ) { - - if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { - - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); - - } else { - - $p_str_Content .= $this->ReferenceContainer(); - - } - - // increment the container ID: - self::$a_int_ReferenceContainerId++; - } - - // delete position shortcode should any remain: - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); - - // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found - if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { - self::$a_bool_AllowLoveMe = false; - $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); - } - // return the content with replaced footnotes and optional reference container appended: - return $p_str_Content; - } - - /** - * Replaces all footnotes in the given content and appends them to the static property. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Content Content to be searched for footnotes. - * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. - * @return string - * - * @since 2.0.0 various. - * @since 2.4.0 Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. - * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. - */ - public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { - - // post ID to make everything unique wrt infinite scroll and archive view - self::$a_int_PostId = get_the_id(); - - // contains the index for the next footnote on this page - $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; - - // contains the starting position for the lookup of a footnote - $l_int_PosStart = 0; - - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - // decode html special chars - if ($p_bool_ConvertHtmlChars) { - $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); - $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); - } - - // if footnotes short code is empty, return the content without changes - if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { - return $p_str_Content; - } - - /** - * Footnote delimiter syntax validation - * - * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. - * - * @since 2.4.0 - * - * - * - Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. - * - Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. - * - Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. - * - * @since 2.5.0 - * @date 2021-01-07T0824+0100 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - * - * - * If footnotes short codes are unbalanced, and syntax validation is not disabled, - * prepend a warning to the content; displays de facto beneath the post title. - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { - - // make shortcodes conform to regex syntax: - $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); - $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); - - // apply different regex depending on whether start shortcode is double/triple opening parenthesis: - if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { - - // this prevents from catching a script containing e.g. a double opening parenthesis: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; - - } else { - - // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; - } - - // check syntax and get error locations: - preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); - if ( empty( $p_arr_ErrorLocation ) ) { - self::$a_bool_SyntaxErrorFlag = false; - } - - // prevent generating and inserting the warning multiple times: - if ( self::$a_bool_SyntaxErrorFlag ) { - - // get plain text string for error location: - $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); - - // limit string length to 300 characters: - if ( strlen( $l_str_ErrorSpotString ) > 300 ) { - $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; - } - - // compose warning box: - $l_str_SyntaxErrorWarning = '

                                                                                                                                                                      '; - $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; - - // syntax validation setting in the dashboard under the General settings tab: - $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); - - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; - $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      “'; - $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; - $l_str_SyntaxErrorWarning .= '”

                                                                                                                                                                      '; - - // prepend the warning box to the content: - $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; - - // checked, set flag to false to prevent duplicate warning: - self::$a_bool_SyntaxErrorFlag = false; - - return $p_str_Content; - } - } - - - // load referrer templates if footnotes text not hidden: - if (!$p_bool_HideFootnotesText) { - - // load footnote referrer template file: - if (self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); - } else { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); - } - - /** - * Call Boolean again for robustness when priority levels don’t match any longer. - * - * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. - * - * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) - */ - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); - - // load tooltip inline script if jQuery tooltips are enabled: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); - } - - } else { - $l_obj_Template = null; - $l_obj_TemplateTooltip = null; - } - - // search footnotes short codes in the content - do { - // get first occurrence of the footnote start tag short code: - $i_int_LenContent = strlen($p_str_Content); - if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; - $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosStart === false) { - break; - } - // get first occurrence of the footnote end tag short code: - $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosEnd === false) { - break; - } - // calculate the length of the footnote - $l_int_Length = $l_int_PosEnd - $l_int_PosStart; - - // get footnote text - $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); - - // get tooltip text if present: - self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); - self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - } else { - $l_str_TooltipText = ''; - } - - /** - * URL line wrapping for Unicode non conformant browsers - * - * @since 2.1.1 (CSS) - * @since 2.1.4 (PHP) - * - * Despite Unicode recommends to line-wrap URLs at slashes, and Firefox follows - * the Unicode standard, Chrome does not, making long URLs hang out of tooltips - * or extend reference containers, so that the end is hidden outside the window - * and may eventually be viewed after we scroll horizontally or zoom out. It is - * up to the web page to make URLs breaking anywhere by wrapping them in a span - * that is assigned appropriate CSS properties and values. - * @see css/public.css - * - * - Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. - * - * @since 2.1.1 - * - * @reporter @andreasra - * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/3/#post-13657398 - * - * - * - Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. - * - * @since 2.1.3 - * @date 2020-11-23 - * - * @reporter @karolszakiel - * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/ - * - * - * - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. - * - * @since 2.1.4 - * @date 2020-11-25T0837+0100 - * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 - * - * - * - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - * - * @since 2.1.5 - * - * @reporter @bjrnet21 - * @link https://wordpress.org/support/topic/2-1-4-breaks-on-my-site-images-dont-show/ - * - * - * - Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. - * - * @since 2.1.6 - * @date 2020-12-09T1921+0100 - * - * @reporter @a223123131 - * @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/ - * - * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 - * - * - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. - * - * @since 2.1.6 - * @date 2020-12-09T1606+0100 - * - * - * - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - * - * @since 2.2.6 - * @date 2020-12-23T0409+0100 - * - * @reporter @spiralofhope2 - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ - * - * - * - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - * - * @since 2.2.7 - * @date 2020-12-23T1046+0100 - * - * @reporter @rjl20 - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825479 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825532 - * - * @reporter @lukashuggenberg - * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/ - * - * @reporter @klusik - * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13825885 - * - * @reporter @friedrichnorth - * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/ - * - * @reporter @bernardzit - * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 - * - * - * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - * @date 2020-12-23T1107+0100 - * - * Correct is duplicating the negative lookbehind w/o quotes: '(?get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - - $l_str_FootnoteText = preg_replace( - '#(?$1
                                                                                                                                                                      ', - $l_str_FootnoteText - ); - } - - // Text to be displayed instead of the footnote - $l_str_FootnoteReplaceText = ""; - - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { - - // get the configurable parts: - self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); - self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); - self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); - - // streamline ID concatenation: - self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - - } - - // display the footnote referrers and the tooltips: - if (!$p_bool_HideFootnotesText) { - $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - // display only a truncated footnote text if option enabled: - $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); - $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); - - // define excerpt text as footnote text by default: - $l_str_ExcerptText = $l_str_FootnoteText; - - /** - * Tooltip truncation - * - * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. - * - * @since 2.1.0 - * @date 2020-11-08T2146+0100 - * - * @reporter @rovanov - * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ - * - * If the tooltip truncation option is enabled, it’s done based on character count, - * and a trailing incomplete word is cropped. - * This is equivalent to the WordPress default excerpt generation, i.e. without a - * custom excerpt and without a delimiter. But WordPress does word count, usually 55. - */ - if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { - $l_str_DummyText = strip_tags($l_str_FootnoteText); - if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { - $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); - $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - $l_str_ExcerptText .= ' … <'; - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; - $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; - $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= "_$l_int_Index');\""; - - // if enabled, add the hard link fragment ID: - if (self::$a_bool_HardLinksEnable) { - - $l_str_ExcerptText .= ' href="#'; - $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; - $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; - $l_str_ExcerptText .= $l_int_Index; - $l_str_ExcerptText .= '"'; - } - - $l_str_ExcerptText .= '>'; - - /** - * Configurable read-on button label - * - * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. - * - * @since 2.1.0 - * @date 2020-11-08T2146+0100 - * - * @reporter @rovanov - * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ - */ - $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); - - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : '
                                                                                                                                                                      '; - } - } - - /** - * Referrers element superscript or baseline - * - * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report - * @since 2.1.1 - * - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * define the HTML element to use for the referrers: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { - - $l_str_SupSpan = 'sup'; - - } else { - - $l_str_SupSpan = 'span'; - } - - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { - - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkCloseTag = ''; - // self::$a_str_LinkOpenTag will be defined as needed - - // compose hyperlink address (leading space is in template): - $l_str_FootnoteLinkArgument = 'href="#'; - $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; - $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteLinkArgument .= $l_int_Index; - $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; - - /** - * Compose fragment ID anchor with offset, for use in reference container. - * Empty span, child of empty span, to avoid tall dotted rectangles in browser. - */ - $l_str_ReferrerAnchorElement = ''; - - } else { - - /** - * Initialize hard link variables when hard links are disabled. - * - * - Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. - * - * @since 2.4.0 - * @date 2021-01-04T1622+0100 - * - * @reporter @a223123131 - * @link https://wordpress.org/support/topic/wp_debug-php-notice/ - * - * If no hyperlink nor offset anchor is needed, initialize as empty. - */ - $l_str_FootnoteLinkArgument = ''; - $l_str_ReferrerAnchorElement = ''; - - // The link element is set independently as it may be needed for styling: - if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { - - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkOpenTag = ''; - self::$a_str_LinkCloseTag = ''; - - } - } - - // determine tooltip content: - if ( self::$a_bool_TooltipsEnabled ) { - $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; - } else { - $l_str_TooltipContent = ''; - } - - /** - * Determine shrink width if alternative tooltips are enabled. - * - * @since 2.5.6 - */ - $l_str_TooltipStyle = ''; - if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { - $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); - if ( $l_int_TooltipLength < 70 ) { - $l_str_TooltipStyle = ' style="width: '; - $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); - $l_str_TooltipStyle .= 'em;"'; - } - } - - // fill in 'templates/public/footnote.html': - $l_obj_Template->replace( - array( - "link-span" => self::$a_str_LinkSpan, - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "hard-link" => $l_str_FootnoteLinkArgument, - "sup-span" => $l_str_SupSpan, - "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - "index" => $l_int_Index, - "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - "anchor-element" => $l_str_ReferrerAnchorElement, - "style" => $l_str_TooltipStyle, - "text" => $l_str_TooltipContent, - ) - ); - $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); - - // reset the template - $l_obj_Template->reload(); - - // if standard tooltips are enabled but alternative are not: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); - $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); - $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); - $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); - $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); - - // fill in 'templates/public/tooltip.html': - $l_obj_TemplateTooltip->replace( - array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), - "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, - "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, - "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, - "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, - "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, - "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, - ) - ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); - $l_obj_TemplateTooltip->reload(); - } - } - // replace the footnote with the template - $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); - - // add footnote only if not empty - if (!empty($l_str_FootnoteText)) { - // set footnote to the output box at the end - self::$a_arr_Footnotes[] = $l_str_FootnoteText; - // increase footnote index - $l_int_FootnoteIndex++; - } - - /** - * Fixes a footnotes numbering bug (happening under de facto rare circumstances). - * - * - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - * - * @since 1.6.4 - * @date 2016-06-29T0054+0000 - * @committer @dartiss - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1445718 @dartiss’ class/task.php - * @link https://plugins.trac.wordpress.org/log/footnotes/trunk/class/task.php?rev=1445718 @dartiss re-added class/task.php - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class?rev=1445711 class/ w/o task.php - * @link https://plugins.trac.wordpress.org/changeset/1445711/footnotes/trunk/class @dartiss deleted class/task.php - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1026210 @aricura’s latest class/task.php - * - * - * - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. - * - * @since 2.5.5 - * - * @contributor @lolzim - * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032 - * - * @reporter @rumperuu - * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/ - * - * This assignment was overridden by another one, causing the algorithm to jump back - * near the post start to a position calculated as the sum of the length of the last - * footnote and the length of the last footnote replace text. - * A bug disturbing the order of the footnotes depending on the text before the first - * footnote, the length of the first footnote and the length of the templates for the - * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. - */ - // add offset to the new starting position - $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); - - } while (true); - - // return content - return $p_str_Content; - } - - /** - * Generates the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - * - * @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container - * @since 2.0.3 Bugfix: prepend an arrow on user request - * @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters. - * @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings - * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. - * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. - */ - public function ReferenceContainer() { - - // no footnotes have been replaced on this page: - if (empty(self::$a_arr_Footnotes)) { - return ""; - } - - - /** - * Footnote index backlink symbol - * - * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. - * - * @since 2.1.1 - * - * @reporter @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 - * - * If the backlink symbol is enabled: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { - - // get html arrow - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); - // set html arrow to the first one if invalid index defined - if (is_array($l_str_Arrow)) { - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); - } - // get user defined arrow - $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); - if (!empty($l_str_ArrowUserDefined)) { - $l_str_Arrow = $l_str_ArrowUserDefined; - } - - // wrap the arrow in a @media print { display:hidden } span: - $l_str_FootnoteArrow = ''; - $l_str_FootnoteArrow .= $l_str_Arrow . ''; - - } else { - - // If the backlink symbol isn’t enabled, set it to empty: - $l_str_Arrow = ''; - $l_str_FootnoteArrow = ''; - - } - - - /** - * Backlink separator - * - * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. - * - * @since 2.1.4 - * @date 2020-11-28T1048+0100 - * - * @contributor @docteurfitness - * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/update-2-1-3/ - * - * Initially a comma was appended in this algorithm for enumerations. - * The comma in enumerations is not generally preferred. - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { - - // check if it is input-configured: - $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); - - if (empty($l_str_Separator)) { - - // if it is not, check which option is on: - $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); - switch ($l_str_SeparatorOption) { - case 'comma' : $l_str_Separator = ','; break; - case 'semicolon': $l_str_Separator = ';'; break; - case 'en_dash' : $l_str_Separator = ' –'; break; - } - } - - } else { - - $l_str_Separator = ''; - } - - /** - * Backlink terminator - * - * Initially a dot was appended in the table row template. - * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; - * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable: - */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { - - // check if it is input-configured: - $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); - - if (empty($l_str_Terminator)) { - - // if it is not, check which option is on: - $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); - switch ($l_str_TerminatorOption) { - case 'period' : $l_str_Terminator = '.'; break; - case 'parenthesis': $l_str_Terminator = ')'; break; - case 'colon' : $l_str_Terminator = ':'; break; - } - } - - } else { - - $l_str_Terminator = ''; - } - - - /** - * Line breaks - * - * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. - * - * @since 2.1.4 - * @date 2020-11-28T1049+0100 - * - * The backlinks of combined footnotes are generally preferred in an enumeration. - * But when few footnotes are identical, stacking the items in list form is better. - * Variable number length and proportional character width require explicit line breaks. - * Otherwise, an ordinary space character offering a line break opportunity is inserted. - */ - $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                                                                                                      ' : ' '; - - /** - * For maintenance and support, table rows in the reference container should be - * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below): - */ - $l_str_Body = "\r\n\r\n"; - - - /** - * Reference container table row template load - * - * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. - * - * @since 2.1.1 - * @date 2020-11-16T2024+0100 - */ - - // when combining identical footnotes is turned on, another template is needed: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // the combining template allows for backlink clusters and supports cell clicking for single notes: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); - - } else { - - // when 3-column layout is turned on (only available if combining is turned off): - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); - - } else { - - // when switch symbol and index is turned on, and combining and 3-columns are off: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); - - } else { - - // default is the standard template: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); - - } - } - } - - /** - * Switch backlink symbol and footnote number - * - * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. - * - * @since 2.1.1 - * @date 2020-11-16T2024+0100 - * - * @contributor @spaceling - * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 - * - * - * - Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. - * - * @since 2.1.4 - * @date 2020-11-26T1633+0100 - */ - $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); - - // loop through all footnotes found in the page - for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { - - // get footnote text - $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; - - // if footnote is empty, go to the next one; - // With combine identicals turned on, identicals will be deleted and are skipped: - if (empty($l_str_FootnoteText)) { - continue; - } - - // generate content of footnote index cell - $l_int_FirstFootnoteIndex = ($l_int_Index + 1); - - // get the footnote index string and - // keep supporting legacy index placeholder: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - /** - * Case of only one backlink per table row - * - * If enabled, and for the case the footnote is single, compose hard link: - */ - // define anyway: - $l_str_HardLinkAddress = ''; - - if (self::$a_bool_HardLinksEnable) { - - /** - * Use-Backbutton-Hint tooltip, optional and configurable. - * - * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. - * - * @since 2.5.4 - * - * @reporter @theroninjedi47 - * @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ - * - * When hard links are enabled, clicks on the backlinks are logged in the browsing history. - * 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 - */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_UseBackbuttonHint = ' title="'; - $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); - $l_str_UseBackbuttonHint .= '"'; - } else { - $l_str_UseBackbuttonHint = ''; - } - - /** - * Compose fragment ID anchor with offset, for use in reference container. - * Empty span, child of empty span, to avoid tall dotted rectangles in browser. - */ - $l_str_FootnoteAnchorElement = ''; - - // compose optional hard link address: - $l_str_HardLinkAddress = ' href="#'; - $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; - $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; - $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; - $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; - - // compose optional opening link tag with optional hard link, mandatory for instance: - self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - - // ID, optional hard link address, and class: - $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; - $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= self::$a_int_PostId; - $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= ' href="#'; - $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; - $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; - } - $l_str_FootnoteReference .= ' class="footnote_backlink"'; - - // the click event goes in the table cell if footnote remains single: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; - - - // the dedicated template enumerating backlinks uses another variable: - $l_str_FootnoteBacklinks = $l_str_FootnoteReference; - - // append the click event right to the backlink item for enumerations; - // else it goes in the table cell: - $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; - $l_str_FootnoteReference .= '>'; - - // append the optional offset anchor for hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; - $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; - } - - // continue both single note and notes cluster, depending on switch option status: - if ($l_bool_SymbolSwitch) { - - $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - - } else { - - $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - - } - - // If that is the only footnote with this text, we’re almost done. - - // check if it isn't the last footnote in the array: - if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { - - // get all footnotes that haven't passed yet: - for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { - - // check if a further footnote is the same as the actual one: - if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { - - // if so, set the further footnote as empty so it won't be displayed later: - self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; - - // set the flag to true for the combined status: - $l_bool_FlagCombined = true; - - // update the footnote ID: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - - // resume composing the backlinks enumeration: - $l_str_FootnoteBacklinks .= "$l_str_Separator'; - $l_str_FootnoteBacklinks .= $l_str_LineBreak; - $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; - $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; - - // insert the optional hard link address: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ' href="#'; - $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; - $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; - } - - $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; - $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; - - // append the offset anchor for optional hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ''; - } - - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId; - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; - - } - } - } - - // append terminator and end tag: - $l_str_FootnoteReference .= $l_str_Terminator . ''; - $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; - - } - - // line wrapping of URLs already fixed, see above - - // get reference container item text if tooltip text goes separate: - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); - self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_MirrorTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); - $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; - } else { - $l_str_ReferenceText = $l_str_NotTooltipText; - } - } else { - $l_str_ReferenceText = $l_str_FootnoteText; - } - - // replace all placeholders in table row template: - $l_obj_Template->replace( - array( - - // placeholder used in all templates: - "text" => $l_str_ReferenceText, - - // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => self::$a_str_LinkOpenTag, - "link-end" => self::$a_str_LinkCloseTag, - "link-span" => self::$a_str_LinkSpan, - "terminator" => $l_str_Terminator, - "anchor-element" => $l_str_FootnoteAnchorElement, - "hard-link" => $l_str_HardLinkAddress, - - // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => $l_bool_FlagCombined ? '' : ' pointer', - "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, - "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, - - // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteId, - ) - ); - - $l_str_Body .= $l_obj_Template->getContent(); - - // extra line breaks for page source readability: - $l_str_Body .= "\r\n\r\n"; - - $l_obj_Template->reload(); - - } - - // call again for robustness when priority levels don’t match any longer: - self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); - - // streamline: - $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); - - /** - * Reference container label - * - * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. - * - * @since 2.4.0 - * @date 2021-01-04T0504+0100 - * - * @reporter @lukashuggenberg - * - * Themes may drop-cap a first letter of initial paragraphs, like this label. - * In case of empty label that would apply to the left half button character. - * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. - */ - $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); - - /** - * Select the reference container template according to the script mode. - * - * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - * - * @since 2.5.6 - * - * @reporter @hopper87it - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * - * @reporter @pkverma99 - * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 - */ - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); - - if ( $l_str_ScriptMode == 'jquery' ) { - - // load 'templates/public/reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); - - } else { - - // load 'templates/public/js-reference-container.html': - $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); - } - - $l_obj_TemplateContainer->replace( - array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), - "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, - "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', - "style" => $l_bool_CollapseDefault ? 'display: none;' : '', - "content" => $l_str_Body, - "scroll-offset" => (self::$a_int_ScrollOffset / 100), - "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), - ) - ); - - // free all found footnotes if reference container will be displayed - self::$a_arr_Footnotes = array(); - - return $l_obj_TemplateContainer->getContent(); - } -} +get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); + $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); + $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); + $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); + $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); + + // PHP_INT_MAX can be set by -1: + $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; + $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; + $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; + $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; + $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; + + + // append custom css to the header + add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + + // append the love and share me slug to the footer + add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { + add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); + } + + // configurable priority level for reference container relative positioning; default 98: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { + add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); + + /** + * Hook for category pages + * + * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. + * + * @since 2.5.0 + * @date 2021-01-05T1402+0100 + * + * @contributor @misfist + * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 + * + * @reporter @vitaefit + * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/ + * + * Category pages can have rich HTML content in a term description with article status. + * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. + * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ + */ + add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); + + /** + * Hook for popup maker popups + * + * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. + * + * @since 2.5.1 + * @date 2021-01-18T2038+0100 + * + * @reporter @squatcher + * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ + */ + add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); + } + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { + add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); + } + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { + add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); + } + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { + add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); + } + + + /** + * The the_post hook + * + * - Adding: Hooks: support 'the_post' in response to user request for custom post types. + * + * @since 1.5.4 + * @accountable @aricura + * @link https://wordpress.org/support/topic/doesnt-work-in-custon-post-types/#post-5339110 + * + * + * - Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. + * + * @since 2.0.5 + * @accountable @pewgeuges + * + * + * - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. + * + * @since 2.0.7 + * @accountable @pewgeuges + * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799 + * @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/#post-13612697 + * + * @reporter @markcheret on behalf of W. Beinert + * @link https://wordpress.org/support/topic/footnotes-now-appear-in-summaries-even-though-this-is-marked-no/ + * + * @reporter @nyamachi + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/ + * + * @reporter @whichgodsaves + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13622694 + * + * @reporter @spiralofhope2 + * @link https://wordpress.org/support/topic/2-0-5-broken/ + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13623208 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13624091 + * + * @reporter @widecast + * @link https://wordpress.org/support/topic/2-0-5-broken/#post-13626222 + * + * @reporter @ymorin007 + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13627050 + * + * @reporter @markcheret on behalf of L. Smith + * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/ + * + * @reporter @tashi1es + * @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/#post-13630495 + * + * + * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + * + * @since 2.1.0 + * @date 2020-11-08T1839+0100 + * @accountable @pewgeuges + */ + + // reset stored footnotes when displaying the header + self::$a_arr_Footnotes = array(); + self::$a_bool_AllowLoveMe = true; + } + + /** + * Outputs the custom css to the header of the public page. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * + * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. + * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. + * @since 2.1.3 raise settings priority to override theme stylesheets + * @since 2.1.4 Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. + * @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings. + * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. + * @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. + * @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. + * @since 2.5.4 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. + */ + public function wp_head() { + + // insert start tag without switching out of PHP: + echo "\r\n\r\n"; + + /** + * Alternative tooltip implementation relying on plain JS and CSS transitions. + * + * - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. + * + * @since 2.1.1 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 + * + * The script for alternative tooltips is printed formatted, not minified: + */ + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + ?> + +get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { + echo $this->ReferenceContainer(); + } + // get setting for love and share this plugin + $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); + // check if the admin allows to add a link to the footer + if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { + return; + } + // set a hyperlink to the word "footnotes" in the Love slug + $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); + // get random love me text + if (strtolower($l_str_LoveMeIndex) == "random") { + $l_str_LoveMeIndex = "text-" . rand(1,7); + } + switch ($l_str_LoveMeIndex) { + // options named wrt backcompat, simplest is default: + case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; + case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; + } + echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', $l_str_LoveMeText); + } + + /** + * Replaces footnotes in the post/page title. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function the_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); + } + + /** + * Replaces footnotes in the content of the current page/post. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Page/Post content. + * @return string Content with replaced footnotes. + */ + public function the_content($p_str_Content) { + + /** + * Empties the footnotes list every time Footnotes is run when the_content hook is called. + * + * - Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. + * + * @since 2.5.7 + * + * @reporter @inoruhana + * @link https://wordpress.org/support/topic/footnote-duplicated-in-the-widget/ + * + * Under certain circumstances, footnotes were duplicated, because the footnotes list was + * not emptied every time before the search algorithm was run. That happened eg when both + * the reference container resides in the widget area, and the YOAST SEO plugin is active + * and calls the hook the_content to generate the Open Graph description, while Footnotes + * is set to avoid missing out on the footnotes (in the content) by hooking in as soon as + * the_content is called, whereas at post end Footnotes seems to hook in the_content only + * the time it’s the blog engine processing the post for display and appending the refs. + */ + self::$a_arr_Footnotes = array(); + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + } + + /** + * Replaces footnotes in the excerpt of the current page/post. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Page/Post content. + * @return string Content with replaced footnotes. + */ + public function the_excerpt($p_str_Content) { + return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); + } + + /** + * Replaces footnotes in the widget title. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function widget_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); + } + + /** + * Replaces footnotes in the content of the current widget. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Widget content. + * @return string Content with replaced footnotes. + */ + public function widget_text($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + } + + /** + * Replaces footnotes in each Content var of the current Post object. + * + * @author Stefan Herndler + * @since 1.5.4 + * @param array|WP_Post $p_mixed_Posts + */ + public function the_post(&$p_mixed_Posts) { + // single WP_Post object received + if (!is_array($p_mixed_Posts)) { + $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + return; + } + // array of WP_Post objects received + for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { + $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + } + } + + /** + * Replace all Footnotes in a WP_Post object. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param WP_Post $p_obj_Post + * @return WP_Post + */ + private function replacePostObject($p_obj_Post) { + //MCI_Footnotes_Convert::debug($p_obj_Post); + $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); + $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); + $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); + return $p_obj_Post; + } + + /** + * Replaces all footnotes that occur in the given content. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @return string + * + * + * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. + * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. + */ + public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + + // replace all footnotes in the content, settings are converted to html characters + $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); + // replace all footnotes in the content, settings are NOT converted to html characters + $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); + + /** + * Reference container customized positioning through shortcode + * + * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. + * + * @since 2.2.0 + * @date 2020-12-13T2057+0100 + * + * @reporter @hamshe + * @link https://wordpress.org/support/topic/reference-container-in-elementor/ + * + * + * - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. + * + * @since 2.2.5 + * @date 2020-12-18T1434+0100 + * + * @reporter @hamshe + * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 + * + */ + // append the reference container or insert at shortcode: + $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); + if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { + $l_str_ReferenceContainerPositionShortcode = '[[references]]'; + } + + if ( $p_bool_OutputReferences ) { + + if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { + + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); + + } else { + + $p_str_Content .= $this->ReferenceContainer(); + + } + + // increment the container ID: + self::$a_int_ReferenceContainerId++; + } + + // delete position shortcode should any remain: + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); + + // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found + if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { + self::$a_bool_AllowLoveMe = false; + $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); + } + // return the content with replaced footnotes and optional reference container appended: + return $p_str_Content; + } + + /** + * Replaces all footnotes in the given content and appends them to the static property. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Content Content to be searched for footnotes. + * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @return string + * + * @since 2.0.0 various. + * @since 2.4.0 Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. + * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. + */ + public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { + + // post ID to make everything unique wrt infinite scroll and archive view + self::$a_int_PostId = get_the_id(); + + // contains the index for the next footnote on this page + $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; + + // contains the starting position for the lookup of a footnote + $l_int_PosStart = 0; + + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + // decode html special chars + if ($p_bool_ConvertHtmlChars) { + $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); + $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); + } + + // if footnotes short code is empty, return the content without changes + if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { + return $p_str_Content; + } + + /** + * Footnote delimiter syntax validation + * + * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. + * + * @since 2.4.0 + * + * + * - Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. + * - Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. + * - Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. + * + * @since 2.5.0 + * @date 2021-01-07T0824+0100 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + * + * + * If footnotes short codes are unbalanced, and syntax validation is not disabled, + * prepend a warning to the content; displays de facto beneath the post title. + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { + + // make shortcodes conform to regex syntax: + $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); + $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); + + // apply different regex depending on whether start shortcode is double/triple opening parenthesis: + if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { + + // this prevents from catching a script containing e.g. a double opening parenthesis: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; + + } else { + + // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; + } + + // check syntax and get error locations: + preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); + if ( empty( $p_arr_ErrorLocation ) ) { + self::$a_bool_SyntaxErrorFlag = false; + } + + // prevent generating and inserting the warning multiple times: + if ( self::$a_bool_SyntaxErrorFlag ) { + + // get plain text string for error location: + $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); + + // limit string length to 300 characters: + if ( strlen( $l_str_ErrorSpotString ) > 300 ) { + $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; + } + + // compose warning box: + $l_str_SyntaxErrorWarning = '

                                                                                                                                                                      '; + $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; + + // syntax validation setting in the dashboard under the General settings tab: + $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); + + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; + $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      “'; + $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; + $l_str_SyntaxErrorWarning .= '”

                                                                                                                                                                      '; + + // prepend the warning box to the content: + $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; + + // checked, set flag to false to prevent duplicate warning: + self::$a_bool_SyntaxErrorFlag = false; + + return $p_str_Content; + } + } + + + // load referrer templates if footnotes text not hidden: + if (!$p_bool_HideFootnotesText) { + + // load footnote referrer template file: + if (self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + } else { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + } + + /** + * Call Boolean again for robustness when priority levels don’t match any longer. + * + * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. + * + * @since 2.5.4 + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) + */ + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); + + // load tooltip inline script if jQuery tooltips are enabled: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); + } + + } else { + $l_obj_Template = null; + $l_obj_TemplateTooltip = null; + } + + // search footnotes short codes in the content + do { + // get first occurrence of the footnote start tag short code: + $i_int_LenContent = strlen($p_str_Content); + if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; + $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosStart === false) { + break; + } + // get first occurrence of the footnote end tag short code: + $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosEnd === false) { + break; + } + // calculate the length of the footnote + $l_int_Length = $l_int_PosEnd - $l_int_PosStart; + + // get footnote text + $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); + + // get tooltip text if present: + self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); + self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + } else { + $l_str_TooltipText = ''; + } + + /** + * URL line wrapping for Unicode non conformant browsers + * + * @since 2.1.1 (CSS) + * @since 2.1.4 (PHP) + * + * Despite Unicode recommends to line-wrap URLs at slashes, and Firefox follows + * the Unicode standard, Chrome does not, making long URLs hang out of tooltips + * or extend reference containers, so that the end is hidden outside the window + * and may eventually be viewed after we scroll horizontally or zoom out. It is + * up to the web page to make URLs breaking anywhere by wrapping them in a span + * that is assigned appropriate CSS properties and values. + * @see css/public.css + * + * - Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. + * + * @since 2.1.1 + * + * @reporter @andreasra + * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/3/#post-13657398 + * + * + * - Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. + * + * @since 2.1.3 + * @date 2020-11-23 + * + * @reporter @karolszakiel + * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/ + * + * + * - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. + * + * @since 2.1.4 + * @date 2020-11-25T0837+0100 + * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 + * + * + * - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + * + * @since 2.1.5 + * + * @reporter @bjrnet21 + * @link https://wordpress.org/support/topic/2-1-4-breaks-on-my-site-images-dont-show/ + * + * + * - Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. + * + * @since 2.1.6 + * @date 2020-12-09T1921+0100 + * + * @reporter @a223123131 + * @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/ + * + * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 + * + * - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. + * + * @since 2.1.6 + * @date 2020-12-09T1606+0100 + * + * + * - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + * + * @since 2.2.6 + * @date 2020-12-23T0409+0100 + * + * @reporter @spiralofhope2 + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ + * + * + * - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + * + * @since 2.2.7 + * @date 2020-12-23T1046+0100 + * + * @reporter @rjl20 + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825479 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825532 + * + * @reporter @lukashuggenberg + * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/ + * + * @reporter @klusik + * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13825885 + * + * @reporter @friedrichnorth + * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/ + * + * @reporter @bernardzit + * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 + * + * + * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + * @date 2020-12-23T1107+0100 + * + * Correct is duplicating the negative lookbehind w/o quotes: '(?get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + + $l_str_FootnoteText = preg_replace( + '#(?$1', + $l_str_FootnoteText + ); + } + + // Text to be displayed instead of the footnote + $l_str_FootnoteReplaceText = ""; + + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { + + // get the configurable parts: + self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); + self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); + self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); + + // streamline ID concatenation: + self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + + } + + // display the footnote referrers and the tooltips: + if (!$p_bool_HideFootnotesText) { + $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + // display only a truncated footnote text if option enabled: + $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); + $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); + + // define excerpt text as footnote text by default: + $l_str_ExcerptText = $l_str_FootnoteText; + + /** + * Tooltip truncation + * + * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. + * + * @since 2.1.0 + * @date 2020-11-08T2146+0100 + * + * @reporter @rovanov + * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + * + * If the tooltip truncation option is enabled, it’s done based on character count, + * and a trailing incomplete word is cropped. + * This is equivalent to the WordPress default excerpt generation, i.e. without a + * custom excerpt and without a delimiter. But WordPress does word count, usually 55. + */ + if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { + $l_str_DummyText = strip_tags($l_str_FootnoteText); + if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { + $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); + $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); + $l_str_ExcerptText .= ' … <'; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; + $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; + $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= "_$l_int_Index');\""; + + // if enabled, add the hard link fragment ID: + if (self::$a_bool_HardLinksEnable) { + + $l_str_ExcerptText .= ' href="#'; + $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; + $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; + $l_str_ExcerptText .= $l_int_Index; + $l_str_ExcerptText .= '"'; + } + + $l_str_ExcerptText .= '>'; + + /** + * Configurable read-on button label + * + * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. + * + * @since 2.1.0 + * @date 2020-11-08T2146+0100 + * + * @reporter @rovanov + * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + */ + $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); + + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; + } + } + + /** + * Referrers element superscript or baseline + * + * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report + * @since 2.1.1 + * + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * define the HTML element to use for the referrers: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { + + $l_str_SupSpan = 'sup'; + + } else { + + $l_str_SupSpan = 'span'; + } + + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { + + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkCloseTag = ''; + // self::$a_str_LinkOpenTag will be defined as needed + + // compose hyperlink address (leading space is in template): + $l_str_FootnoteLinkArgument = 'href="#'; + $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; + $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteLinkArgument .= $l_int_Index; + $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; + + /** + * Compose fragment ID anchor with offset, for use in reference container. + * Empty span, child of empty span, to avoid tall dotted rectangles in browser. + */ + $l_str_ReferrerAnchorElement = ''; + + } else { + + /** + * Initialize hard link variables when hard links are disabled. + * + * - Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. + * + * @since 2.4.0 + * @date 2021-01-04T1622+0100 + * + * @reporter @a223123131 + * @link https://wordpress.org/support/topic/wp_debug-php-notice/ + * + * If no hyperlink nor offset anchor is needed, initialize as empty. + */ + $l_str_FootnoteLinkArgument = ''; + $l_str_ReferrerAnchorElement = ''; + + // The link element is set independently as it may be needed for styling: + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { + + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkOpenTag = ''; + self::$a_str_LinkCloseTag = ''; + + } + } + + // determine tooltip content: + if ( self::$a_bool_TooltipsEnabled ) { + $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; + } else { + $l_str_TooltipContent = ''; + } + + /** + * Determine shrink width if alternative tooltips are enabled. + * + * @since 2.5.6 + */ + $l_str_TooltipStyle = ''; + if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { + $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); + if ( $l_int_TooltipLength < 70 ) { + $l_str_TooltipStyle = ' style="width: '; + $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); + $l_str_TooltipStyle .= 'em;"'; + } + } + + // fill in 'templates/public/footnote.html': + $l_obj_Template->replace( + array( + "link-span" => self::$a_str_LinkSpan, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "hard-link" => $l_str_FootnoteLinkArgument, + "sup-span" => $l_str_SupSpan, + "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + "index" => $l_int_Index, + "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + "anchor-element" => $l_str_ReferrerAnchorElement, + "style" => $l_str_TooltipStyle, + "text" => $l_str_TooltipContent, + ) + ); + $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); + + // reset the template + $l_obj_Template->reload(); + + // if standard tooltips are enabled but alternative are not: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + + $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); + $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); + $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); + $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); + $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); + $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); + + // fill in 'templates/public/tooltip.html': + $l_obj_TemplateTooltip->replace( + array( + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), + "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, + "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, + "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, + "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, + "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, + "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, + ) + ); + $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + $l_obj_TemplateTooltip->reload(); + } + } + // replace the footnote with the template + $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); + + // add footnote only if not empty + if (!empty($l_str_FootnoteText)) { + // set footnote to the output box at the end + self::$a_arr_Footnotes[] = $l_str_FootnoteText; + // increase footnote index + $l_int_FootnoteIndex++; + } + + /** + * Fixes a footnotes numbering bug (happening under de facto rare circumstances). + * + * - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + * + * @since 1.6.4 + * @date 2016-06-29T0054+0000 + * @committer @dartiss + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1445718 @dartiss’ class/task.php + * @link https://plugins.trac.wordpress.org/log/footnotes/trunk/class/task.php?rev=1445718 @dartiss re-added class/task.php + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class?rev=1445711 class/ w/o task.php + * @link https://plugins.trac.wordpress.org/changeset/1445711/footnotes/trunk/class @dartiss deleted class/task.php + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1026210 @aricura’s latest class/task.php + * + * + * - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. + * + * @since 2.5.5 + * + * @contributor @lolzim + * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032 + * + * @reporter @rumperuu + * @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/ + * + * This assignment was overridden by another one, causing the algorithm to jump back + * near the post start to a position calculated as the sum of the length of the last + * footnote and the length of the last footnote replace text. + * A bug disturbing the order of the footnotes depending on the text before the first + * footnote, the length of the first footnote and the length of the templates for the + * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. + */ + // add offset to the new starting position + $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); + + } while (true); + + // return content + return $p_str_Content; + } + + /** + * Generates the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + * + * @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container + * @since 2.0.3 Bugfix: prepend an arrow on user request + * @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters. + * @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings + * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. + * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. + */ + public function ReferenceContainer() { + + // no footnotes have been replaced on this page: + if (empty(self::$a_arr_Footnotes)) { + return ""; + } + + + /** + * Footnote index backlink symbol + * + * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. + * + * @since 2.1.1 + * + * @reporter @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 + * + * If the backlink symbol is enabled: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { + + // get html arrow + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); + // set html arrow to the first one if invalid index defined + if (is_array($l_str_Arrow)) { + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); + } + // get user defined arrow + $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); + if (!empty($l_str_ArrowUserDefined)) { + $l_str_Arrow = $l_str_ArrowUserDefined; + } + + // wrap the arrow in a @media print { display:hidden } span: + $l_str_FootnoteArrow = ''; + $l_str_FootnoteArrow .= $l_str_Arrow . ''; + + } else { + + // If the backlink symbol isn’t enabled, set it to empty: + $l_str_Arrow = ''; + $l_str_FootnoteArrow = ''; + + } + + + /** + * Backlink separator + * + * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. + * + * @since 2.1.4 + * @date 2020-11-28T1048+0100 + * + * @contributor @docteurfitness + * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/update-2-1-3/ + * + * Initially a comma was appended in this algorithm for enumerations. + * The comma in enumerations is not generally preferred. + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { + + // check if it is input-configured: + $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + + if (empty($l_str_Separator)) { + + // if it is not, check which option is on: + $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); + switch ($l_str_SeparatorOption) { + case 'comma' : $l_str_Separator = ','; break; + case 'semicolon': $l_str_Separator = ';'; break; + case 'en_dash' : $l_str_Separator = ' –'; break; + } + } + + } else { + + $l_str_Separator = ''; + } + + /** + * Backlink terminator + * + * Initially a dot was appended in the table row template. + * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; + * making it optional was envisaged. + * @since 2.1.4 the terminator is optional, has options, and is configurable: + */ + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { + + // check if it is input-configured: + $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + + if (empty($l_str_Terminator)) { + + // if it is not, check which option is on: + $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); + switch ($l_str_TerminatorOption) { + case 'period' : $l_str_Terminator = '.'; break; + case 'parenthesis': $l_str_Terminator = ')'; break; + case 'colon' : $l_str_Terminator = ':'; break; + } + } + + } else { + + $l_str_Terminator = ''; + } + + + /** + * Line breaks + * + * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. + * + * @since 2.1.4 + * @date 2020-11-28T1049+0100 + * + * The backlinks of combined footnotes are generally preferred in an enumeration. + * But when few footnotes are identical, stacking the items in list form is better. + * Variable number length and proportional character width require explicit line breaks. + * Otherwise, an ordinary space character offering a line break opportunity is inserted. + */ + $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                                                                                                      ' : ' '; + + /** + * For maintenance and support, table rows in the reference container should be + * separated by an empty line. So we add these line breaks for source readability. + * Before the first table row (breaks between rows are ~200 lines below): + */ + $l_str_Body = "\r\n\r\n"; + + + /** + * Reference container table row template load + * + * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. + * + * @since 2.1.1 + * @date 2020-11-16T2024+0100 + */ + + // when combining identical footnotes is turned on, another template is needed: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + // the combining template allows for backlink clusters and supports cell clicking for single notes: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); + + } else { + + // when 3-column layout is turned on (only available if combining is turned off): + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); + + } else { + + // when switch symbol and index is turned on, and combining and 3-columns are off: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); + + } else { + + // default is the standard template: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); + + } + } + } + + /** + * Switch backlink symbol and footnote number + * + * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. + * + * @since 2.1.1 + * @date 2020-11-16T2024+0100 + * + * @contributor @spaceling + * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 + * + * + * - Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. + * + * @since 2.1.4 + * @date 2020-11-26T1633+0100 + */ + $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); + + // loop through all footnotes found in the page + for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { + + // get footnote text + $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; + + // if footnote is empty, go to the next one; + // With combine identicals turned on, identicals will be deleted and are skipped: + if (empty($l_str_FootnoteText)) { + continue; + } + + // generate content of footnote index cell + $l_int_FirstFootnoteIndex = ($l_int_Index + 1); + + // get the footnote index string and + // keep supporting legacy index placeholder: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + /** + * Case of only one backlink per table row + * + * If enabled, and for the case the footnote is single, compose hard link: + */ + // define anyway: + $l_str_HardLinkAddress = ''; + + if (self::$a_bool_HardLinksEnable) { + + /** + * Use-Backbutton-Hint tooltip, optional and configurable. + * + * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. + * + * @since 2.5.4 + * + * @reporter @theroninjedi47 + * @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ + * + * When hard links are enabled, clicks on the backlinks are logged in the browsing history. + * 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 + */ + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_UseBackbuttonHint = ' title="'; + $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); + $l_str_UseBackbuttonHint .= '"'; + } else { + $l_str_UseBackbuttonHint = ''; + } + + /** + * Compose fragment ID anchor with offset, for use in reference container. + * Empty span, child of empty span, to avoid tall dotted rectangles in browser. + */ + $l_str_FootnoteAnchorElement = ''; + + // compose optional hard link address: + $l_str_HardLinkAddress = ' href="#'; + $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; + $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; + $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; + $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; + + // compose optional opening link tag with optional hard link, mandatory for instance: + self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + + // ID, optional hard link address, and class: + $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; + $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteReference .= self::$a_int_PostId; + $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= ' href="#'; + $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; + $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; + } + $l_str_FootnoteReference .= ' class="footnote_backlink"'; + + // the click event goes in the table cell if footnote remains single: + $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; + + + // the dedicated template enumerating backlinks uses another variable: + $l_str_FootnoteBacklinks = $l_str_FootnoteReference; + + // append the click event right to the backlink item for enumerations; + // else it goes in the table cell: + $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; + $l_str_FootnoteReference .= '>'; + + // append the optional offset anchor for hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; + $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; + } + + // continue both single note and notes cluster, depending on switch option status: + if ($l_bool_SymbolSwitch) { + + $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + + } else { + + $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + + } + + // If that is the only footnote with this text, we’re almost done. + + // check if it isn't the last footnote in the array: + if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { + + // get all footnotes that haven't passed yet: + for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { + + // check if a further footnote is the same as the actual one: + if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { + + // if so, set the further footnote as empty so it won't be displayed later: + self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; + + // set the flag to true for the combined status: + $l_bool_FlagCombined = true; + + // update the footnote ID: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + + // resume composing the backlinks enumeration: + $l_str_FootnoteBacklinks .= "$l_str_Separator'; + $l_str_FootnoteBacklinks .= $l_str_LineBreak; + $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; + $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; + + // insert the optional hard link address: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ' href="#'; + $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; + $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; + } + + $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; + $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; + + // append the offset anchor for optional hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ''; + } + + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; + + } + } + } + + // append terminator and end tag: + $l_str_FootnoteReference .= $l_str_Terminator . ''; + $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; + + } + + // line wrapping of URLs already fixed, see above + + // get reference container item text if tooltip text goes separate: + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); + self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_MirrorTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); + $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; + } else { + $l_str_ReferenceText = $l_str_NotTooltipText; + } + } else { + $l_str_ReferenceText = $l_str_FootnoteText; + } + + // replace all placeholders in table row template: + $l_obj_Template->replace( + array( + + // placeholder used in all templates: + "text" => $l_str_ReferenceText, + + // used in standard layout W/O COMBINED FOOTNOTES: + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "link-start" => self::$a_str_LinkOpenTag, + "link-end" => self::$a_str_LinkCloseTag, + "link-span" => self::$a_str_LinkSpan, + "terminator" => $l_str_Terminator, + "anchor-element" => $l_str_FootnoteAnchorElement, + "hard-link" => $l_str_HardLinkAddress, + + // used in standard layout WITH COMBINED IDENTICALS TURNED ON: + "pointer" => $l_bool_FlagCombined ? '' : ' pointer', + "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, + "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + + // Legacy placeholders for use in legacy layout templates: + "arrow" => $l_str_FootnoteArrow, + "index" => $l_str_FootnoteId, + ) + ); + + $l_str_Body .= $l_obj_Template->getContent(); + + // extra line breaks for page source readability: + $l_str_Body .= "\r\n\r\n"; + + $l_obj_Template->reload(); + + } + + // call again for robustness when priority levels don’t match any longer: + self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); + + // streamline: + $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); + + /** + * Reference container label + * + * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. + * + * @since 2.4.0 + * @date 2021-01-04T0504+0100 + * + * @reporter @lukashuggenberg + * + * Themes may drop-cap a first letter of initial paragraphs, like this label. + * In case of empty label that would apply to the left half button character. + * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. + */ + $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); + + /** + * Select the reference container template according to the script mode. + * + * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. + * + * @since 2.5.6 + * + * @reporter @hopper87it + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ + * + * @reporter @pkverma99 + * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 + */ + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + + if ( $l_str_ScriptMode == 'jquery' ) { + + // load 'templates/public/reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); + + } else { + + // load 'templates/public/js-reference-container.html': + $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); + } + + $l_obj_TemplateContainer->replace( + array( + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), + "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, + "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', + "style" => $l_bool_CollapseDefault ? 'display: none;' : '', + "content" => $l_str_Body, + "scroll-offset" => (self::$a_int_ScrollOffset / 100), + "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), + ) + ); + + // free all found footnotes if reference container will be displayed + self::$a_arr_Footnotes = array(); + + return $l_obj_TemplateContainer->getContent(); + } +} diff --git a/class/template.php b/class/template.php index d8c19b9..2c0b8d4 100644 --- a/class/template.php +++ b/class/template.php @@ -1,261 +1,261 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); - - /** - * Modularize functions - * - * @since 2.4.0d3 - * - * @author Patrizia Lutz @misfist - */ - if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { - $this->process_template( $template ); - } else { - return; - } - - } - - /** - * Replace all placeholders specified in array. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). - * @return bool True on Success, False if Placeholders invalid. - */ - public function replace($p_arr_Placeholders) { - // no placeholders set - if (empty($p_arr_Placeholders)) { - return false; - } - // template content is empty - if (empty($this->a_str_ReplacedContent)) { - return false; - } - // iterate through each placeholder and replace it with its value - foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { - $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); - } - // success - return true; - } - - /** - * Reloads the original content of the template file. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function reload() { - $this->a_str_ReplacedContent = $this->a_str_OriginalContent; - } - - /** - * Returns the content of the template file with replaced placeholders. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string Template content with replaced placeholders. - */ - public function getContent() { - return $this->a_str_ReplacedContent; - } - - /** - * Process template file - * - * @author Patrizia Lutz @misfist - * - * @since 2.4.0d3 - * - * @param string $template - * @return void - * - * - * @since 2.0.3 replace tab with a space - * @since 2.0.3 replace 2 spaces with 1 - * @since 2.0.4 collapse multiple spaces - * @since 2.2.6 delete a space before a closing pointy bracket - * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) - */ - public function process_template( $template ) { - $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); - $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); - $this->reload(); - } - - /** - * Get the template - * - * @author Patrizia Lutz @misfist - * - * @since 2.4.0d3 - * - * @param string $p_str_FileType - * @param string $p_str_FileName - * @param string $p_str_Extension - * @return mixed false | template path - */ - public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { - $located = false; - - /** - * The directory change be modified - * @usage to change location of templates to `template_parts/footnotes/': - * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/; - * } ); - */ - $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; - - /** - * Look in active (child) theme - */ - if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { - $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - - /** - * Look in parent theme - */ - } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { - $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - - /** - * Look in custom directory - */ - } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { - $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - - /** - * Look in plugin - */ - } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { - $located = $this->plugin_directory . 'templates/' . $template_name; - } - - return $located; - } - -} // end of class +plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); + + /** + * Modularize functions + * + * @since 2.4.0d3 + * + * @author Patrizia Lutz @misfist + */ + if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { + $this->process_template( $template ); + } else { + return; + } + + } + + /** + * Replace all placeholders specified in array. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). + * @return bool True on Success, False if Placeholders invalid. + */ + public function replace($p_arr_Placeholders) { + // no placeholders set + if (empty($p_arr_Placeholders)) { + return false; + } + // template content is empty + if (empty($this->a_str_ReplacedContent)) { + return false; + } + // iterate through each placeholder and replace it with its value + foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { + $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); + } + // success + return true; + } + + /** + * Reloads the original content of the template file. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function reload() { + $this->a_str_ReplacedContent = $this->a_str_OriginalContent; + } + + /** + * Returns the content of the template file with replaced placeholders. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string Template content with replaced placeholders. + */ + public function getContent() { + return $this->a_str_ReplacedContent; + } + + /** + * Process template file + * + * @author Patrizia Lutz @misfist + * + * @since 2.4.0d3 + * + * @param string $template + * @return void + * + * + * @since 2.0.3 replace tab with a space + * @since 2.0.3 replace 2 spaces with 1 + * @since 2.0.4 collapse multiple spaces + * @since 2.2.6 delete a space before a closing pointy bracket + * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) + */ + public function process_template( $template ) { + $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); + $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); + $this->reload(); + } + + /** + * Get the template + * + * @author Patrizia Lutz @misfist + * + * @since 2.4.0d3 + * + * @param string $p_str_FileType + * @param string $p_str_FileName + * @param string $p_str_Extension + * @return mixed false | template path + */ + public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { + $located = false; + + /** + * The directory change be modified + * @usage to change location of templates to `template_parts/footnotes/': + * add_filter( 'mci_footnotes_template_directory', function( $directory ) { + * return 'template_parts/footnotes/; + * } ); + */ + $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; + + /** + * Look in active (child) theme + */ + if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { + $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; + + /** + * Look in parent theme + */ + } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { + $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; + + /** + * Look in custom directory + */ + } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { + $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; + + /** + * Look in plugin + */ + } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { + $located = $this->plugin_directory . 'templates/' . $template_name; + } + + return $located; + } + +} // end of class diff --git a/class/widgets/base.php b/class/widgets/base.php index 7e8ece1..ad41077 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,88 +1,88 @@ - echo the Widget Content - * **public function form($instance)** -> echo the Settings of the Widget - * - * @author Stefan Herndler - * @since 1.5.0 - */ -abstract class MCI_Footnotes_WidgetBase extends WP_Widget { - - /** - * Returns an unique ID as string used for the Widget Base ID. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getID(); - - /** - * Returns the Public name of child Widget to be displayed in the Configuration page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getName(); - - /** - * Returns the Description of the child widget. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - abstract protected function getDescription(); - - /** - * Returns the width of the Widget. Default width is 250 pixel. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return int - */ - protected function getWidgetWidth() { - return 250; - } - - /** - * Class Constructor. Registers the child Widget to WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. - * - * @since 1.6.4 - * @contributor @dartiss - * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720 - * “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.” - */ - public function __construct() { - $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); - $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); - // registers the Widget - parent::__construct( - strtolower($this->getID()), // unique ID for the widget, has to be lowercase - $this->getName(), // Plugin name to be displayed - $l_arr_WidgetOptions, // Optional Widget Options - $l_arr_ControlOptions // Optional Widget Control Options - ); - } -} + echo the Widget Content + * **public function form($instance)** -> echo the Settings of the Widget + * + * @author Stefan Herndler + * @since 1.5.0 + */ +abstract class MCI_Footnotes_WidgetBase extends WP_Widget { + + /** + * Returns an unique ID as string used for the Widget Base ID. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getID(); + + /** + * Returns the Public name of child Widget to be displayed in the Configuration page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getName(); + + /** + * Returns the Description of the child widget. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + abstract protected function getDescription(); + + /** + * Returns the width of the Widget. Default width is 250 pixel. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return int + */ + protected function getWidgetWidth() { + return 250; + } + + /** + * Class Constructor. Registers the child Widget to WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * - Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. + * + * @since 1.6.4 + * @contributor @dartiss + * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/widgets/base.php?rev=1445720 + * “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.” + */ + public function __construct() { + $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); + $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); + // registers the Widget + parent::__construct( + strtolower($this->getID()), // unique ID for the widget, has to be lowercase + $this->getName(), // Plugin name to be displayed + $l_arr_WidgetOptions, // Optional Widget Options + $l_arr_ControlOptions // Optional Widget Control Options + ); + } +} diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 693ef58..2e322ec 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,85 +1,85 @@ -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { - echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); - } - } -} +get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { + echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); + } + } +} diff --git a/class/wysiwyg.php b/class/wysiwyg.php index d8b558b..3a27477 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,83 +1,83 @@ -getContent(); - } - - /** - * Includes the Plugins WYSIWYG editor script. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param array $p_arr_Plugins Scripts to be included to the editor. - * @return array - */ - public static function includeScripts($p_arr_Plugins) { - $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); - return $p_arr_Plugins; - } - - /** - * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. - * Returns an JSON encoded array with the Footnotes start and end short code. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public static function ajaxCallback() { - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); - exit; - } +getContent(); + } + + /** + * Includes the Plugins WYSIWYG editor script. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param array $p_arr_Plugins Scripts to be included to the editor. + * @return array + */ + public static function includeScripts($p_arr_Plugins) { + $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); + return $p_arr_Plugins; + } + + /** + * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. + * Returns an JSON encoded array with the Footnotes start and end short code. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public static function ajaxCallback() { + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); + exit; + } } \ No newline at end of file diff --git a/css/dev-common.css b/css/dev-common.css index a450c96..2b8e657 100644 --- a/css/dev-common.css +++ b/css/dev-common.css @@ -1,591 +1,591 @@ -/* - * .footnote_plugin_tooltip_text = inner - * .footnote_tooltip = inner - */ - -.footnote_referrer, -.footnote_referrer:link, -.footnote_referrer:hover, -.footnote_referrer > a, -.footnote_referrer > a:link, -.footnote_referrer > a:hover, -.footnote_plugin_tooltip_text, -.footnote_plugin_tooltip_text:hover, -.main-content .footnote_referrer, -.main-content .footnote_referrer:link, -.main-content .footnote_referrer:hover, -.main-content .footnote_referrer > a, -.main-content .footnote_referrer > a:link, -.main-content .footnote_referrer > a:hover, -.main-content .footnote_plugin_tooltip_text, -.main-content .footnote_plugin_tooltip_text:hover { - text-decoration: none !important; - border-bottom: none !important; - box-shadow: none !important; -} - -/** - * Footnote referrer (not “tooltip text”) - * - * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. - * - * @since 2.1.1 - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. - * - * @since 2.5.4 - * @reporter @wisenilesh - * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ - */ - -.footnote_plugin_tooltip_text { - line-height: 0; - position: relative !important; - cursor: pointer; -} - -/** - * Tooltips - * - * - Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. - * - * @since 2.1.6 - * @reporter @russianicons - * @link https://wordpress.org/support/topic/counter-styles-not-working/#post-13767299 - */ - -.footnote_tooltip { - display: none; - z-index: 2147483647 !important; - cursor: auto; - text-align: left; - padding: 12px; - line-height: 1.2; - font-weight: normal; - font-style: normal; -} - -/** - * Alternative tooltips - * - * These default position values may be overridden by internal CSS. - */ - -.footnote_referrer.relative { - position: relative; -} - -.footnote_tooltip.position { - display: unset; - position: absolute; - bottom: 24px; - left: -50px; - width: 400px; -} - -/* -fade-in parameters -*/ - -.footnote_tooltip.shown { - visibility: visible; - opacity: 1; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 0ms; - transition-duration: 200ms; -*/ -} - -/* -fade-out parameters -*/ - -.footnote_tooltip.hidden { - visibility: hidden; - opacity: 0; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 400ms; - transition-duration: 200ms; -*/ -} - -/* -Read-on button -*/ - -.footnote_tooltip_continue { - font-style: italic; - color: green; - text-decoration: none !important; - cursor: pointer; - white-space: nowrap; -} - -.footnote_tooltip_continue:hover { - color: blue; - text-decoration: underline !important; -} - - -/***************************************************** -Footnote reference container - -Templates: -templates/public/reference-container.html -templates/public/reference-container-body.html -templates/public/reference-container-combi.html -templates/public/reference-container-switch.html -templates/public/reference-container-3column.html - -Optional responsive basic page layout support -stylesheets: -css/layout-reference-container.css -css/layout-main-content.css -css/layout-page-content.css - -Classes: -.footnotes_reference_container = enclosing
                                                                                                                                                                      -.footnote_container_prepare = label
                                                                                                                                                                      -.footnote_reference_container_label = -.footnote_reference_container_collapse_button = sibling -.footnote-reference-container = misleading and inconsistent; alias: -.footnotes_table = -.footnotes_plugin_reference_row = -.footnote_plugin_index_combi = first '; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; - $l_str_WordPressPlugins .= ''; - } - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "server" => $_SERVER["SERVER_NAME"], - - "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php" => phpversion(), - - "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "user-agent" => $_SERVER["HTTP_USER_AGENT"], - - "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "memory-limit" => ini_get('memory_limit'), - - "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "php-extensions" => $l_str_PhpExtensions, - - "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "wordpress" => $wp_version, - - "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", - - "plugins" => $l_str_WordPressPlugins - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php deleted file mode 100644 index 940a22b..0000000 --- a/class/dashboard/subpage-main.php +++ /dev/null @@ -1,1182 +0,0 @@ -addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); - - // sync tab name with mirror in public function CustomCSSMigration(): - $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); - - $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); - $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); - $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); - - return $l_arr_Tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * HyperlinkArrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function getMetaBoxes() { - $l_arr_MetaBoxes = array(); - - // sync box name with mirror in task.php: - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); - $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); - } - - $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); - } - $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); - - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); - $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); - - return $l_arr_MetaBoxes; - } - - /** - * Displays all settings for the reference container. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function ReferenceContainer() { - - // options for the label element: - $l_arr_LabelElement = array( - "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the positioning of the reference container - $l_arr_Positions = array( - "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), - "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // basic responsive page layout options: - $l_arr_PageLayoutOptions = array( - "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the separating punctuation between backlinks: - $l_arr_Separators = array( - // Unicode character names are conventionally uppercase. - "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because - // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_Terminators = array( - "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): - "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the first column width (per cent is a ratio, not a unit): - $l_arr_WidthUnits = array( - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for reference container script mode: - $l_arr_ScriptMode = array( - "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), - - "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), - - "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), - - "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), - - "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), - "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), - "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), - - "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), - "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-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), - - "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), - "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), - "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), - "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), - "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), - - "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), - "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), - "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), - "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), - "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), - "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), - "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), - "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), - "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), - "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), - "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), - "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), - "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), - "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), - "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all options for the footnotes start and end tag short codes - * Displays all options for the footnotes numbering - * Displays all options for the scrolling behavior - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function StartEnd() { - // footnotes start tag short code options: - $l_arr_ShortCodeStart = array( - "((" => "((", - "(((" => "(((", - "{{" => "{{", - "{{{" => "{{{", - "[n]" => "[n]", - "[fn]" => "[fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[ref]" => "[ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // footnotes end tag short code options: - $l_arr_ShortCodeEnd = array( - "))" => "))", - ")))" => ")))", - "}}" => "}}", - "}}}" => "}}}", - "[/n]" => "[/n]", - "[/fn]" => "[/fn]", - htmlspecialchars("") => htmlspecialchars(""), - "[/ref]" => "[/ref]", - htmlspecialchars("") => htmlspecialchars(""), - // Custom (user-defined) start and end tags bracketing the footnote text inline: - "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the syntax validation: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), - "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), - - "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), - "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), - - // for script showing/hiding user defined text boxes: - "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // option to enable syntax validation, label mirrored in task.php: - "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), - "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Numbering() { - // define some space for the output - $l_str_Space = "     "; - // options for the combination of identical footnotes - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the numbering style of the footnotes: - $l_arr_CounterStyle = array( - "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", - "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", - "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", - "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", - "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", - "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), - - // algorithmically combine identicals: - "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), - "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // Support for Ibid. notation added thanks to @meglio in . - "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function Scrolling() { - - // options for enabling hard links for AMP compat: - $l_arr_Enable = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), - "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), - "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable hard links for AMP compat: - "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), - "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), - "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), - "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), - "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // enable backlink tooltips: - "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), - "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), - "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function Love() { - // options for the acknowledgment display in the footer: - $l_arr_Love = array( - // logo only: - "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // logo followed by heart symbol: - "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // logo preceded by heart symbol: - "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. - "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), - // "This website uses Footnotes." - "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the Footnotes plugin." - "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - // "This website uses the awesome Footnotes plugin." - "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), - "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // "No display of any “Footnotes love” mention in the footer" - "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), - - "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), - "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the excerpt setting - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function Excerpts() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), - "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. - "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnote referrers - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function Superscript() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for superscript normalize scope: - $l_arr_NormalizeSuperscript = array( - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), - - "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - - "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - - "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), - "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the footnotes mouse-over box. - * - * @author Stefan Herndler - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function MouseOverBox() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), - "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), - "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the name of the plugin as logogram “footnotes”. - "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxPosition() { - - // options for the Mouse-over box position - $l_arr_Position = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - // options for the alternative Mouse-over box position - $l_arr_AlternativePosition = array( - "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), - "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), - "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), - "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), - "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxDimensions() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), - "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), - "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTiming() { - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), - "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), - "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), - "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), - "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxTruncation() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), - - "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), - // The feature trims back until the last full word. - "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxText() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), - "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), - "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), - "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function MouseOverBoxAppearance() { - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - // options for the font size unit: - $l_arr_FontSizeUnits = array( - "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); - // replace all placeholders - $l_obj_Template->replace( - array( - - "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), - "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), - "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), - "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), - // To use default: Clear or leave empty. - "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), - // To use default: Clear or leave empty. - "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), - "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), - // To use default: Clear or leave empty. - "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), - "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), - // To use default: Clear or leave empty. - "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all settings for the prepended symbol - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function HyperlinkArrow() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), - "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), - "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays the custom css box. - * - * @author Stefan Herndler - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function CustomCSS() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text", - // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-2" => ".footnote_tooltip", - // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-3" => ".footnote_plugin_index", - // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - // "label-class-4" => ".footnote_plugin_text", - // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSMigration() { - - // options for Yes/No select box: - $l_arr_Enabled = array( - "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ); - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), - "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), - "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), - "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - // The placeholder is the “Referrers and tooltips” settings tab name. - "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - public function CustomCSSNew() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); - // replace all placeholders - $l_obj_Template->replace( - array( - "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), - - "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), - - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @author Stefan Herndler - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function LookupHooks() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); - - // replace all placeholders - $l_obj_Template->replace( - array( - - "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), - "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - - "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), - "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), - "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", - - "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), - "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), - "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", - - "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), - "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), - "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", - - "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), - "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), - "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", - - "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), - "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), - "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), - "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays a short introduction of the Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Help() { - global $g_obj_MCI_Footnotes; - // load footnotes starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - - if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { - // load user defined starting and end tag - $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); - } - $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". - " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". - " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". - " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". - " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." - . $l_arr_Footnote_EndingTag["value"] . " World!"; - - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); - // replace all placeholders - $l_obj_Template->replace( - array( - "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "start" => $l_arr_Footnote_StartingTag["value"], - - "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "end" => $l_arr_Footnote_EndingTag["value"], - - "example-code" => $l_str_Example, - "example-string" => "
                                                                                                                                                                      " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), - - "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') - ) - ); - // call wp_head function to get the Styling of the mouse-over box - $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } - - /** - * Displays all Donate button to support the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Donate() { - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); - // replace all placeholders - $l_obj_Template->replace( - array( - "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) - ) - ); - // display template with replaced placeholders - echo $l_obj_Template->getContent(); - } -} diff --git a/class/hooks.php b/class/hooks.php index e86d106..617a658 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,19 +1,18 @@ -ClearAll(); } /** * Add Links to the Plugin in the "installed Plugins" page. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Links Current Links. - * @param string $p_str_PluginFileName Plugins init file name. + * @param array $p_arr_links Current Links. + * @param string $p_str_plugin_file_name Plugins init file name. * @return array */ - public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { - // append link to the WordPress Plugin page - $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the Settings page - $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // append link to the PlayPal Donate function - $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - // return new links - return $p_arr_Links; + public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { + // Append link to the WordPress Plugin page. + $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); + // Append link to the settings page. + $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); + // Append link to the PayPal donate function. + $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); + // Return new links. + return $p_arr_links; } } diff --git a/class/init.php b/class/init.php index e1001a3..812bd13 100644 --- a/class/init.php +++ b/class/init.php @@ -1,13 +1,11 @@ -initializeDashboard(); - // initialize the Plugin Task - $this->initializeTask(); + // Initialize the Plugin Dashboard. + $this->initialize_dashboard(); + // Initialize the Plugin Task. + $this->initialize_task(); - // Register all Public Stylesheets and Scripts - add_action('init', array($this, 'registerPublic')); - // Enqueue all Public Stylesheets and Scripts - add_action('wp_enqueue_scripts', array($this, 'registerPublic')); - // Register all Widgets of the Plugin. - add_action('widgets_init', array($this, 'initializeWidgets')); + // Register all Public Stylesheets and Scripts. + add_action( 'init', array( $this, 'register_public' ) ); + // Enqueue all Public Stylesheets and Scripts. + add_action( 'wp_enqueue_scripts', array( $this, 'register_public' ) ); + // Register all Widgets of the Plugin.. + add_action( 'widgets_init', array( $this, 'initialize_widgets' ) ); } /** * Initializes all Widgets of the Plugin. * - * @author Stefan Herndler * @since 1.5.0 * - * * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution * * @since 1.6.5 @@ -129,37 +124,34 @@ class MCI_Footnotes { * and use the bare register_widget() here. * @see self::run() * - * Also, the visibility of initializeWidgets() is not private any longer. + * Also, the visibility of initialize_widgets() is not private any longer. */ - public function initializeWidgets() { - register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); + public function initialize_widgets() { + register_widget( 'MCI_Footnotes_Widget_Reference_container' ); } /** * Initializes the Dashboard of the Plugin and loads them. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeDashboard() { + private function initialize_dashboard() { new MCI_Footnotes_Layout_Init(); } /** * Initializes the Plugin Task and registers the Task hooks. * - * @author Stefan Herndler * @since 1.5.0 */ - private function initializeTask() { - $this->a_obj_Task = new MCI_Footnotes_Task(); - $this->a_obj_Task->registerHooks(); + private function initialize_task() { + $this->a_obj_task = new MCI_Footnotes_Task(); + $this->a_obj_task->register_hooks(); } /** * Registers and enqueues scripts and stylesheets to the public pages. * - * @author Stefan Herndler * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. @@ -168,7 +160,7 @@ class MCI_Footnotes { * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ - public function registerPublic() { + public function register_public() { /** * Enqueues external scripts. @@ -181,10 +173,10 @@ class MCI_Footnotes { * * The condition about tooltips was missing, only the not-alternative-tooltips part was present. */ - // set conditions re-used for stylesheet enqueuing: - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); + // Set conditions re-used for stylesheet enqueuing. + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); /** * Enqueues the jQuery library registered by WordPress. @@ -195,68 +187,79 @@ class MCI_Footnotes { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * jQuery is also used for animated scrolling, so it was loaded by default. * The function wp_enqueue_script() avoids loading the same library multiple times. * After adding the alternative reference container, jQuery has become optional, * but still enabled by default. */ - if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { - + if ( 'jquery' === $l_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) { + wp_enqueue_script( 'jquery' ); - + } - if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { /** * Enqueues the jQuery Tools library shipped with the plugin. * - * redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js - * added versioning 2020-11-18T2150+0100 - * not use '-js' in the handle, is appended automatically + * Redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js. + * + * Add versioning. + * + * @since 2.1.2 + * @date 2020-11-18T2150+0100 + * + * No '-js' in the handle, is appended automatically. + * + * Deferring to the footer breaks jQuery tooltip display. + * @date 2021-02-23T1105+0100 */ wp_enqueue_script( 'mci-footnotes-jquery-tools', - plugins_url('footnotes/js/jquery.tools.min.js'), + plugins_url( 'footnotes/js/jquery.tools.min.js' ), array(), - '1.2.7.redacted.2' + '1.2.7.redacted.2', + false ); - /** - * Registers jQuery UI from the JavaScript Content Delivery Network. - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - * Used to add jQuery UI following @vonpiernik: - * : - * - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. - * - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * This was enabled in Footnotes v2.0.0 through v2.0.3. - * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 - */ - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 - //wp_enqueue_script( 'jQueryUI' ); - /** - * This is then needed instead of the above first instance: - * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 - */ - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - /** * Enqueues some jQuery UI libraries registered by WordPress. * - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * + * @reporter @rajinderverma + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/ + * + * @reporter @ericcorbett2 + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 + * + * @reporter @honlapdavid + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 + * + * Fetch jQuery UI from cdnjs.cloudflare.com. + * @since 2.0.0 + * @date 2020-10-26T1907+0100 + * @contributor @vonpiernik + * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 + * + * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. + * + * @since 2.0.4 + * @date 2020-11-01T1902+0100 + * @reporter @check2020de + * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ + * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui + * * If alternative tooltips are enabled, these libraries are not needed. */ wp_enqueue_script( 'jquery-ui-core' ); @@ -308,34 +311,43 @@ class MCI_Footnotes { * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. */ - // set tooltip mode for use in stylesheet name: - if ( self::$a_bool_TooltipsEnabled ) { - if ( self::$a_bool_AlternativeTooltipsEnabled ) { - $l_str_TooltipMode = 'al'; - $l_str_TComplement = 'ternative-tooltips'; + // Set tooltip mode for use in stylesheet name. + if ( self::$a_bool_tooltips_enabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_str_tooltip_mode_short = 'al'; + $l_str_tooltip_mode_rest = 'ternative-tooltips'; } else { - $l_str_TooltipMode = 'jq'; - $l_str_TComplement = 'uery-tooltips'; + $l_str_tooltip_mode_short = 'jq'; + $l_str_tooltip_mode_rest = 'uery-tooltips'; } } else { - $l_str_TooltipMode = 'no'; - $l_str_TComplement = '-tooltips'; + $l_str_tooltip_mode_short = 'no'; + $l_str_tooltip_mode_rest = '-tooltips'; } - // set basic responsive page layout mode for use in stylesheet name: - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - switch ( $l_str_PageLayoutOption ) { - case "reference-container": $l_str_LayoutMode = '1'; break; - case "entry-content" : $l_str_LayoutMode = '2'; break; - case "main-content" : $l_str_LayoutMode = '3'; break; - case "none": default: $l_str_LayoutMode = '0'; break; + // Set basic responsive page layout mode for use in stylesheet name. + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + switch ( $l_str_page_layout_option ) { + case 'reference-container': + $l_str_layout_mode = '1'; + break; + case 'entry-content': + $l_str_layout_mode = '2'; + break; + case 'main-content': + $l_str_layout_mode = '3'; + break; + case 'none': + default: + $l_str_layout_mode = '0'; + break; } - // enqueue the tailored united minified stylesheet: + // Enqueue the tailored united minified stylesheet. wp_enqueue_style( - 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, + 'mci-footnotes-' . $l_str_tooltip_mode_short . $l_str_tooltip_mode_rest . '-pagelayout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, @@ -356,12 +368,12 @@ class MCI_Footnotes { wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_PageLayoutOption != 'none') { + $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); + if ( 'none' !== $l_str_page_layout_option ) { wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + 'mci-footnotes-layout-' . $l_str_page_layout_option, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' ), array(), C_STR_FOOTNOTES_VERSION, diff --git a/class/language.php b/class/language.php index fccf143..fd86a8c 100644 --- a/class/language.php +++ b/class/language.php @@ -1,13 +1,11 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_id, + 'title' => $p_str_title, + 'submit' => $p_bool_has_submit_button, + 'container' => $p_int_settings_container_index, + ); + } + + /** + * Returns an array describing a meta box. + * + * @since 1.5.0 + * @param string $p_str_section_id Parent Section ID. + * @param string $p_str_id Unique ID suffix. + * @param string $p_str_title Title for the meta box. + * @param string $p_str_callback_function_name Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function add_meta_box( $p_str_section_id, $p_str_id, $p_str_title, $p_str_callback_function_name ) { + return array( + 'parent' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_section_id, + 'id' => $p_str_id, + 'title' => $p_str_title, + 'callback' => $p_str_callback_function_name, + ); + } + + /** + * Registers a sub page. + * + * @since 1.5.0 + */ + public function register_sub_page() { + global $submenu; + + if ( array_key_exists( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ), $submenu ) ) { + foreach ( $submenu[ plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ) ] as $l_arr_sub_menu ) { + if ( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ) === $l_arr_sub_menu[2] ) { + remove_submenu_page( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ); + } + } + } + + $this->a_str_sub_page_hook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, + $this->get_sub_page_title(), + $this->get_sub_page_title(), + 'manage_options', + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), + array( $this, 'display_content' ) + ); + } + + /** + * Registers all sections for a sub page. + * + * @since 1.5.0 + */ + public function register_sections() { + foreach ( $this->get_sections() as $l_arr_section ) { + // Append tab to the tab-array. + $this->a_arr_sections[ $l_arr_section['id'] ] = $l_arr_section; + add_settings_section( + $l_arr_section['id'], + '', + array( $this, 'Description' ), + $l_arr_section['id'] + ); + $this->register_meta_boxes( $l_arr_section['id'] ); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @since 1.5.0 + * @param string $p_str_parent_id Parent section unique id. + */ + private function register_meta_boxes( $p_str_parent_id ) { + // Iterate through each meta box. + foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) { + if ( $p_str_parent_id !== $l_arr_meta_box['parent'] ) { + continue; + } + add_meta_box( + $p_str_parent_id . '-' . $l_arr_meta_box['id'], + $l_arr_meta_box['title'], + array( $this, $l_arr_meta_box['callback'] ), + $p_str_parent_id, + 'main' + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @since 1.5.0 + */ + private function append_scripts() { + wp_enqueue_script( 'postbox' ); + wp_enqueue_style( 'wp-color-picker' ); + wp_enqueue_script( 'wp-color-picker' ); + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style( 'mci-footnotes-admin' ); + } + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * Displays the content of specific sub page. + * + * @since 1.5.0 + */ + public function display_content() { + $this->append_scripts(); + + // TODO: add nonce verification. + + // Get the current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + // Store settings. + $l_bool_settings_updated = false; + if ( array_key_exists( 'save-settings', $_POST ) ) { + if ( 'save' === $_POST['save-settings'] ) { + unset( $_POST['save-settings'] ); + unset( $_POST['submit'] ); + $l_bool_settings_updated = $this->save_settings(); + } + } + + // Display all sections and highlight the active section. + echo '
                                                                                                                                                                      '; + echo '
                                                                                                                                                                      '; + + if ( $l_bool_settings_updated ) { + echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); + } + + // Form to submit the active section. + echo '
                                                                                                                                                                      '; + echo ''; + // Outputs the settings field of the active section. + do_settings_sections( $l_arr_active_section['id'] ); + do_meta_boxes( $l_arr_active_section['id'], 'main', null ); + + // Add submit button to active section if defined. + if ( $l_arr_active_section['submit'] ) { + submit_button(); + } + echo ''; + echo '
                                                                                                                                                                      '; + + // Echo JavaScript for the expand/collapse function of the meta boxes. + echo ''; + } + // phpcs:enable + + // phpcs:disable WordPress.Security.NonceVerification.Recommended + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * Save all Plugin settings. + * + * @since 1.5.0 + * @return bool + */ + private function save_settings() { + $l_arr_new_settings = array(); + + // TODO: add nonce verification. + + // Get current section. + reset( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; + + foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { + if ( array_key_exists( $l_str_key, $_POST ) ) { + $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); + } else { + // Setting is not defined in the POST array, define it to avoid the Default value. + $l_arr_new_settings[ $l_str_key ] = ''; + } + } + // Update settings. + return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); + } + // phpcs:enable + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @since 1.5.0 + */ + public function description() { + // Default no description will be displayed. + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @since 1.5.0 + * @param string $p_str_setting_key_name Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function load_setting( $p_str_setting_key_name ) { + // Get current section. + reset( $this->a_arr_sections ); + $p_arr_return = array(); + $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); + $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); + return $p_arr_return; + } + + /** + * Returns a line break to start a new line. + * + * @since 1.5.0 + * @return string + */ + protected function add_newline() { + return '
                                                                                                                                                                      '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @since 1.5.0 + * @return string + */ + protected function add_line_space() { + return '

                                                                                                                                                                      '; + } + + /** + * Returns a simple text inside html text. + * + * @since 1.5.0 + * @param string $p_str_text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function add_text( $p_str_text ) { + return sprintf( '%s', $p_str_text ); + } + + /** + * Returns the html tag for an input/select label. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_caption Label caption. + * @return string + */ + protected function add_label( $p_str_setting_name, $p_str_caption ) { + if ( empty( $p_str_caption ) ) { + return ''; + } + + /* + * Remove the colon causing localization issues with French, and with + * languages not using punctuation at all, and with languages using other + * punctuation marks instead of colon, e.g. Greek using a raised dot. + * In French, colon is preceded by a space, forcibly non-breaking, and + * narrow per new school. + * Add colon to label strings for inclusion in localization. Colon after + * label is widely preferred best practice, mandatory per + * [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui). + */ + return sprintf( '', $p_str_setting_name, $p_str_caption ); + } + + /** + * Returns the html tag for an input [type = text]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_str_max_length Maximum length of the input, default 999 characters. + * @param bool $p_bool_readonly Set the input to be read only, default false. + * @param bool $p_bool_hidden Set the input to be hidden, default false. + * @return string + */ + protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) { + $l_str_style = ''; + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + if ( $p_bool_hidden ) { + $l_str_style .= 'display:none;'; + } + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $p_str_max_length, + $l_str_style, + $l_arr_data['value'], + $p_bool_readonly ? 'readonly="readonly"' : '' + ); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @return string + */ + protected function add_checkbox( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : '' + ); + } + + /** + * Returns the html tag for a select box. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre select the current value. + * @param array $p_arr_options Possible options to be selected. + * @return string + */ + protected function add_select_box( $p_str_setting_name, $p_arr_options ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + $l_str_options = ''; + + foreach ( $p_arr_options as $l_str_value => $l_str_caption ) { + $l_str_options .= sprintf( + '', + $l_str_value, + $l_str_value === $l_arr_data['value'] ? 'selected' : '', + $l_str_caption + ); + } + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_options + ); + } + + /** + * Returns the html tag for a text area. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre fill the text area. + * @return string + */ + protected function add_textarea( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @since 1.5.6 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @return string + */ + protected function add_color_selection( $p_str_setting_name ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'] + ); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @since 1.5.0 + * @param string $p_str_setting_name Name of the Settings key to pre load the input field. + * @param int $p_in_min Minimum value. + * @param int $p_int_max Maximum value. + * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { + // Collect data for given settings field. + $l_arr_data = $this->load_setting( $p_str_setting_name ); + + if ( $p_bool_deci ) { + $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 ); + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_str_value, + $p_in_min, + $p_int_max + ); + } else { + return sprintf( + '', + $l_arr_data['name'], + $l_arr_data['id'], + $l_arr_data['value'], + $p_in_min, + $p_int_max + ); + } + } + +} diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php new file mode 100644 index 0000000..502f293 --- /dev/null +++ b/class/layout/diagnostics.php @@ -0,0 +1,149 @@ +add_section( 'diagnostics', __( 'Diagnostics', 'footnotes' ), null, false ), + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @since 1.5.0 + * @return array + */ + protected function get_meta_boxes() { + return array( + $this->add_meta_box( 'diagnostics', 'diagnostics', __( 'Displays information about the web server, PHP and WordPress', 'footnotes' ), 'Diagnostics' ), + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_php_extensions = ''; + // Iterate through each PHP extension. + foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) { + if ( $l_int_index > 0 ) { + $l_str_php_extensions .= ' | '; + } + $l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension ); + } + + $l_obj_current_theme = wp_get_theme(); + + $l_str_wordpress_plugins = ''; + // Iterate through each installed WordPress Plugin. + foreach ( get_plugins() as $l_arr_plugin ) { + $l_str_wordpress_plugins .= '
                                                                                                                                                                      '; + $l_str_wordpress_plugins .= ''; + // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found + $l_str_wordpress_plugins .= ''; + // phpcs:enable + $l_str_wordpress_plugins .= ''; + } + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' ); + + if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { + die; + } else { + $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); + } + if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + die; + } else { + $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + } + + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-server' => __( 'Server name', 'footnotes' ), + 'server' => $l_str_server_name, + + 'label-php' => __( 'PHP version', 'footnotes' ), + 'php' => phpversion(), + + 'label-user-agent' => __( 'User agent', 'footnotes' ), + 'user-agent' => $l_str_http_user_agent, + + 'label-max-execution-time' => __( 'Max execution time', 'footnotes' ), + 'max-execution-time' => ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'footnotes' ), + + 'label-memory-limit' => __( 'Memory limit', 'footnotes' ), + 'memory-limit' => ini_get( 'memory_limit' ), + + 'label-php-extensions' => __( 'PHP extensions', 'footnotes' ), + 'php-extensions' => $l_str_php_extensions, + + 'label-wordpress' => __( 'WordPress version', 'footnotes' ), + 'wordpress' => $wp_version, + + 'label-theme' => __( 'Active Theme', 'footnotes' ), + 'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']', + + 'plugins' => $l_str_wordpress_plugins, + ) + ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + // Display template with replaced placeholders. + echo $l_obj_template->get_content(); + // phpcs:enable + } +} diff --git a/class/layout/init.php b/class/layout/init.php new file mode 100644 index 0000000..72c347d --- /dev/null +++ b/class/layout/init.php @@ -0,0 +1,207 @@ +a_arr_sub_page_classes[ $l_obj_class->get_priority() ] = $l_obj_class; + } + } + ksort( $this->a_arr_sub_page_classes ); + + // Register hooks/actions. + add_action( 'admin_init', array( $this, 'initialize_settings' ) ); + add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); + // Register AJAX callbacks for Plugin information. + add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); + add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @since 1.5.0 + */ + public function initialize_settings() { + MCI_Footnotes_Settings::instance()->register_settings(); + // Iterate though each sub class of the layout engine and register their sections. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function register_main_menu() { + global $menu; + // Iterate through each main menu. + foreach ( $menu as $l_arr_main_menu ) { + // 3terate through each main menu attribute. + foreach ( $l_arr_main_menu as $l_str_attribute ) { + // Main menu already added, append sub pages and stop. + if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { + $this->register_sub_pages(); + return; + } + } + } + + // Add a new main menu page to the WordPress dashboard. + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // Page title. + self::C_STR_MAIN_MENU_TITLE, // Menu title. + 'manage_options', // Capability. + self::C_STR_MAIN_MENU_SLUG, // Menu slug. + array( $this, 'display_other_plugins' ), // Function. + plugins_url( 'footnotes/img/main-menu.png' ), // Icon URL. + null // Position. + ); + $this->register_sub_pages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @since 1.5.0 + */ + private function register_sub_pages() { + // First registered sub menu page MUST NOT contain a unique slug suffix. + // Iterate though each sub class of the layout engine and register their sub page. + foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { + $l_obj_layout_engine_sub_class->register_sub_page(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @since 1.5.0 + */ + public function display_other_plugins() { + printf( '

                                                                                                                                                                      ' ); + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + + printf( 'visit Mark Cheret' ); + printf( '

                                                                                                                                                                      ' ); + + printf( '' ); + } + + // phpcs:disable WordPress.Security.NonceVerification.Missing + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @since 1.5.0 + */ + public function get_plugin_meta_information() { + // TODO: add nonce verification. + + // Get plugin internal name from POST data. + if ( isset( $_POST['plugin'] ) ) { + $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); + } + + if ( empty( $l_str_plugin_name ) ) { + echo wp_json_encode( array( 'error' => 'Plugin name invalid.' ) ); + exit; + } + $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; + // Call URL and collect data. + $l_arr_response = wp_remote_get( $l_str_url ); + // Check if response is valid. + if ( is_wp_error( $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); + exit; + } + if ( ! array_key_exists( 'body', $l_arr_response ) ) { + echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); + exit; + } + // Get the body of the response. + $l_str_response = $l_arr_response['body']; + // Get plugin object. + $l_arr_plugin = json_decode( $l_str_response, true ); + if ( empty( $l_arr_plugin ) ) { + echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                                                                                                      URL: ' . $l_str_url . '
                                                                                                                                                                      Response: ' . $l_str_response ) ); + exit; + } + + $l_int_num_ratings = array_key_exists( 'num_ratings', $l_arr_plugin ) ? intval( $l_arr_plugin['num_ratings'] ) : 0; + $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; + $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); + + // Return Plugin information as JSON encoded string. + echo wp_json_encode( + array( + 'error' => '', + 'PluginDescription' => array_key_exists( 'short_description', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['short_description'] ) : 'Error reading Plugin information', + 'PluginAuthor' => array_key_exists( 'author', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['author'] ) : 'unknown', + 'PluginRatingText' => $l_int_stars . ' ' . __( 'rating based on', 'footnotes' ) . ' ' . $l_int_num_ratings . ' ' . __( 'ratings', 'footnotes' ), + 'PluginRating1' => $l_int_stars >= 0.5 ? 'star-full' : 'star-empty', + 'PluginRating2' => $l_int_stars >= 1.5 ? 'star-full' : 'star-empty', + 'PluginRating3' => $l_int_stars >= 2.5 ? 'star-full' : 'star-empty', + 'PluginRating4' => $l_int_stars >= 3.5 ? 'star-full' : 'star-empty', + 'PluginRating5' => $l_int_stars >= 4.5 ? 'star-full' : 'star-empty', + 'PluginRating' => $l_int_num_ratings, + 'PluginLastUpdated' => array_key_exists( 'last_updated', $l_arr_plugin ) ? $l_arr_plugin['last_updated'] : 'unknown', + 'PluginDownloads' => array_key_exists( 'downloaded', $l_arr_plugin ) ? $l_arr_plugin['downloaded'] : '---', + ) + ); + exit; + } + // phpcs:enable +} diff --git a/class/layout/settings.php b/class/layout/settings.php new file mode 100644 index 0000000..bfddc98 --- /dev/null +++ b/class/layout/settings.php @@ -0,0 +1,1261 @@ +add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true ); + + // Sync tab name with mirror in public function custom_css_migration(). + $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true ); + + $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true ); + $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true ); + $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false ); + + return $l_arr_tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * hyperlink_arrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function get_meta_boxes() { + $l_arr_meta_boxes = array(); + + // Sync box name with mirror in task.php. + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); + + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' ); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' ); + } + + $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' ); + + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' ); + } + $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' ); + + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction in how to use the plugin', 'footnotes' ), 'help' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' ); + + return $l_arr_meta_boxes; + } + + /** + * Displays all settings for the reference container. + * + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function reference_container() { + + // Options for the label element. + $l_arr_label_element = array( + 'p' => __( 'paragraph', 'footnotes' ), + 'h2' => __( 'heading 2', 'footnotes' ), + 'h3' => __( 'heading 3', 'footnotes' ), + 'h4' => __( 'heading 4', 'footnotes' ), + 'h5' => __( 'heading 5', 'footnotes' ), + 'h6' => __( 'heading 6', 'footnotes' ), + ); + // Options for the positioning of the reference container. + $l_arr_positions = array( + 'post_end' => __( 'at the end of the post', 'footnotes' ), + 'widget' => __( 'in the widget area', 'footnotes' ), + 'footer' => __( 'in the footer', 'footnotes' ), + ); + // Basic responsive page layout options. + $l_arr_page_layout_options = array( + 'none' => __( 'No', 'footnotes' ), + 'reference-container' => __( 'to the reference container exclusively', 'footnotes' ), + 'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ), + 'main-content' => __( 'to the main element including the post title', 'footnotes' ), + ); + // Options for the separating punctuation between backlinks. + $l_arr_separators = array( + // Unicode character names are conventionally uppercase. + 'comma' => __( 'COMMA', 'footnotes' ), + 'semicolon' => __( 'SEMICOLON', 'footnotes' ), + 'en_dash' => __( 'EN DASH', 'footnotes' ), + ); + // Options for the terminating punctuation after backlinks. + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. + // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_terminators = array( + 'period' => __( 'FULL STOP', 'footnotes' ), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts). + 'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ), + 'colon' => __( 'COLON', 'footnotes' ), + ); + // Options for the first column width (per cent is a ratio, not a unit). + $l_arr_width_units = array( + '%' => __( 'per cent', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'rem' => __( 'root em', 'footnotes' ), + 'em' => __( 'em', 'footnotes' ), + 'vw' => __( 'viewport width', 'footnotes' ), + ); + // Options for reference container script mode. + $l_arr_script_mode = array( + 'jquery' => __( 'jQuery', 'footnotes' ), + 'js' => __( 'plain JavaScript', 'footnotes' ), + ); + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), + 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), + + 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), + 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), + + 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), + 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ), + + 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ), + 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ), + + 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), + 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), + 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), + + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), + // Translators: %s: at the end of the post. + 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), + + 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), + 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ), + 'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ), + + 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ), + 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ), + + 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ), + 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ), + 'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ), + + 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ), + 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ), + 'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ), + + 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), + 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), + 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), + + 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), + 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), + 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), + + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), + 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), + 'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ), + + 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ), + 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ), + + 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ), + '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ), + 'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ), + + 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ), + 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ), + 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ), + 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ), + 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ), + 'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ), + + 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ), + 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ), + 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ), + 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ), + 'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ), + + 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ), + 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), + 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), + 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), + 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), + 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), + 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), + 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), + 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + + 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), + 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), + 'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ), + + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), + 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the footnotes start and end tag short codes. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function start_end() { + // Footnotes start tag short code options. + $l_arr_shortcode_start = array( + '((' => '((', + '(((' => '(((', + '{{' => '{{', + '{{{' => '{{{', + '[n]' => '[n]', + '[fn]' => '[fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[ref]' => '[ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), + ); + // Footnotes end tag short code options. + $l_arr_shortcode_end = array( + '))' => '))', + ')))' => ')))', + '}}' => '}}', + '}}}' => '}}}', + '[/n]' => '[/n]', + '[/fn]' => '[/fn]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + '[/ref]' => '[/ref]', + htmlspecialchars( '' ) => htmlspecialchars( '' ), + // Custom (user-defined) start and end tags bracketing the footnote text inline. + 'userdefined' => __( 'custom short code', 'footnotes' ), + ); + // Options for the syntax validation. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), + + 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), + 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), + 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ), + + 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ), + 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ), + 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), + + // For script showing/hiding user defined text boxes. + 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + 'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ), + + // Option to enable syntax validation, label mirrored in task.php. + 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ), + 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), + 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), + + 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the footnotes numbering. + * + * @since 2.2.0 + */ + public function numbering() { + // Define some space for the output. + $l_str_space = '     '; + // Options for the combination of identical footnotes. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for the numbering style of the footnotes. + $l_arr_counter_style = array( + 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', + 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', + 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', + 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', + 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', + 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ), + 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ), + + // Algorithmically combine identicals. + 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ), + 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ), + 'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ), + // Support for Ibid. notation added thanks to @meglio in . + 'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the scrolling behavior. + * + * @since 2.2.0 + */ + public function scrolling() { + + // Options for enabling hard links for AMP compat. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), + 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), + 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), + + 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), + 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), + 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), + + // Enable hard links for AMP compat. + 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), + 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), + 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), + + 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), + 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), + 'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ), + + 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ), + 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ), + 'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ), + 'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ), + + // Enable backlink tooltips. + 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ), + 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ), + 'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead.', 'footnotes' ), + + 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), + 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), + 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function love() { + // Options for the acknowledgment display in the footer. + $l_arr_love = array( + // Logo only. + 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Logo followed by heart symbol. + 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // Logo preceded by heart symbol. + 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: 2: heart symbol 1: footnotes logogram. + 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + // Translators: %s: Plugin logo. + 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: %s: Plugin logo. + 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + // Translators: %s: Plugin logo. + 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), + 'random' => __( 'randomly determined display of either mention', 'footnotes' ), + // Translators: 1: Plugin logo.2: heart symbol. + 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + // Translators: %s: Plugin logo. + 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), + // Translators: %s: Plugin logo. + 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the excerpt setting. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function excerpts() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), + 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), + 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), + // Translators: %s: link to the Advanced Excerpt Plugin. + 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for the footnote referrers. + * + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function superscript() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for superscript normalize scope. + $l_arr_normalize_superscript = array( + 'no' => __( 'No', 'footnotes' ), + 'referrers' => __( 'Footnote referrers', 'footnotes' ), + 'all' => __( 'All superscript elements', 'footnotes' ), + ); + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), + 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), + + 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), + 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), + + 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ), + 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), + + 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), + 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), + + 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), + 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), + 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays enabled status for the footnotes mouse-over box. + * + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function mouseover_box() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ), + 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ), + 'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ), + + 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), + 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), + 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), + // Translators: %s: Plugin logo. + 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays position settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_position() { + + // Options for the Mouse-over box position. + $l_arr_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top center' => __( 'top center', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'center right' => __( 'center right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom center' => __( 'bottom center', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), + 'center left' => __( 'center left', 'footnotes' ), + ); + // Options for the alternative Mouse-over box position. + $l_arr_alternative_position = array( + 'top left' => __( 'top left', 'footnotes' ), + 'top right' => __( 'top right', 'footnotes' ), + 'bottom right' => __( 'bottom right', 'footnotes' ), + 'bottom left' => __( 'bottom left', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ), + 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ), + 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ), + 'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ), + + 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ), + 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), + 'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ), + + 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ), + 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), + 'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays dimensions setting for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_dimensions() { + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ), + 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ), + 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ), + 'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays timing settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_timing() { + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ), + 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ), + 'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ), + 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ), + 'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ), + 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ), + 'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ), + + 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ), + 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ), + 'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays truncation settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_truncation() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ), + 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ), + + 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ), + 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ), + // The feature trims back until the last full word. + 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), + + 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), + 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays dedicated tooltip text settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_text() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'description-delimiter' => __( '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.', 'footnotes' ), + + 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ), + 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ), + 'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ), + + 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ), + 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ), + 'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ), + + 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ), + 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ), + 'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ), + + 'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays style settings for the footnotes mouse-over box. + * + * @since 2.2.0 + */ + public function mouseover_box_appearance() { + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + // Options for the font size unit. + $l_arr_font_size_units = array( + 'em' => __( 'em', 'footnotes' ), + 'rem' => __( 'rem', 'footnotes' ), + 'px' => __( 'pixels', 'footnotes' ), + 'pt' => __( 'points', 'footnotes' ), + 'pc' => __( 'picas', 'footnotes' ), + 'mm' => __( 'millimeters', 'footnotes' ), + '%' => __( 'per cent', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + + 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ), + 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ), + 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ), + 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ), + 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), + + 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), + 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), + 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), + // Translators: %s: Clear or leave empty. + 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), + 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), + 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), + + 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), + 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), + 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), + 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), + + 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), + 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), + // Translators: %s: Clear or leave empty. + 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all settings for the backlink symbol. + * + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function hyperlink_arrow() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), + 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ), + 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), + 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), + 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the Custom CSS box. + * + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function custom_css() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ), + + // phpcs:disable Squiz.PHP.CommentedOutCode.Found + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text",. + // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-2" => ".footnote_tooltip",. + // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-3" => ".footnote_plugin_index",. + // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. + + // "label-class-4" => ".footnote_plugin_text",. + // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)). + // phpcs:enable + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays transitional legacy Custom CSS box. + * + * @since 2.2.2 + */ + public function custom_css_migration() { + + // Options for Yes/No select box. + $l_arr_enabled = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), + 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ), + + 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), + 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), + 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), + // Translators: %s: Referres and tooltips. + 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays the new Custom CSS box. + * + * @since 2.2.2 + */ + public function custom_css_new() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ), + + 'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function lookup_hooks() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' ); + + // Replace all placeholders. + $l_obj_template->replace( + array( + 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), + // Translators: 1: 99; 2: 1200. + 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), + // Translators: 1: PHP_INT_MAX; 2: 0; 3: -1; 4: 'PHP_INT_MAX'. + 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), + 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), + + 'head-hook' => __( 'WordPress hook function name', 'footnotes' ), + 'head-checkbox' => __( 'Activate', 'footnotes' ), + 'head-numbox' => __( 'Priority level', 'footnotes' ), + 'head-url' => __( 'WordPress documentation', 'footnotes' ), + + 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), + 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), + 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', + + 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), + 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), + 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', + + 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), + 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), + 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', + + 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), + 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), + 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', + + 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), + 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), + 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), + 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays a short introduction of the Plugin. + * + * @since 1.5.0 + */ + public function Help() { + global $g_obj_mci_footnotes; + // Load footnotes starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + + if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) { + // Load user defined starting and end tag. + $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + } + $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo dolores ' . + 'et ea rebum. Stet clita kasd gubergren, no sea ' . + 'takimata sanctus est Lorem ipsum dolor sit amet. ' . + 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . + 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . + 'labore et dolore magna aliquyam erat, sed diam ' . + 'voluptua. At vero eos et accusam et justo duo ' . + 'dolores et ea rebum. Stet clita kasd gubergren, no ' . + 'sea takimata sanctus est Lorem ipsum dolor sit amet.' . + $l_arr_footnote_ending_tag['value'] . ' World!'; + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), + 'start' => $l_arr_footnote_starting_tag['value'], + 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), + 'end' => $l_arr_footnote_ending_tag['value'], + 'example-code' => $l_str_example, + 'example-string' => '
                                                                                                                                                                      ' . __( 'will be displayed as:', 'footnotes' ), + 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), + // Translators: 1: ; 2: . + 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), + ) + ); + // Call wp_head function to get the Styling of the mouse-over box. + $g_obj_mci_footnotes->a_obj_task->wp_head(); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all Donate button to support the developers. + * + * @since 1.5.0 + */ + public function donate() { + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'caption' => __( 'Donate now', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } +} diff --git a/class/settings.php b/class/settings.php index 2e8acaa..7073a0e 100644 --- a/class/settings.php +++ b/class/settings.php @@ -1,13 +1,11 @@ - array( + 'footnotes_storage' => array( - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_STR_FOOTNOTES_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_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + 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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - // 2.5.4 fast-tracked: - self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + // 2.5.4 fast-tracked. + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - self::C_STR_REFERENCE_CONTAINER_NAME => 'References', - self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', - self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no', - self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery', + 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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + 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', - // whether to enqueue additional stylesheet: - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // Whether to enqueue additional stylesheet. + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - // top and bottom margins: - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // Top and bottom margins. + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - // table cell borders: - self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // Table cell borders. + self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - // backlink symbol: - self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // Backlink symbol. + self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - // backlink separators and terminators are often not preferred. - // but a choice must be provided along with the ability to customize: - self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', - self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', - self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', - self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', - self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', - self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // Backlink separators and terminators are often not preferred.. + // But a choice must be provided along with the ability to customize. + 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 => '', - // set backlinks column width: - self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // Set backlinks column width. + self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - // set backlinks column max. width: - self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', - self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // Set backlinks column max. width. + 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', - // whether a
                                                                                                                                                                      tag is inserted: - self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // Whether a
                                                                                                                                                                      tag is inserted. + self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - // whether to enable URL line wrapping: - self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // Whether to enable URL line wrapping. + self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - // whether to use link elements: - self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // Whether to use link elements. + self::C_STR_LINK_ELEMENT_ENABLED => 'yes', - // excerpt should be disabled: - self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + // Excerpt should be disabled. + self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', - self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', - self::C_STR_FOOTNOTES_LOVE => 'no', + self::C_STR_FOOTNOTES_LOVE => 'no', ), - "footnotes_storage_custom" => array( + 'footnotes_storage_custom' => array( - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - // 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: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // The truncation length is raised from 150 to 200 chars. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - // 2.5.4 fast-tracked: - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', - self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', - self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 2.5.4 fast-tracked. + 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 => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - // 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: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + // 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. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover. + // The current line of text (web coordinates origin is top left). + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // The width should be limited to start with, for the box to have shape. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + // Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - // tooltip display durations: - // called mouse over box not tooltip for consistency - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // Tooltip display durations. + // Called mouse over box not tooltip for consistency. + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - // tooltip font size reset to legacy by default since 2.1.4; - // was set to inherit since 2.1.1 as it overrode custom CSS, - // is moved to settings since 2.1.4 2020-12-04T1023+0100 - self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', - self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, - self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + // Tooltip font size reset to legacy by default since 2.1.4;. + // Was set to inherit since 2.1.1 as it overrode custom CSS,. + // Is moved to settings since 2.1.4 2020-12-04T1023+0100. + self::C_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', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background. + // By default, due to diverging user preferences. White is neutral. + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - 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_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + // The mouse over box corners mustn’t be rounded as that is outdated. + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - // Custom CSS migrates to a dedicated tab: - self::C_STR_CUSTOM_CSS => '', + // Custom CSS migrates to a dedicated tab. + self::C_STR_CUSTOM_CSS => '', ), - "footnotes_storage_expert" => array( + 'footnotes_storage_expert' => array( - // These are checkboxes; keyword 'checked' is converted to Boolean true, - // empty string to false (default): + // These are checkboxes; keyword 'checked' is converted to Boolean true,. + // Empty string to false (default). - // Titles should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. - // See - // Yet in titles, footnotes are still buggy, because WordPress - // uses the title string in menus and in the title element. - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + // Titles should all be enabled by default to prevent users from. + // Thinking at first that the feature is broken in post titles.. + // See . + // Yet in titles, footnotes are still buggy, because WordPress. + // Uses the title string in menus and in the title element.. + self::C_STR_EXPERT_LOOKUP_THE_TITLE => '', - self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked', - // And the_excerpt is disabled by default following @nikelaos in - // - // - self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + // And the_excerpt is disabled by default following @nikelaos in. + // . + // . + self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '', - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '', - // 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. - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // 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.. + self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '', - // initially hard-coded default - // shows "9223372036854780000" instead of 9223372036854775807 in the numbox - // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: - // - // interpret -1 as PHP_INT_MAX instead - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // Initially hard-coded default. + // Shows "9223372036854780000" instead of 9223372036854775807 in the numbox. + // Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty. + // . + // Interpret -1 as PHP_INT_MAX instead. + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // 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. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + // 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.. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), - "footnotes_storage_custom_css" => array( + 'footnotes_storage_custom_css' => array( - self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', ), @@ -1074,130 +1032,123 @@ class MCI_Footnotes_Settings { /** * Contains all Settings from each Settings container as soon as this class is initialized. * - * @author Stefan Herndler * @since 1.5.0 * @var array */ - private $a_arr_Settings = array(); + private $a_arr_settings = array(); /** * Class Constructor. Loads all Settings from each WordPress Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ private function __construct() { - $this->loadAll(); + $this->load_all(); } /** * Returns a singleton of this class. * - * @author Stefan Herndler * @since 1.5.0 * @return MCI_Footnotes_Settings */ public static function instance() { - // no instance defined yet, load it - if (self::$a_obj_Instance === null) { - self::$a_obj_Instance = new self(); + // No instance defined yet, load it. + if ( ! self::$a_obj_instance ) { + self::$a_obj_instance = new self(); } - // return a singleton of this class - return self::$a_obj_Instance; + // Return a singleton of this class. + return self::$a_obj_instance; } /** * Returns the name of a specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return str Settings Container name. */ - public function getContainer($p_int_Index) { - return $this->a_arr_Container[$p_int_Index]; + public function get_container( $p_int_index ) { + return $this->a_arr_container[ $p_int_index ]; } /** * Returns the default values of a specific Settings Container. * - * @author Stefan Herndler * @since 1.5.6 - * @param int $p_int_Index Settings Container Aray Key Index. + * @param int $p_int_index Settings Container Aray Key Index. * @return array */ - public function getDefaults($p_int_Index) { - return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; + public function get_defaults( $p_int_index ) { + return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ]; } /** * Loads all Settings from each Settings container. * - * @author Stefan Herndler * @since 1.5.0 */ - private function loadAll() { - // clear current settings - $this->a_arr_Settings = array(); - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // load settings - $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); + 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 ) ); } } /** * Loads all Settings from specified Settings Container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Settings Container Array Key Index. + * @param int $p_int_index Settings Container Array Key Index. * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). * * @since ditched trimming whitespace from text box content in response to user request. * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 */ - private function Load($p_int_Index) { - // load all settings from container - $l_arr_Options = get_option($this->getContainer($p_int_Index)); - // load all default settings - $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; + 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 ) ]; - // no settings found, set them to their default value - if (empty($l_arr_Options)) { - return $l_arr_Default; + // No settings found, set them to their default value. + if ( empty( $l_arr_options ) ) { + return $l_arr_default; } - // 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; + // 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; } } - // iterate through each setting in the container - foreach($l_arr_Options as $l_str_Key => $l_str_Value) { - // remove all whitespace at the beginning and end of a setting - // trimming whitespace is ditched: - //$l_str_Value = trim($l_str_Value); - // write the sanitized value back to the setting container - $l_arr_Options[$l_str_Key] = $l_str_Value; + // Iterate through each setting in the container. + foreach ( $l_arr_options as $l_str_key => $l_str_value ) { + // Remove all whitespace at the beginning and end of a setting. + // Trimming whitespace is ditched. + // $l_str_value = trim($l_str_value);. + // Write the sanitized value back to the setting container. + $l_arr_options[ $l_str_key ] = $l_str_value; } - // return settings loaded from Container - return $l_arr_Options; + // Return settings loaded from Container. + return $l_arr_options; } /** * Updates a whole Settings container. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index of the Settings container. - * @param array $p_arr_newValues new Settings. + * @param int $p_int_index Index of the Settings container. + * @param array $p_arr_new_values new Settings. * @return bool */ - public function saveOptions($p_int_Index, $p_arr_newValues) { - if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { - $this->loadAll(); + 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(); return true; } return false; @@ -1206,19 +1157,17 @@ class MCI_Footnotes_Settings { /** * Returns the value of specified Settings name. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Key Settings Array Key name. + * @param string $p_str_key Settings Array Key name. * @return mixed Value of the Setting on Success or Null in Settings name is invalid. */ - 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; + 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; } /** * Deletes each Settings Container and loads the default values for each Settings Container. * - * @author Stefan Herndler * @since 1.5.0 * * Edit: This didn’t actually work. @@ -1227,27 +1176,28 @@ class MCI_Footnotes_Settings { * done by deleting and reinstalling (see the warning about database backup). * 2020-12-13T1353+0100 */ - public function ClearAll() { - // iterate through each Settings Container - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - // delete the settings container - delete_option($this->getContainer($i)); + 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 ) ); } - // set settings back to the default values - $this->a_arr_Settings = $this->a_arr_Default; + // Set settings back to the default values. + $this->a_arr_settings = $this->a_arr_default; } /** * Register all Settings Container for the Plugin Settings Page in the Dashboard. * Settings Container Label will be the same as the Settings Container Name. * - * @author Stefan Herndler * @since 1.5.0 */ - public function RegisterSettings() { - // register all settings - for ($i = 0; $i < count($this->a_arr_Container); $i++) { - register_setting($this->getContainer($i), $this->getContainer($i)); + 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 ) ); } } } diff --git a/class/task.php b/class/task.php index 8eaa58a..7694943 100644 --- a/class/task.php +++ b/class/task.php @@ -1,13 +1,11 @@ -get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); - $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); - $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); - $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); - $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); + // Get values from settings. + $l_int_the_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) ); + $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) ); + $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) ); + $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) ); + $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) ); - // PHP_INT_MAX can be set by -1: - $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; - $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; - $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; - $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; - $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; + // PHP_INT_MAX can be set by -1. + $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority; + $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority; + $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority; + $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority; + $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority; + // Append custom css to the header. + add_filter( 'wp_head', array( $this, 'wp_head' ), PHP_INT_MAX ); - // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + // Append the love and share me slug to the footer. + add_filter( 'wp_footer', array( $this, 'wp_footer' ), PHP_INT_MAX ); - // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); - - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { + add_filter( 'the_title', array( $this, 'the_title' ), $l_int_the_title_priority ); } - // configurable priority level for reference container relative positioning; default 98: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); + // Configurable priority level for reference container relative positioning; default 98. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { + add_filter( 'the_content', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for category pages + * Hook for category pages. * * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. * @@ -463,10 +529,10 @@ class MCI_Footnotes_Task { * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ */ - add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'term_description', array( $this, 'the_content' ), $l_int_the_content_priority ); /** - * Hook for popup maker popups + * Hook for popup maker popups. * * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @@ -476,22 +542,21 @@ class MCI_Footnotes_Task { * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ */ - add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); + add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) { + add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), $l_int_the_excerpt_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) { + add_filter( 'widget_title', array( $this, 'widget_title' ), $l_int_widget_title_priority ); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) { + add_filter( 'widget_text', array( $this, 'widget_text' ), $l_int_widget_text_priority ); } - /** - * The the_post hook + * The the_post hook. * * - Adding: Hooks: support 'the_post' in response to user request for custom post types. * @@ -556,18 +621,16 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges */ - // reset stored footnotes when displaying the header - self::$a_arr_Footnotes = array(); - self::$a_bool_AllowLoveMe = true; + // Reset stored footnotes when displaying the header. + self::$a_arr_footnotes = array(); + self::$a_bool_allow_love_me = true; } /** * Outputs the custom css to the header of the public page. * - * @author Stefan Herndler * @since 1.5.0 * - * * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. * @since 2.1.3 raise settings priority to override theme stylesheets @@ -580,7 +643,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // insert start tag without switching out of PHP: + // Insert start tag without switching out of PHP. echo "\r\n\r\n"; /** @@ -922,81 +1002,106 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified: + * The script for alternative tooltips is printed formatted, not minified, + * for transparency. It isn’t indented though (the PHP open tag neither). */ - if ( self::$a_bool_AlternativeTooltipsEnabled ) { + if ( self::$a_bool_alternative_tooltips_enabled ) { + + // Start internal script. ?> get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { - echo $this->ReferenceContainer(); + if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $this->reference_container(); + // phpcs:enable } - // get setting for love and share this plugin - $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); - // check if the admin allows to add a link to the footer - if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { + // Get setting for love and share this plugin. + $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); + // Check if the admin allows to add a link to the footer. + if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) { return; } - // set a hyperlink to the word "footnotes" in the Love slug - $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); - // get random love me text - if (strtolower($l_str_LoveMeIndex) == "random") { - $l_str_LoveMeIndex = "text-" . rand(1,7); + // Set a hyperlink to the word "footnotes" in the Love slug. + $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ); + // Get random love me text. + if ( 'random' === strtolower( $l_str_love_me_index ) ) { + $l_str_love_me_index = 'text-' . wp_rand( 1, 7 ); } - switch ($l_str_LoveMeIndex) { - // options named wrt backcompat, simplest is default: - case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; - case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; - case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; - case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; + switch ( $l_str_love_me_index ) { + // Options named wrt backcompat, simplest is default. + case 'text-1': + /* Translators: 2: Link to plugin page 1: Love heart symbol */ + $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-2': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-4': + /* Translators: 1: Link to plugin page 2: Love heart symbol */ + $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + break; + case 'text-5': + /* Translators: 1: Love heart symbol 2: Link to plugin page */ + $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); + break; + case 'text-6': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-7': + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); + break; + case 'text-3': + default: + /* Translators: %s: Link to plugin page */ + $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); + break; } - echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', $l_str_LoveMeText); + echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( $l_str_love_me_text ) ); } /** * Replaces footnotes in the post/page title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function the_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function the_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ public function the_content($p_str_Content) { @@ -1027,99 +1132,94 @@ class MCI_Footnotes_Task { /** * Replaces footnotes in the excerpt of the current page/post. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Page/Post content. + * @param string $p_str_content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_excerpt($p_str_Content) { - return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); + public function the_excerpt( $p_str_content ) { + return $this->exec( $p_str_content, false, ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT ) ) ); } /** * Replaces footnotes in the widget title. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_title($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, false); + public function widget_title( $p_str_content ) { + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, false ); } /** * Replaces footnotes in the content of the current widget. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Widget content. + * @param string $p_str_content Widget content. * @return string Content with replaced footnotes. */ - public function widget_text($p_str_Content) { - // appends the reference container if set to "post_end" - return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); + public function widget_text( $p_str_content ) { + // phpcs:disable WordPress.PHP.YodaConditions.NotYoda + // Appends the reference container if set to "post_end". + return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); + // phpcs:enable } /** * Replaces footnotes in each Content var of the current Post object. * - * @author Stefan Herndler * @since 1.5.4 - * @param array|WP_Post $p_mixed_Posts + * @param array|WP_Post $p_mixed_posts The current Post object. */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + public function the_post( &$p_mixed_posts ) { + // Single WP_Post object received. + if ( ! is_array( $p_mixed_posts ) ) { + $p_mixed_posts = $this->replace_post_object( $p_mixed_posts ); return; } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + $num_posts = count( $p_mixed_posts ); + // Array of WP_Post objects received. + for ( $l_int_index = 0; $l_int_index < $num_posts; $l_int_index++ ) { + $p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] ); } } /** * Replace all Footnotes in a WP_Post object. * - * @author Stefan Herndler * @since 1.5.6 - * @param WP_Post $p_obj_Post + * @param WP_Post $p_obj_post The Post object. * @return WP_Post */ - private function replacePostObject($p_obj_Post) { - //MCI_Footnotes_Convert::debug($p_obj_Post); - $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); - $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); - $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); - return $p_obj_Post; + private function replace_post_object( $p_obj_post ) { + $p_obj_post->post_content = $this->exec( $p_obj_post->post_content ); + $p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered ); + $p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt ); + return $p_obj_post; } /** * Replaces all footnotes that occur in the given content. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * - * * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. */ - public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) { - // replace all footnotes in the content, settings are converted to html characters - $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); - // replace all footnotes in the content, settings are NOT converted to html characters - $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); + // Replace all footnotes in the content, settings are converted to html characters. + $p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text ); + // Replace all footnotes in the content, settings are NOT converted to html characters. + $p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text ); /** - * Reference container customized positioning through shortcode + * Reference container customized positioning through shortcode. * * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @@ -1137,50 +1237,48 @@ class MCI_Footnotes_Task { * * @reporter @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 - * */ - // append the reference container or insert at shortcode: - $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); - if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { - $l_str_ReferenceContainerPositionShortcode = '[[references]]'; + // Append the reference container or insert at shortcode. + $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); + if ( empty( $l_str_reference_container_position_shortcode ) ) { + $l_str_reference_container_position_shortcode = '[[references]]'; } - if ( $p_bool_OutputReferences ) { + if ( $p_bool_output_references ) { - if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { + if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) { - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content ); } else { - $p_str_Content .= $this->ReferenceContainer(); + $p_str_content .= $this->reference_container(); } - // increment the container ID: - self::$a_int_ReferenceContainerId++; + // Increment the container ID. + self::$a_int_reference_container_id++; } - // delete position shortcode should any remain: - $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); + // Delete position shortcode should any remain. + $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content ); - // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found - if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { - self::$a_bool_AllowLoveMe = false; - $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); + // Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. + if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) { + self::$a_bool_allow_love_me = false; + $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content ); } - // return the content with replaced footnotes and optional reference container appended: - return $p_str_Content; + // Return the content with replaced footnotes and optional reference container appended. + return $p_str_content; } /** * Replaces all footnotes in the given content and appends them to the static property. * - * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Content Content to be searched for footnotes. - * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. - * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. + * @param string $p_str_content Content to be searched for footnotes. + * @param bool $p_bool_convert_html_chars html encode settings, default true. + * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. * @return string * * @since 2.0.0 various. @@ -1189,37 +1287,37 @@ class MCI_Footnotes_Task { * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. */ - public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { + public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) { - // post ID to make everything unique wrt infinite scroll and archive view - self::$a_int_PostId = get_the_id(); + // Post ID to make everything unique wrt infinite scroll and archive view. + self::$a_int_post_id = get_the_id(); - // contains the index for the next footnote on this page - $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; + // Contains the index for the next footnote on this page. + $l_int_footnote_index = count( self::$a_arr_footnotes ) + 1; - // contains the starting position for the lookup of a footnote - $l_int_PosStart = 0; + // Contains the starting position for the lookup of a footnote. + $l_int_pos_start = 0; - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - // decode html special chars - if ($p_bool_ConvertHtmlChars) { - $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); - $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); + // Decode html special chars. + if ( $p_bool_convert_html_chars ) { + $l_str_starting_tag = htmlspecialchars( $l_str_starting_tag ); + $l_str_ending_tag = htmlspecialchars( $l_str_ending_tag ); } - // if footnotes short code is empty, return the content without changes - if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { - return $p_str_Content; + // If footnotes short code is empty, return the content without changes. + if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) { + return $p_str_content; } /** - * Footnote delimiter syntax validation + * Footnote delimiter syntax validation. * * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * @@ -1240,74 +1338,74 @@ class MCI_Footnotes_Task { * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) { - // make shortcodes conform to regex syntax: - $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); - $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); + // Make shortcodes conform to regex syntax. + $l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag ); + $l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag ); - // apply different regex depending on whether start shortcode is double/triple opening parenthesis: - if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { + // Apply different regex depending on whether start shortcode is double/triple opening parenthesis. + if ( '((' === $l_str_starting_tag || '(((' === $l_str_starting_tag ) { - // this prevents from catching a script containing e.g. a double opening parenthesis: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; + // This prevents from catching a script containing e.g. a double opening parenthesis. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ')[^\{\}])*?)(' . $l_str_start_tag_regex . '|$)#s'; } else { - // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: - $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; + // Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. + $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ').)*?)(' . $l_str_start_tag_regex . '|$)#s'; } - // check syntax and get error locations: - preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); - if ( empty( $p_arr_ErrorLocation ) ) { - self::$a_bool_SyntaxErrorFlag = false; + // Check syntax and get error locations. + preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location ); + if ( empty( $p_arr_error_location ) ) { + self::$a_bool_syntax_error_flag = false; } - // prevent generating and inserting the warning multiple times: - if ( self::$a_bool_SyntaxErrorFlag ) { + // Prevent generating and inserting the warning multiple times. + if ( self::$a_bool_syntax_error_flag ) { - // get plain text string for error location: - $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); + // Get plain text string for error location. + $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] ); - // limit string length to 300 characters: - if ( strlen( $l_str_ErrorSpotString ) > 300 ) { - $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; + // Limit string length to 300 characters. + if ( strlen( $l_str_error_spot_string ) > 300 ) { + $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…'; } - // compose warning box: - $l_str_SyntaxErrorWarning = '

                                                                                                                                                                      '; - $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; + // Compose warning box. + $l_str_syntax_error_warning = '

                                                                                                                                                                      '; + $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                                                                                                      '; - // syntax validation setting in the dashboard under the General settings tab: - $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); + // Syntax validation setting in the dashboard under the General settings tab. + /* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */ + $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; - $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); - $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      “'; - $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; - $l_str_SyntaxErrorWarning .= '”

                                                                                                                                                                      '; + $l_str_syntax_error_warning .= '

                                                                                                                                                                      '; + $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); + $l_str_syntax_error_warning .= '

                                                                                                                                                                      “'; + $l_str_syntax_error_warning .= $l_str_error_spot_string; + $l_str_syntax_error_warning .= '”

                                                                                                                                                                      '; - // prepend the warning box to the content: - $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; + // Prepend the warning box to the content. + $p_str_content = $l_str_syntax_error_warning . $p_str_content; - // checked, set flag to false to prevent duplicate warning: - self::$a_bool_SyntaxErrorFlag = false; + // Checked, set flag to false to prevent duplicate warning. + self::$a_bool_syntax_error_flag = false; - return $p_str_Content; + return $p_str_content; } } + // Load referrer templates if footnotes text not hidden. + if ( ! $p_bool_hide_footnotes_text ) { - // load referrer templates if footnotes text not hidden: - if (!$p_bool_HideFootnotesText) { - - // load footnote referrer template file: - if (self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + // Load footnote referrer template file. + if ( self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' ); } else { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' ); } /** @@ -1316,56 +1414,57 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. * * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority) */ - self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); - self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); + self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - // load tooltip inline script if jQuery tooltips are enabled: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); + // Load tooltip inline script if jQuery tooltips are enabled. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + $l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' ); } - } else { - $l_obj_Template = null; - $l_obj_TemplateTooltip = null; + $l_obj_template = null; + $l_obj_template_tooltip = null; } - // search footnotes short codes in the content + // Search footnotes short codes in the content. do { - // get first occurrence of the footnote start tag short code: - $i_int_LenContent = strlen($p_str_Content); - if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; - $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosStart === false) { + // Get first occurrence of the footnote start tag short code. + $i_int_len_content = strlen( $p_str_content ); + if ( $l_int_pos_start > $i_int_len_content ) { + $l_int_pos_start = $i_int_len_content; + } + $l_int_pos_start = strpos( $p_str_content, $l_str_starting_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_start ) { break; } - // get first occurrence of the footnote end tag short code: - $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); - // no short code found, stop here - if ($l_int_PosEnd === false) { + // Get first occurrence of the footnote end tag short code. + $l_int_pos_end = strpos( $p_str_content, $l_str_ending_tag, $l_int_pos_start ); + // No short code found, stop here. + if ( ! $l_int_pos_end ) { break; } - // calculate the length of the footnote - $l_int_Length = $l_int_PosEnd - $l_int_PosStart; + // Calculate the length of the footnote. + $l_int_length = $l_int_pos_end - $l_int_pos_start; - // get footnote text - $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); + // Get footnote text. + $l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) ); - // get tooltip text if present: - self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); - self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + // Get tooltip text if present. + self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ); + self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode ); + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); } else { - $l_str_TooltipText = ''; + $l_str_tooltip_text = ''; } /** - * URL line wrapping for Unicode non conformant browsers + * URL line wrapping for Unicode non conformant browsers. * * @since 2.1.1 (CSS) * @since 2.1.4 (PHP) @@ -1458,7 +1557,6 @@ class MCI_Footnotes_Task { * @reporter @bernardzit * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * - * * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * @date 2020-12-23T1107+0100 * @@ -1499,48 +1597,48 @@ class MCI_Footnotes_Task { * Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces. * But given they can occur on WP-powered websites, some page builders may probably not. */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - $l_str_FootnoteText = preg_replace( + $l_str_footnote_text = preg_replace( '#(?$1', - $l_str_FootnoteText + $l_str_footnote_text ); } - // Text to be displayed instead of the footnote - $l_str_FootnoteReplaceText = ""; + // Text to be displayed instead of the footnote. + $l_str_footnote_replace_text = ''; - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - // get the configurable parts: - self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); - self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); - self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); + // Get the configurable parts. + self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ); + self::$a_str_footnote_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ); + self::$a_str_link_ids_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ); - // streamline ID concatenation: - self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; - self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; - self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + // Streamline ID concatenation. + self::$a_str_post_container_id_compound = self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_post_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; + self::$a_str_post_container_id_compound .= self::$a_int_reference_container_id; + self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; } - // display the footnote referrers and the tooltips: - if (!$p_bool_HideFootnotesText) { - $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Display the footnote referrers and the tooltips. + if ( ! $p_bool_hide_footnotes_text ) { + $l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // display only a truncated footnote text if option enabled: - $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); - $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); + // Display only a truncated footnote text if option enabled. + $l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) ); + $l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) ); - // define excerpt text as footnote text by default: - $l_str_ExcerptText = $l_str_FootnoteText; + // Define excerpt text as footnote text by default. + $l_str_excerpt_text = $l_str_footnote_text; /** - * Tooltip truncation + * Tooltip truncation. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1555,34 +1653,34 @@ class MCI_Footnotes_Task { * This is equivalent to the WordPress default excerpt generation, i.e. without a * custom excerpt and without a delimiter. But WordPress does word count, usually 55. */ - if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { - $l_str_DummyText = strip_tags($l_str_FootnoteText); - if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { - $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); - $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - $l_str_ExcerptText .= ' … <'; - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; - $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; - $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; - $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; - $l_str_ExcerptText .= "_$l_int_Index');\""; + if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) { + $l_str_dummy_text = wp_strip_all_tags( $l_str_footnote_text ); + if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) { + $l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length ); + $l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) ); + $l_str_excerpt_text .= ' … <'; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span'; + $l_str_excerpt_text .= ' class="footnote_tooltip_continue" '; + $l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= '(\'footnote_plugin_reference_' . self::$a_int_post_id; + $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; + $l_str_excerpt_text .= "_$l_int_index');\""; - // if enabled, add the hard link fragment ID: - if (self::$a_bool_HardLinksEnable) { + // If enabled, add the hard link fragment ID. + if ( self::$a_bool_hard_links_enable ) { - $l_str_ExcerptText .= ' href="#'; - $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; - $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; - $l_str_ExcerptText .= $l_int_Index; - $l_str_ExcerptText .= '"'; + $l_str_excerpt_text .= ' href="#'; + $l_str_excerpt_text .= self::$a_str_footnote_link_slug; + $l_str_excerpt_text .= self::$a_str_post_container_id_compound; + $l_str_excerpt_text .= $l_int_index; + $l_str_excerpt_text .= '"'; } - $l_str_ExcerptText .= '>'; + $l_str_excerpt_text .= '>'; /** - * Configurable read-on button label + * Configurable read-on button label. * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1592,55 +1690,56 @@ class MCI_Footnotes_Task { * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ */ - $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); + $l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); - $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; + $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '' : ''; } } /** - * Referrers element superscript or baseline + * Referrers element superscript or baseline. * * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report + * * @since 2.1.1 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * - * define the HTML element to use for the referrers: + * define the HTML element to use for the referrers. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) { - $l_str_SupSpan = 'sup'; + $l_str_sup_span = 'sup'; } else { - $l_str_SupSpan = 'span'; + $l_str_sup_span = 'span'; } - // whether hard links are enabled: - if (self::$a_bool_HardLinksEnable) { + // Whether hard links are enabled. + if ( self::$a_bool_hard_links_enable ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkCloseTag = ''; - // self::$a_str_LinkOpenTag will be defined as needed + self::$a_str_link_span = 'a'; + self::$a_str_link_close_tag = ''; + // Self::$a_str_link_open_tag will be defined as needed. - // compose hyperlink address (leading space is in template): - $l_str_FootnoteLinkArgument = 'href="#'; - $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; - $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteLinkArgument .= $l_int_Index; - $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; + // Compose hyperlink address (leading space is in template). + $l_str_footnote_link_argument = 'href="#'; + $l_str_footnote_link_argument .= self::$a_str_footnote_link_slug; + $l_str_footnote_link_argument .= self::$a_str_post_container_id_compound; + $l_str_footnote_link_argument .= $l_int_index; + $l_str_footnote_link_argument .= '" class="footnote_hard_link"'; /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_ReferrerAnchorElement = ''; + $l_str_referrer_anchor_element = ''; } else { @@ -1657,24 +1756,24 @@ class MCI_Footnotes_Task { * * If no hyperlink nor offset anchor is needed, initialize as empty. */ - $l_str_FootnoteLinkArgument = ''; - $l_str_ReferrerAnchorElement = ''; + $l_str_footnote_link_argument = ''; + $l_str_referrer_anchor_element = ''; - // The link element is set independently as it may be needed for styling: - if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { + // The link element is set independently as it may be needed for styling. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED ) ) ) { - self::$a_str_LinkSpan = 'a'; - self::$a_str_LinkOpenTag = ''; - self::$a_str_LinkCloseTag = ''; + self::$a_str_link_span = 'a'; + self::$a_str_link_open_tag = ''; + self::$a_str_link_close_tag = ''; } } - // determine tooltip content: - if ( self::$a_bool_TooltipsEnabled ) { - $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; + // Determine tooltip content. + if ( self::$a_bool_tooltips_enabled ) { + $l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text; } else { - $l_str_TooltipContent = ''; + $l_str_tooltip_content = ''; } /** @@ -1682,76 +1781,76 @@ class MCI_Footnotes_Task { * * @since 2.5.6 */ - $l_str_TooltipStyle = ''; - if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { - $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); - if ( $l_int_TooltipLength < 70 ) { - $l_str_TooltipStyle = ' style="width: '; - $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); - $l_str_TooltipStyle .= 'em;"'; + $l_str_tooltip_style = ''; + if ( self::$a_bool_alternative_tooltips_enabled && self::$a_bool_tooltips_enabled ) { + $l_int_tooltip_length = strlen( wp_strip_all_tags( $l_str_tooltip_content ) ); + if ( $l_int_tooltip_length < 70 ) { + $l_str_tooltip_style = ' style="width: '; + $l_str_tooltip_style .= ( $l_int_tooltip_length * .7 ); + $l_str_tooltip_style .= 'em;"'; } } - // fill in 'templates/public/footnote.html': - $l_obj_Template->replace( + // Fill in 'templates/public/footnote.html'. + $l_obj_template->replace( array( - "link-span" => self::$a_str_LinkSpan, - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "hard-link" => $l_str_FootnoteLinkArgument, - "sup-span" => $l_str_SupSpan, - "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), - "index" => $l_int_Index, - "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), - "anchor-element" => $l_str_ReferrerAnchorElement, - "style" => $l_str_TooltipStyle, - "text" => $l_str_TooltipContent, + 'link-span' => self::$a_str_link_span, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'hard-link' => $l_str_footnote_link_argument, + 'sup-span' => $l_str_sup_span, + 'before' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), + 'index' => $l_int_index, + 'after' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), + 'anchor-element' => $l_str_referrer_anchor_element, + 'style' => $l_str_tooltip_style, + 'text' => $l_str_tooltip_content, ) ); - $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); + $l_str_footnote_replace_text = $l_obj_template->get_content(); - // reset the template - $l_obj_Template->reload(); + // Reset the template. + $l_obj_template->reload(); - // if standard tooltips are enabled but alternative are not: - if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + // If standard tooltips are enabled but alternative are not. + if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); - $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); - $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); - $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); - $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); + $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) ); + $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) ); + $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); + $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); + $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); + $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); - // fill in 'templates/public/tooltip.html': - $l_obj_TemplateTooltip->replace( + // Fill in 'templates/public/tooltip.html'. + $l_obj_template_tooltip->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => $l_int_Index, - "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), - "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, - "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, - "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, - "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, - "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, - "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => $l_int_index, + 'position' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION ), + 'offset-y' => ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0, + 'offset-x' => ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0, + 'fade-in-delay' => ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : 0, + 'fade-in-duration' => ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : 0, + 'fade-out-delay' => ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : 0, + 'fade-out-duration' => ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : 0, ) ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); - $l_obj_TemplateTooltip->reload(); + $l_str_footnote_replace_text .= $l_obj_template_tooltip->get_content(); + $l_obj_template_tooltip->reload(); } } - // replace the footnote with the template - $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); + // Replace the footnote with the template. + $p_str_content = substr_replace( $p_str_content, $l_str_footnote_replace_text, $l_int_pos_start, $l_int_length + strlen( $l_str_ending_tag ) ); - // add footnote only if not empty - if (!empty($l_str_FootnoteText)) { - // set footnote to the output box at the end - self::$a_arr_Footnotes[] = $l_str_FootnoteText; - // increase footnote index - $l_int_FootnoteIndex++; + // Add footnote only if not empty. + if ( ! empty( $l_str_footnote_text ) ) { + // Set footnote to the output box at the end. + self::$a_arr_footnotes[] = $l_str_footnote_text; + // Increase footnote index. + $l_int_footnote_index++; } /** @@ -1786,19 +1885,18 @@ class MCI_Footnotes_Task { * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. */ - // add offset to the new starting position - $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); + // Add offset to the new starting position. + $l_int_pos_start += $l_int_length + strlen( $l_str_ending_tag ); - } while (true); + } while ( true ); - // return content - return $p_str_Content; + // Return content. + return $p_str_content; } /** * Generates the reference container. * - * @author Stefan Herndler * @since 1.5.0 * @return string * @@ -1809,16 +1907,15 @@ class MCI_Footnotes_Task { * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. */ - public function ReferenceContainer() { + public function reference_container() { - // no footnotes have been replaced on this page: - if (empty(self::$a_arr_Footnotes)) { - return ""; + // No footnotes have been replaced on this page. + if ( empty( self::$a_arr_footnotes ) ) { + return ''; } - /** - * Footnote index backlink symbol + * Footnote index backlink symbol. * * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. * @@ -1827,37 +1924,36 @@ class MCI_Footnotes_Task { * @reporter @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * - * If the backlink symbol is enabled: + * If the backlink symbol is enabled. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) { - // get html arrow - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); - // set html arrow to the first one if invalid index defined - if (is_array($l_str_Arrow)) { - $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); + // Get html arrow. + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW ) ); + // Set html arrow to the first one if invalid index defined. + if ( is_array( $l_str_arrow ) ) { + $l_str_arrow = MCI_Footnotes_Convert::get_arrow( 0 ); } - // get user defined arrow - $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); - if (!empty($l_str_ArrowUserDefined)) { - $l_str_Arrow = $l_str_ArrowUserDefined; + // Get user defined arrow. + $l_str_arrow_user_defined = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ); + if ( ! empty( $l_str_arrow_user_defined ) ) { + $l_str_arrow = $l_str_arrow_user_defined; } - // wrap the arrow in a @media print { display:hidden } span: - $l_str_FootnoteArrow = ''; - $l_str_FootnoteArrow .= $l_str_Arrow . ''; + // Wrap the arrow in a @media print { display:hidden } span. + $l_str_footnote_arrow = ''; + $l_str_footnote_arrow .= $l_str_arrow . ''; } else { - // If the backlink symbol isn’t enabled, set it to empty: - $l_str_Arrow = ''; - $l_str_FootnoteArrow = ''; + // If the backlink symbol isn’t enabled, set it to empty. + $l_str_arrow = ''; + $l_str_footnote_arrow = ''; } - /** - * Backlink separator + * Backlink separator. * * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. * @@ -1873,59 +1969,69 @@ class MCI_Footnotes_Task { * Initially a comma was appended in this algorithm for enumerations. * The comma in enumerations is not generally preferred. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + // Check if it is input-configured. + $l_str_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ); - if (empty($l_str_Separator)) { + if ( empty( $l_str_separator ) ) { - // if it is not, check which option is on: - $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); - switch ($l_str_SeparatorOption) { - case 'comma' : $l_str_Separator = ','; break; - case 'semicolon': $l_str_Separator = ';'; break; - case 'en_dash' : $l_str_Separator = ' –'; break; + // If it is not, check which option is on. + $l_str_separator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); + switch ( $l_str_separator_option ) { + case 'comma': + $l_str_separator = ','; + break; + case 'semicolon': + $l_str_separator = ';'; + break; + case 'en_dash': + $l_str_separator = ' –'; + break; } } - } else { - $l_str_Separator = ''; + $l_str_separator = ''; } /** - * Backlink terminator + * Backlink terminator. * * Initially a dot was appended in the table row template. + * * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable: + * @since 2.1.4 the terminator is optional, has options, and is configurable. */ - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED ) ) ) { - // check if it is input-configured: - $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + // Check if it is input-configured. + $l_str_terminator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ); - if (empty($l_str_Terminator)) { + if ( empty( $l_str_terminator ) ) { - // if it is not, check which option is on: - $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); - switch ($l_str_TerminatorOption) { - case 'period' : $l_str_Terminator = '.'; break; - case 'parenthesis': $l_str_Terminator = ')'; break; - case 'colon' : $l_str_Terminator = ':'; break; + // If it is not, check which option is on. + $l_str_terminator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); + switch ( $l_str_terminator_option ) { + case 'period': + $l_str_terminator = '.'; + break; + case 'parenthesis': + $l_str_terminator = ')'; + break; + case 'colon': + $l_str_terminator = ':'; + break; } } - } else { - $l_str_Terminator = ''; + $l_str_terminator = ''; } - /** - * Line breaks + * Line breaks. * * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * @@ -1937,18 +2043,19 @@ class MCI_Footnotes_Task { * Variable number length and proportional character width require explicit line breaks. * Otherwise, an ordinary space character offering a line break opportunity is inserted. */ - $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                                                                                                      ' : ' '; + $l_str_line_break = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED ) ) ? '
                                                                                                                                                                      ' : ' '; /** + * Line breaks for source readability. + * * For maintenance and support, table rows in the reference container should be * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below): + * Before the first table row (breaks between rows are ~200 lines below). */ - $l_str_Body = "\r\n\r\n"; - + $l_str_body = "\r\n\r\n"; /** - * Reference container table row template load + * Reference container table row template load. * * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * @@ -1956,34 +2063,34 @@ class MCI_Footnotes_Task { * @date 2020-11-16T2024+0100 */ - // when combining identical footnotes is turned on, another template is needed: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // the combining template allows for backlink clusters and supports cell clicking for single notes: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); + // When combining identical footnotes is turned on, another template is needed. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { + // The combining template allows for backlink clusters and supports cell clicking for single notes. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' ); } else { - // when 3-column layout is turned on (only available if combining is turned off): - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); + // When 3-column layout is turned on (only available if combining is turned off). + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' ); } else { - // when switch symbol and index is turned on, and combining and 3-columns are off: - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); + // When switch symbol and index is turned on, and combining and 3-columns are off. + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' ); } else { - // default is the standard template: - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); + // Default is the standard template. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' ); } } } /** - * Switch backlink symbol and footnote number + * Switch backlink symbol and footnote number. * * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * @@ -1999,36 +2106,37 @@ class MCI_Footnotes_Task { * @since 2.1.4 * @date 2020-11-26T1633+0100 */ - $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); + $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); - // loop through all footnotes found in the page - for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { + // Loop through all footnotes found in the page. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_index = 0; $l_int_index < $num_footnotes; $l_int_index++ ) { - // get footnote text - $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; + // Get footnote text. + $l_str_footnote_text = self::$a_arr_footnotes[ $l_int_index ]; - // if footnote is empty, go to the next one; - // With combine identicals turned on, identicals will be deleted and are skipped: - if (empty($l_str_FootnoteText)) { + // If footnote is empty, go to the next one;. + // With combine identicals turned on, identicals will be deleted and are skipped. + if ( empty( $l_str_footnote_text ) ) { continue; } - // generate content of footnote index cell - $l_int_FirstFootnoteIndex = ($l_int_Index + 1); + // Generate content of footnote index cell. + $l_int_first_footnote_index = ( $l_int_index + 1 ); - // get the footnote index string and - // keep supporting legacy index placeholder: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Get the footnote index string and. + // Keep supporting legacy index placeholder. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); /** - * Case of only one backlink per table row + * Case of only one backlink per table row. * - * If enabled, and for the case the footnote is single, compose hard link: + * If enabled, and for the case the footnote is single, compose hard link. */ - // define anyway: - $l_str_HardLinkAddress = ''; + // Define anyway. + $l_str_hard_link_address = ''; - if (self::$a_bool_HardLinksEnable) { + if ( self::$a_bool_hard_links_enable ) { /** * Use-Backbutton-Hint tooltip, optional and configurable. @@ -2044,43 +2152,42 @@ class MCI_Footnotes_Task { * 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 */ - if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_UseBackbuttonHint = ' title="'; - $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); - $l_str_UseBackbuttonHint .= '"'; + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_use_backbutton_hint = ' title="'; + $l_str_use_backbutton_hint .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ); + $l_str_use_backbutton_hint .= '"'; } else { - $l_str_UseBackbuttonHint = ''; + $l_str_use_backbutton_hint = ''; } /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_FootnoteAnchorElement = ''; + $l_str_footnote_anchor_element = ''; - // compose optional hard link address: - $l_str_HardLinkAddress = ' href="#'; - $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; - $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; - $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; - $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; + // Compose optional hard link address. + $l_str_hard_link_address = ' href="#'; + $l_str_hard_link_address .= self::$a_str_referrer_link_slug; + $l_str_hard_link_address .= self::$a_str_post_container_id_compound; + $l_str_hard_link_address .= $l_str_footnote_id . '"'; + $l_str_hard_link_address .= $l_str_use_backbutton_hint; - // compose optional opening link tag with optional hard link, mandatory for instance: - self::$a_str_LinkOpenTag = 'get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { - // ID, optional hard link address, and class: - $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; - $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= self::$a_int_PostId; - $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= ' href="#'; - $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; - $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; + // ID, optional hard link address, and class. + $l_str_footnote_reference = '<' . self::$a_str_link_span; + $l_str_footnote_reference .= ' id="footnote_plugin_reference_'; + $l_str_footnote_reference .= self::$a_int_post_id; + $l_str_footnote_reference .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_reference .= "_$l_str_footnote_id\""; + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= ' href="#'; + $l_str_footnote_reference .= self::$a_str_referrer_link_slug; + $l_str_footnote_reference .= self::$a_str_post_container_id_compound; + $l_str_footnote_reference .= $l_str_footnote_id . '"'; + $l_str_footnote_reference .= $l_str_use_backbutton_hint; } - $l_str_FootnoteReference .= ' class="footnote_backlink"'; + $l_str_footnote_reference .= ' class="footnote_backlink"'; - // the click event goes in the table cell if footnote remains single: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; - $l_str_BacklinkEvent .= self::$a_int_PostId; - $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; - $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; + // The click event goes in the table cell if footnote remains single. + $l_str_backlink_event = ' onclick="footnote_move_to_anchor_'; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "('footnote_plugin_tooltip_"; + $l_str_backlink_event .= self::$a_int_post_id; + $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; + $l_str_backlink_event .= "_$l_str_footnote_id');\""; + // The dedicated template enumerating backlinks uses another variable. + $l_str_footnote_backlinks = $l_str_footnote_reference; - // the dedicated template enumerating backlinks uses another variable: - $l_str_FootnoteBacklinks = $l_str_FootnoteReference; + // Append the click event right to the backlink item for enumerations;. + // Else it goes in the table cell. + $l_str_footnote_backlinks .= $l_str_backlink_event . '>'; + $l_str_footnote_reference .= '>'; - // append the click event right to the backlink item for enumerations; - // else it goes in the table cell: - $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; - $l_str_FootnoteReference .= '>'; - - // append the optional offset anchor for hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; - $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; + // Append the optional offset anchor for hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_reference .= $l_str_footnote_anchor_element; + $l_str_footnote_backlinks .= $l_str_footnote_anchor_element; } - // continue both single note and notes cluster, depending on switch option status: - if ($l_bool_SymbolSwitch) { + // Continue both single note and notes cluster, depending on switch option status. + if ( $l_bool_symbol_switch ) { - $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_footnote_reference .= "$l_str_footnote_id$l_str_footnote_arrow"; + $l_str_footnote_backlinks .= "$l_str_footnote_id$l_str_footnote_arrow"; } else { - $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; - $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_footnote_reference .= "$l_str_footnote_arrow$l_str_footnote_id"; + $l_str_footnote_backlinks .= "$l_str_footnote_arrow$l_str_footnote_id"; } - // If that is the only footnote with this text, we’re almost done. + // If that is the only footnote with this text, we’re almost done.. - // check if it isn't the last footnote in the array: - if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { + // Check if it isn't the last footnote in the array. + if ( $l_int_first_footnote_index < count( self::$a_arr_footnotes ) ) { - // get all footnotes that haven't passed yet: - for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { + // Get all footnotes that haven't passed yet. + $num_footnotes = count( self::$a_arr_footnotes ); + for ( $l_int_check_index = $l_int_first_footnote_index; $l_int_check_index < $num_footnotes; $l_int_check_index++ ) { - // check if a further footnote is the same as the actual one: - if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { + // Check if a further footnote is the same as the actual one. + if ( self::$a_arr_footnotes[ $l_int_check_index ] === $l_str_footnote_text ) { - // if so, set the further footnote as empty so it won't be displayed later: - self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; + // If so, set the further footnote as empty so it won't be displayed later. + self::$a_arr_footnotes[ $l_int_check_index ] = ''; - // set the flag to true for the combined status: - $l_bool_FlagCombined = true; + // Set the flag to true for the combined status. + $l_bool_flag_combined = true; - // update the footnote ID: - $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // Update the footnote ID. + $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); - // resume composing the backlinks enumeration: - $l_str_FootnoteBacklinks .= "$l_str_Separator'; - $l_str_FootnoteBacklinks .= $l_str_LineBreak; - $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; - $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; + // Resume composing the backlinks enumeration. + $l_str_footnote_backlinks .= "$l_str_separator'; + $l_str_footnote_backlinks .= $l_str_line_break; + $l_str_footnote_backlinks .= '<' . self::$a_str_link_span; + $l_str_footnote_backlinks .= ' id="footnote_plugin_reference_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id\""; - // insert the optional hard link address: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ' href="#'; - $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; - $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; - $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; + // Insert the optional hard link address. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ' href="#'; + $l_str_footnote_backlinks .= self::$a_str_referrer_link_slug; + $l_str_footnote_backlinks .= self::$a_str_post_container_id_compound; + $l_str_footnote_backlinks .= $l_str_footnote_id . '"'; + $l_str_footnote_backlinks .= $l_str_use_backbutton_hint; } - $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; - $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; - $l_str_FootnoteBacklinks .= self::$a_int_PostId; - $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; - $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; + $l_str_footnote_backlinks .= ' class="footnote_backlink"'; + $l_str_footnote_backlinks .= ' onclick="footnote_move_to_anchor_'; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "('footnote_plugin_tooltip_"; + $l_str_footnote_backlinks .= self::$a_int_post_id; + $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; + $l_str_footnote_backlinks .= "_$l_str_footnote_id');\">"; - // append the offset anchor for optional hard links: - if (self::$a_bool_HardLinksEnable) { - $l_str_FootnoteBacklinks .= ''; + // Append the offset anchor for optional hard links. + if ( self::$a_bool_hard_links_enable ) { + $l_str_footnote_backlinks .= ''; } - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; - $l_str_FootnoteBacklinks .= $l_str_FootnoteId; - $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? '' : $l_str_footnote_arrow; + $l_str_footnote_backlinks .= $l_str_footnote_id; + $l_str_footnote_backlinks .= $l_bool_symbol_switch ? $l_str_footnote_arrow : ''; } } } - // append terminator and end tag: - $l_str_FootnoteReference .= $l_str_Terminator . ''; - $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; + // Append terminator and end tag. + $l_str_footnote_reference .= $l_str_terminator . ''; + $l_str_footnote_backlinks .= $l_str_terminator . ''; } - // line wrapping of URLs already fixed, see above + // Line wrapping of URLs already fixed, see above. - // get reference container item text if tooltip text goes separate: - $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); - $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; - if ( $l_bool_HasTooltipText ) { - $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); - self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_MirrorTooltipText ) { - $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); - $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); - $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; + // Get reference container item text if tooltip text goes separate. + $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); + $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; + if ( $l_bool_has_tooltip_text ) { + $l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) ); + self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_mirror_tooltip_text ) { + $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); + $l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ); + $l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text; } else { - $l_str_ReferenceText = $l_str_NotTooltipText; + $l_str_reference_text = $l_str_not_tooltip_text; } } else { - $l_str_ReferenceText = $l_str_FootnoteText; + $l_str_reference_text = $l_str_footnote_text; } - // replace all placeholders in table row template: - $l_obj_Template->replace( + // Replace all placeholders in table row template. + $l_obj_template->replace( array( - // placeholder used in all templates: - "text" => $l_str_ReferenceText, + // Placeholder used in all templates. + 'text' => $l_str_reference_text, - // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => self::$a_str_LinkOpenTag, - "link-end" => self::$a_str_LinkCloseTag, - "link-span" => self::$a_str_LinkSpan, - "terminator" => $l_str_Terminator, - "anchor-element" => $l_str_FootnoteAnchorElement, - "hard-link" => $l_str_HardLinkAddress, + // Used in standard layout W/O COMBINED FOOTNOTES. + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ), + 'link-start' => self::$a_str_link_open_tag, + 'link-end' => self::$a_str_link_close_tag, + 'link-span' => self::$a_str_link_span, + 'terminator' => $l_str_terminator, + 'anchor-element' => $l_str_footnote_anchor_element, + 'hard-link' => $l_str_hard_link_address, - // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => $l_bool_FlagCombined ? '' : ' pointer', - "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, - "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + // Used in standard layout WITH COMBINED IDENTICALS TURNED ON. + 'pointer' => $l_bool_flag_combined ? '' : ' pointer', + 'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event, + 'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference, - // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteId, + // Legacy placeholders for use in legacy layout templates. + 'arrow' => $l_str_footnote_arrow, + 'index' => $l_str_footnote_id, ) ); - $l_str_Body .= $l_obj_Template->getContent(); + $l_str_body .= $l_obj_template->get_content(); - // extra line breaks for page source readability: - $l_str_Body .= "\r\n\r\n"; + // Extra line breaks for page source readability. + $l_str_body .= "\r\n\r\n"; - $l_obj_Template->reload(); + $l_obj_template->reload(); } - // call again for robustness when priority levels don’t match any longer: - self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); + // Call again for robustness when priority levels don’t match any longer. + self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); - // streamline: - $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); + // Streamline. + $l_bool_collapse_default = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE ) ); /** - * Reference container label + * Reference container label. * * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. * @@ -2304,7 +2411,7 @@ class MCI_Footnotes_Task { * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. */ - $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); + $l_str_reference_container_label = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ); /** * Select the reference container template according to the script mode. @@ -2334,21 +2441,21 @@ class MCI_Footnotes_Task { $l_obj_TemplateContainer->replace( array( - "post_id" => self::$a_int_PostId, - "container_id" => self::$a_int_ReferenceContainerId, - "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), - "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, - "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', - "style" => $l_bool_CollapseDefault ? 'display: none;' : '', - "content" => $l_str_Body, - "scroll-offset" => (self::$a_int_ScrollOffset / 100), - "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), + 'post_id' => self::$a_int_post_id, + 'container_id' => self::$a_int_reference_container_id, + 'element' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ), + 'name' => empty( $l_str_reference_container_label ) ? ' ' : $l_str_reference_container_label, + 'button-style' => ! $l_bool_collapse_default ? 'display: none;' : '', + 'style' => $l_bool_collapse_default ? 'display: none;' : '', + 'content' => $l_str_body, + 'scroll-offset' => ( self::$a_int_scroll_offset / 100 ), + 'scroll-duration' => intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) ), ) ); - // free all found footnotes if reference container will be displayed - self::$a_arr_Footnotes = array(); + // Free all found footnotes if reference container will be displayed. + self::$a_arr_footnotes = array(); - return $l_obj_TemplateContainer->getContent(); + return $l_obj_template_container->get_content(); } } diff --git a/class/template.php b/class/template.php index 2c0b8d4..236734c 100644 --- a/class/template.php +++ b/class/template.php @@ -1,39 +1,20 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); /** - * Modularize functions + * Modularize functions. * * @since 2.4.0d3 - * - * @author Patrizia Lutz @misfist */ - if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { + $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ); + if ( $template ) { $this->process_template( $template ); } else { return; @@ -133,124 +106,125 @@ class MCI_Footnotes_Template { /** * Replace all placeholders specified in array. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). + * @param array $p_arr_placeholders Placeholders (key = placeholder, value = value). * @return bool True on Success, False if Placeholders invalid. */ - public function replace($p_arr_Placeholders) { - // no placeholders set - if (empty($p_arr_Placeholders)) { + public function replace( $p_arr_placeholders ) { + // No placeholders set. + if ( empty( $p_arr_placeholders ) ) { return false; } - // template content is empty - if (empty($this->a_str_ReplacedContent)) { + // Template content is empty. + if ( empty( $this->a_str_replaced_content ) ) { return false; } - // iterate through each placeholder and replace it with its value - foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { - $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); + // Iterate through each placeholder and replace it with its value. + foreach ( $p_arr_placeholders as $l_str_placeholder => $l_str_value ) { + $this->a_str_replaced_content = str_replace( '[[' . $l_str_placeholder . ']]', $l_str_value, $this->a_str_replaced_content ); } - // success + // Success. return true; } /** * Reloads the original content of the template file. * - * @author Stefan Herndler * @since 1.5.0 */ public function reload() { - $this->a_str_ReplacedContent = $this->a_str_OriginalContent; + $this->a_str_replaced_content = $this->a_str_original_content; } /** * Returns the content of the template file with replaced placeholders. * - * @author Stefan Herndler * @since 1.5.0 * @return string Template content with replaced placeholders. */ - public function getContent() { - return $this->a_str_ReplacedContent; + public function get_content() { + return $this->a_str_replaced_content; } /** - * Process template file - * - * @author Patrizia Lutz @misfist + * Process template file. * * @since 2.4.0d3 * - * @param string $template + * @param string $template The template to be processed. * @return void * - * - * @since 2.0.3 replace tab with a space - * @since 2.0.3 replace 2 spaces with 1 - * @since 2.0.4 collapse multiple spaces - * @since 2.2.6 delete a space before a closing pointy bracket - * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) + * @since 2.0.3 Replace tab with a space. + * @since 2.0.3 Replace 2 spaces with 1. + * @since 2.0.4 Collapse multiple spaces. + * @since 2.2.6 Delete a space before a closing pointy bracket. + * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). */ public function process_template( $template ) { - $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); - $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); - $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); + // phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents + $this->a_str_original_content = preg_replace( '##s', '', file_get_contents( $template ) ); + // phpcs:enable + $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( "\t", ' ', $this->a_str_original_content ); + $this->a_str_original_content = preg_replace( '# +#', ' ', $this->a_str_original_content ); + $this->a_str_original_content = str_replace( ' >', '>', $this->a_str_original_content ); $this->reload(); } /** - * Get the template + * Get the template. * - * @author Patrizia Lutz @misfist + * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. * - * @since 2.4.0d3 + * @since 2.4.0d3 Contribution. + * @since 2.5.0 Release. * - * @param string $p_str_FileType - * @param string $p_str_FileName - * @param string $p_str_Extension + * @contributor @misfist + * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 + * + * @param string $p_str_file_type The file type of the template. + * @param string $p_str_file_name The file name of the template. + * @param string $p_str_extension The file extension of the template. * @return mixed false | template path */ - public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { + public function get_template( $p_str_file_type, $p_str_file_name, $p_str_extension = 'html' ) { $located = false; /** - * The directory change be modified - * @usage to change location of templates to `template_parts/footnotes/': + * The directory can be changed. + * + * @usage to change location of templates to 'template_parts/footnotes/': * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/; + * return 'template_parts/footnotes/'; * } ); */ $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension; /** - * Look in active (child) theme + * Look in active theme. */ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - /** - * Look in parent theme - */ + /** + * Look in parent theme in case active is child. + */ } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - /** - * Look in custom directory - */ + /** + * Look in custom plugin directory. + */ } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - /** - * Look in plugin - */ + /** + * Fall back to the templates shipped with the plugin. + */ } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { $located = $this->plugin_directory . 'templates/' . $template_name; } @@ -258,4 +232,4 @@ class MCI_Footnotes_Template { return $located; } -} // end of class +} diff --git a/class/widgets/base.php b/class/widgets/base.php index ad41077..6618f28 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,14 +1,12 @@ - __CLASS__, "description" => $this->getDescription()); - $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); - // registers the Widget + $l_arr_widget_options = array( + 'classname' => __CLASS__, + 'description' => $this->get_description(), + ); + $l_arr_control_options = array( + 'id_base' => strtolower( $this->get_id() ), + 'width' => $this->get_widget_width(), + ); + // Registers the Widget. parent::__construct( - strtolower($this->getID()), // unique ID for the widget, has to be lowercase - $this->getName(), // Plugin name to be displayed - $l_arr_WidgetOptions, // Optional Widget Options - $l_arr_ControlOptions // Optional Widget Control Options - ); + strtolower( $this->get_id() ), // Unique ID for the widget, has to be lowercase. + $this->get_name(), // Plugin name to be displayed. + $l_arr_widget_options, // Optional Widget Options. + $l_arr_control_options // Optional Widget Control Options. + ); } } diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 2e322ec..4a75d11 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,85 +1,81 @@ -get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { - echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); + public function widget( $args, $instance ) { + global $g_obj_mci_footnotes; + // Reference container positioning is set to "widget area". + if ( 'widget' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $g_obj_mci_footnotes->a_obj_task->Reference_Container(); + // phpcs:enable } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 3a27477..898f133 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,83 +1,92 @@ -getContent(); + public static function new_plain_text_editor_button() { + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'editor-button' ); + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable } /** * Includes the Plugins WYSIWYG editor script. * - * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_Plugins Scripts to be included to the editor. + * @param array $p_arr_plugins Scripts to be included to the editor. * @return array */ - public static function includeScripts($p_arr_Plugins) { - $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); - return $p_arr_Plugins; + public static function include_scripts( $p_arr_plugins ) { + $p_arr_plugins[ MCI_Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor.js', __FILE__ ); + return $p_arr_plugins; } /** * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. * Returns an JSON encoded array with the Footnotes start and end short code. * - * @author Stefan Herndler * @since 1.5.0 */ - public static function ajaxCallback() { - // get start and end tag for the footnotes short code - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); - if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { - $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); - $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + public static function ajax_callback() { + // Get start and end tag for the footnotes short code. + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); + if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { + $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); + $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); } - echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); + echo wp_json_encode( + array( + 'start' => htmlspecialchars( $l_str_starting_tag ), + 'end' => htmlspecialchars( $l_str_ending_tag ), + ) + ); exit; } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..85ecd48 --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", + "wp-coding-standards/wpcs": "^2.3" + }, + "scripts": { + "post-install-cmd": [ + "bash _tools/setup.sh" + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..9e0ee7c --- /dev/null +++ b/composer.lock @@ -0,0 +1,196 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3a147d50695956de52f7cbf827b47830", + "packages": [], + "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "time": "2020-05-13T23:57:56+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/contrib/pre-commit b/contrib/pre-commit new file mode 100644 index 0000000..0dc792f --- /dev/null +++ b/contrib/pre-commit @@ -0,0 +1,61 @@ +#!/bin/sh + +# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook +# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ + +PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` +STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` + +# Determine if a file list is passed +if [ "$#" -eq 1 ] +then + oIFS=$IFS + IFS=' + ' + SFILES="$1" + IFS=$oIFS +fi +SFILES=${SFILES:-$STAGED_FILES_CMD} + +echo "Checking PHP Lint..." +for FILE in $SFILES +do + php -l -d display_errors=0 $PROJECT/$FILE + if [ $? != 0 ] + then + echo "Fix the error before commit." + exit 1 + fi + FILES="$FILES $PROJECT/$FILE" +done + +if [ -f "$PROJECT/phpcs.ruleset.xml" ] +then + RULESET="$PROJECT/phpcs.ruleset.xml" +elif [ -f "$PROJECT/phpcs.xml.dist" ] +then + RULESET="$PROJECT/phpcs.xml.dist" +else + RULESET="WordPress" +fi + +if [ "$FILES" != "" ] +then + echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Coding standards errors have been detected. Running phpcbf..." + ./vendor/bin/phpcbf --standard="$RULESET" --encoding=utf-8 -n -p $FILES + git add $FILES + echo "Running Code Sniffer again..." + ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES + if [ $? != 0 ] + then + echo "Errors found not fixable automatically. You need to manually fix them." + exit 1 + fi + fi +fi + +exit $? diff --git a/footnotes.php b/footnotes.php index b227652..f32726b 100755 --- a/footnotes.php +++ b/footnotes.php @@ -12,6 +12,7 @@ /* * Copyright 2021 Mark Cheret (email: mark@cheret.de) */ + /** * Version number for stylesheet cache busting. * @@ -41,34 +42,34 @@ define( 'C_STR_FOOTNOTES_VERSION', '2.5.7' ); /** * Plugin’s main PHP file. - * + * * @filesource - * @author Stefan Herndler + * @package footnotes * @since 0.0.1 */ -// Get all common classes and functions -require_once(dirname(__FILE__) . "/includes.php"); +// Get all common classes and functions. +require_once dirname( __FILE__ ) . '/includes.php'; -// add Plugin Links to the "installed plugins" page +// Add Plugin Links to the "installed plugins" page. $l_str_plugin_file = 'footnotes/footnotes.php'; -add_filter("plugin_action_links_{$l_str_plugin_file}", array("MCI_Footnotes_Hooks", "PluginLinks"), 10, 2); +add_filter( "plugin_action_links_{$l_str_plugin_file}", array( 'MCI_Footnotes_Hooks', 'plugin_links' ), 10, 2 ); -// initialize the Plugin -$g_obj_MCI_Footnotes = new MCI_Footnotes(); -// run the Plugin -$g_obj_MCI_Footnotes->run(); +// Initialize the Plugin. +$g_obj_mci_footnotes = new MCI_Footnotes(); +// Run the Plugin. +$g_obj_mci_footnotes->run(); /** * Sets the stylesheet enqueuing mode for production. - * + * * @since 2.5.5 * @var bool * @see class/init.php - * + * * In production, a minified CSS file tailored to the settings is enqueued. - * + * * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. - */ + */ define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index 732cfb9..9501097 100644 --- a/includes.php +++ b/includes.php @@ -3,36 +3,37 @@ * Includes all common files. * * @filesource - * @author Stefan Herndler + * @package footnotes * @since 1.5.0 14.09.14 13:40 */ /** - * Requires (require_once) all *.php files inside a specific Directory. + * Requires (`require_once`) all `*.php` files inside a specific Directory. * * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_Directory Absolute Directory path to lookup for *.php files + * @param string $p_str_directory Absolute Directory path to lookup for `*.php` files. */ -function MCI_Footnotes_requirePhpFiles($p_str_Directory) { - // append slash at the end of the Directory if not exist - if (substr($p_str_Directory, -1) != "/") { - $p_str_Directory .= "/"; - +function mci_footnotes_require_php_files( $p_str_directory ) { + // Append slash at the end of the Directory if not exist. + if ( '/' !== substr( $p_str_directory, -1 ) ) { + $p_str_directory .= '/'; } - // get all PHP files inside Directory - $l_arr_Files = scandir($p_str_Directory); - // iterate through each class - foreach ($l_arr_Files as $l_str_FileName) { - // skip all non *.php files - if (strtolower(substr($l_str_FileName, -4)) != ".php") { + // Get all PHP files inside Directory. + $l_arr_files = scandir( $p_str_directory ); + // Iterate through each class. + foreach ( $l_arr_files as $l_str_file_name ) { + // Skip all non-PHP files. + if ( '.php' !== strtolower( substr( $l_str_file_name, -4 ) ) ) { continue; } + // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIncludeInspection */ - require_once($p_str_Directory . $l_str_FileName); + require_once $p_str_directory . $l_str_file_name; + // phpcs:enable } } -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard"); -MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets"); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/layout' ); +mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/widgets' ); diff --git a/readme.txt b/readme.txt index 1e38ae2..62e37d4 100755 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ === footnotes === -Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges +Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 Tested up to: 5.6.1 @@ -329,7 +329,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.4 = - Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: GDPR: Add jQuery UI from WordPress instead of third party. +- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - Bugfix: Reference container: remove inconvenient left/right cellpadding. - Bugfix: Tooltips: improve layout with inherited font size by lower line height. diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 91fc1e4..03ad002 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -54,7 +54,7 @@ type: 'POST', url: '/wp-admin/admin-ajax.php', data: { - action: 'footnotes_getPluginInfo', + action: 'footnotes_get_plugin_info', plugin: '[[plugin-name]]' }, dataType: 'json', diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index cb400de..4e70481 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -4,8 +4,8 @@ --> <[[link-span]] onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" [[hard-link]] @@ -17,7 +17,7 @@ >[[anchor-element]] Date: Fri, 26 Feb 2021 08:07:03 +0000 Subject: [PATCH 082/144] Revert "Update code to comply with WP Coding Standards (#38)" This reverts commit 02c6c1c362379eed8943c79b7d1495e8c9de5588. --- .gitignore | 3 - README.md | 6 +- _tools/setup.sh | 4 - class/config.php | 29 +- class/convert.php | 242 +-- class/dashboard/init.php | 212 +++ class/dashboard/layout.php | 552 ++++++ class/dashboard/subpage-diagnostics.php | 140 ++ class/dashboard/subpage-main.php | 1182 +++++++++++++ class/hooks.php | 79 +- class/init.php | 264 ++- class/language.php | 38 +- class/layout/abstract-engine.php | 563 ------ class/layout/diagnostics.php | 149 -- class/layout/init.php | 207 --- class/layout/settings.php | 1261 -------------- class/settings.php | 736 ++++---- class/task.php | 1793 +++++++++----------- class/template.php | 190 ++- class/widgets/base.php | 49 +- class/widgets/reference-container.php | 56 +- class/wysiwyg.php | 77 +- composer.json | 11 - composer.lock | 196 --- contrib/pre-commit | 61 - footnotes.php | 29 +- includes.php | 37 +- readme.txt | 6 +- templates/dashboard/other-plugins.html | 2 +- templates/public/footnote-alternative.html | 6 +- 30 files changed, 3893 insertions(+), 4287 deletions(-) delete mode 100644 _tools/setup.sh create mode 100644 class/dashboard/init.php create mode 100644 class/dashboard/layout.php create mode 100644 class/dashboard/subpage-diagnostics.php create mode 100644 class/dashboard/subpage-main.php delete mode 100644 class/layout/abstract-engine.php delete mode 100644 class/layout/diagnostics.php delete mode 100644 class/layout/init.php delete mode 100644 class/layout/settings.php delete mode 100644 composer.json delete mode 100644 composer.lock delete mode 100644 contrib/pre-commit diff --git a/.gitignore b/.gitignore index b6fe4af..7fdc234 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ .phpdoc/ -vendor/ - -*.bak diff --git a/README.md b/README.md index 5cd8dae..e0e67da 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) - - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) @@ -26,9 +25,8 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) 1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` - - You may have to enable double-wildcards in your console first (`shopt -s globstar`) + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` ## Updating Documentation diff --git a/_tools/setup.sh b/_tools/setup.sh deleted file mode 100644 index fd4c786..0000000 --- a/_tools/setup.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cp contrib/pre-commit .git/hooks/pre-commit -chmod +x .git/hooks/pre-commit diff --git a/class/config.php b/class/config.php index 8f02119..98a3245 100644 --- a/class/config.php +++ b/class/config.php @@ -1,44 +1,51 @@ -foot'; /** * Public Plugin name for dashboard heading - * + * * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * in WPv5.5 being torn apart as if the headline was text-align:justify and not * the last line. That ugly display bug badly affected the plugin’s communication. * The only working solution found so far is using position:fixed in one heading * that isn’t translated, and dropping the logo in another, translatable heading. @@ -51,6 +58,7 @@ class MCI_Footnotes_Config { /** * Html tag for the LOVE symbol. * + * @author Stefan Herndler * @since 1.5.0 * @var string */ @@ -67,6 +75,7 @@ class MCI_Footnotes_Config { /** * Short code to DON'T display the 'LOVE ME' slug on certain pages. * + * @author Stefan Herndler * @since 1.5.0 * @var string */ diff --git a/class/convert.php b/class/convert.php index 3adb313..e1823ad 100644 --- a/class/convert.php +++ b/class/convert.php @@ -3,16 +3,20 @@ * Includes the Convert Class. * * @filesource - * @package footnotes - * @since 1.5.0 - * @date 12.09.14 10:56 - * + * @author Stefan Herndler + * @since 1.5.0 12.09.14 10:56 + * + * Edited: * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 + * + * Last modified: 2020-12-12T1541+0100 */ + /** * Converts data types and Footnotes specific values. * + * @author Stefan Herndler * @since 1.5.0 */ class MCI_Footnotes_Convert { @@ -20,29 +24,30 @@ class MCI_Footnotes_Convert { /** * Converts a integer into the user-defined counter style for the footnotes. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Index to be converted. - * @param string $p_str_convert_style Style of the new/converted Index. + * @param int $p_int_Index Index to be converted. + * @param string $p_str_ConvertStyle Style of the new/converted Index. * @return string Converted Index as string in the defined counter style. - * + * * Edited: * @since 2.2.0 lowercase Roman numerals supported */ - public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) { - switch ( $p_str_convert_style ) { - case 'romanic': - return self::to_romanic( $p_int_index, true ); - case 'roman_low': - return self::to_romanic( $p_int_index, false ); - case 'latin_high': - return self::to_latin( $p_int_index, true ); - case 'latin_low': - return self::to_latin( $p_int_index, false ); - case 'arabic_leading': - return self::to_arabic_leading( $p_int_index ); - case 'arabic_plain': + public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") { + switch ($p_str_ConvertStyle) { + case "romanic": + return self::toRomanic($p_int_Index, true); + case "roman_low": + return self::toRomanic($p_int_Index, false); + case "latin_high": + return self::toLatin($p_int_Index, true); + case "latin_low": + return self::toLatin($p_int_Index, false); + case "arabic_leading": + return self::toArabicLeading($p_int_Index); + case "arabic_plain": default: - return $p_int_index; + return $p_int_Index; } } @@ -50,174 +55,175 @@ class MCI_Footnotes_Convert { * Converts an integer into latin ascii characters, either lower or upper-case. * Function available from A to ZZ ( means 676 footnotes at 1 page possible). * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. - * @param bool $p_bool_upper_case True to convert the value to upper case letter, otherwise to lower case. + * @param int $p_int_Value Value/Index to be converted. + * @param bool $p_bool_UpperCase True to convert the value to upper case letter, otherwise to lower case. * @return string */ - private static function to_latin( $p_int_value, $p_bool_upper_case ) { - // Output string. - $l_str_return = ''; - $l_int_offset = 0; - // Check if the value is higher then 26 = Z. - while ( $p_int_value > 26 ) { - // Increase offset and reduce counter. - $l_int_offset++; - $p_int_value -= 26; + private static function toLatin($p_int_Value, $p_bool_UpperCase) { + // output string + $l_str_Return = ""; + $l_int_Offset = 0; + // check if the value is higher then 26 = Z + while ($p_int_Value > 26) { + // increase offset and reduce counter + $l_int_Offset++; + $p_int_Value -= 26; } - // If offset set (more then Z), then add a new letter in front. - if ( $l_int_offset > 0 ) { - $l_str_return = chr( $l_int_offset + 64 ); + // if offset set (more then Z), then add a new letter in front + if ($l_int_Offset > 0) { + $l_str_Return = chr($l_int_Offset + 64); } - // Add the origin letter. - $l_str_return .= chr( $p_int_value + 64 ); - // Return the latin character representing the integer. - if ( $p_bool_upper_case ) { - return strtoupper( $l_str_return ); + // add the origin letter + $l_str_Return .= chr($p_int_Value + 64); + // return the latin character representing the integer + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); } - return strtolower( $l_str_return ); + return strtolower($l_str_Return); } /** * Converts an integer to a leading-0 integer. * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. + * @param int $p_int_Value Value/Index to be converted. * @return string Value with a leading zero. */ - private static function to_arabic_leading( $p_int_value ) { - // Add a leading 0 if number lower then 10. - if ( $p_int_value < 10 ) { - return '0' . $p_int_value; + private static function toArabicLeading($p_int_Value) { + // add a leading 0 if number lower then 10 + if ($p_int_Value < 10) { + return "0" . $p_int_Value; } - return $p_int_value; + return $p_int_Value; } /** * Converts an integer to a romanic letter. * + * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_value Value/Index to be converted. - * @param bool $p_bool_upper_case Whether to uppercase. + * @param int $p_int_Value Value/Index to be converted. * @return string - * + * * Edited: * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 */ - private static function to_romanic( $p_int_value, $p_bool_upper_case ) { - // Table containing all necessary romanic letters. - $l_arr_romanic_letters = array( - 'M' => 1000, + private static function toRomanic($p_int_Value, $p_bool_UpperCase) { + // table containing all necessary romanic letters + $l_arr_RomanicLetters = array( + 'M' => 1000, 'CM' => 900, - 'D' => 500, + 'D' => 500, 'CD' => 400, - 'C' => 100, + 'C' => 100, 'XC' => 90, - 'L' => 50, + 'L' => 50, 'XL' => 40, - 'X' => 10, + 'X' => 10, 'IX' => 9, - 'V' => 5, + 'V' => 5, 'IV' => 4, - 'I' => 1, + 'I' => 1 ); - // Return value. - $l_str_return = ''; - // Iterate through integer value until it is reduced to 0. - while ( $p_int_value > 0 ) { - foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) { - if ( $p_int_value >= $l_int_arabic ) { - $p_int_value -= $l_int_arabic; - $l_str_return .= $l_str_romanic; + // return value + $l_str_Return = ''; + // iterate through integer value until it is reduced to 0 + while ($p_int_Value > 0) { + foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { + if ($p_int_Value >= $l_int_Arabic) { + $p_int_Value -= $l_int_Arabic; + $l_str_Return .= $l_str_Romanic; break; } } } - // Return romanic letters as string. - if ( $p_bool_upper_case ) { - return strtoupper( $l_str_return ); + // return romanic letters as string + if ($p_bool_UpperCase) { + return strtoupper($l_str_Return); } - return strtolower( $l_str_return ); + return strtolower($l_str_Return); } /** * Converts a string depending on its value to a boolean. * + * @author Stefan Herndler * @since 1.0-beta - * @param string $p_str_value String to be converted to boolean. + * @param string $p_str_Value String to be converted to boolean. * @return bool Boolean representing the string. */ - public static function to_bool( $p_str_value ) { - // Convert string to lower-case to make it easier. - $p_str_value = strtolower( $p_str_value ); - // Check if string seems to contain a "true" value. - switch ( $p_str_value ) { - case 'checked': - case 'yes': - case 'true': - case 'on': - case '1': + public static function toBool($p_str_Value) { + // convert string to lower-case to make it easier + $p_str_Value = strtolower($p_str_Value); + // check if string seems to contain a "true" value + switch ($p_str_Value) { + case "checked": + case "yes": + case "true": + case "on": + case "1": return true; } - // Nothing found that says "true", so we return false. + // nothing found that says "true", so we return false return false; } /** * Get a html Array short code depending on Arrow-Array key index. * + * @author Stefan Herndler * @since 1.3.2 - * @param int $p_int_index Index representing the Arrow. If empty all Arrows are specified. + * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. */ - public static function get_arrow( $p_int_index = -1 ) { - // Define all possible arrows. - $l_arr_arrows = array( '↑', '↥', '↟', '↩', '↲', '↵', '⇑', '⇡', '⇧', '↑' ); - // Convert index to an integer. - if ( ! is_int( $p_int_index ) ) { - $p_int_index = intval( $p_int_index ); + public static function getArrow($p_int_Index = -1) { + // define all possible arrows + $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); + // convert index to an integer + if (!is_int($p_int_Index)) { + $p_int_Index = intval($p_int_Index); } - // Return the whole arrow array. - if ( $p_int_index < 0 || $p_int_index > count( $l_arr_arrows ) ) { - return $l_arr_arrows; + // return the whole arrow array + if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { + return $l_arr_Arrows; } - // Return a single arrow. - return $l_arr_arrows[ $p_int_index ]; + // return a single arrow + return $l_arr_Arrows[$p_int_Index]; } - // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump - // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r /** * Displays a Variable. * + * @author Stefan Herndler * @since 1.5.0 - * @param mixed $p_mixed_value The variable to display. - * @return void + * @param mixed $p_mixed_Value */ - public static function debug( $p_mixed_value ) { - if ( empty( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + public static function debug($p_mixed_Value) { + if (empty($p_mixed_Value)) { + var_dump($p_mixed_Value); - } elseif ( is_array( $p_mixed_value ) ) { - printf( '
                                                                                                                                                                      ' );
                                                                                                                                                                      -			print_r( $p_mixed_value );
                                                                                                                                                                      -			printf( '
                                                                                                                                                                      ' ); + } else if (is_array($p_mixed_Value)) { + printf("
                                                                                                                                                                      ");
                                                                                                                                                                      +			print_r($p_mixed_Value);
                                                                                                                                                                      +			printf("
                                                                                                                                                                      "); - } elseif ( is_object( $p_mixed_value ) ) { - printf( '
                                                                                                                                                                      ' );
                                                                                                                                                                      -			print_r( $p_mixed_value );
                                                                                                                                                                      -			printf( '
                                                                                                                                                                      ' ); + } else if (is_object($p_mixed_Value)) { + printf("
                                                                                                                                                                      ");
                                                                                                                                                                      +			print_r($p_mixed_Value);
                                                                                                                                                                      +			printf("
                                                                                                                                                                      "); - } elseif ( is_numeric( $p_mixed_value ) || is_int( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { + var_dump($p_mixed_Value); - } elseif ( is_date( $p_mixed_value ) ) { - var_dump( $p_mixed_value ); + } else if (is_date($p_mixed_Value)) { + var_dump($p_mixed_Value); } else { - var_dump( $p_mixed_value ); + var_dump($p_mixed_Value); } - echo '
                                                                                                                                                                      '; + echo "
                                                                                                                                                                      "; } - // phpcs:disable } diff --git a/class/dashboard/init.php b/class/dashboard/init.php new file mode 100644 index 0000000..b18e77c --- /dev/null +++ b/class/dashboard/init.php @@ -0,0 +1,212 @@ +a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; + } + } + ksort($this->a_arr_SubPageClasses); + + // register hooks/actions + add_action('admin_init', array($this, 'initializeSettings')); + add_action('admin_menu', array($this, 'registerMainMenu')); + // register AJAX callbacks for Plugin information + add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); + } + + /** + * Initializes all sub pages and registers the settings. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function initializeSettings() { + MCI_Footnotes_Settings::instance()->RegisterSettings(); + // iterate though each sub class of the layout engine and register their sections + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSections(); + } + } + + /** + * Registers the new main menu for the WordPress dashboard. + * Registers all sub menu pages for the new main menu. + * + * @author Stefan Herndler + * @since 1.5.0 + * @see http://codex.wordpress.org/Function_Reference/add_menu_page + */ + public function registerMainMenu() { + global $menu; + // iterate through each main menu + foreach($menu as $l_arr_MainMenu) { + // iterate through each main menu attribute + foreach($l_arr_MainMenu as $l_str_Attribute) { + // main menu already added, append sub pages and stop + if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { + $this->registerSubPages(); + return; + } + } + } + + // add a new main menu page to the WordPress dashboard + add_menu_page( + self::C_STR_MAIN_MENU_TITLE, // page title + self::C_STR_MAIN_MENU_TITLE, // menu title + 'manage_options', // capability + self::C_STR_MAIN_MENU_SLUG, // menu slug + array($this, "displayOtherPlugins"), // function + plugins_url('footnotes/img/main-menu.png'), // icon url + null // position + ); + $this->registerSubPages(); + } + + /** + * Registers all SubPages for this Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function registerSubPages() { + // first registered sub menu page MUST NOT contain a unique slug suffix + // iterate though each sub class of the layout engine and register their sub page + /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ + foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { + $l_obj_LayoutEngineSubClass->registerSubPage(); + } + } + + /** + * Displays other Plugins from the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayOtherPlugins() { + printf("

                                                                                                                                                                      "); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); + echo $l_obj_Template->getContent(); + + printf('visit Mark Cheret'); + printf("

                                                                                                                                                                      "); + + printf(''); + } + + /** + * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function getPluginMetaInformation() { + // get plugin internal name from POST data + $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; + if (empty($l_str_PluginName)) { + echo json_encode(array("error" => "Plugin name invalid.")); + exit; + } + $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; + // call URL and collect data + $l_arr_Response = wp_remote_get($l_str_Url); + // check if response is valid + if (is_wp_error($l_arr_Response)) { + echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); + exit; + } + if (!array_key_exists("body", $l_arr_Response)) { + echo json_encode(array("error" => "Error reading WordPress API response message.")); + exit; + } + // get the body of the response + $l_str_Response = $l_arr_Response["body"]; + // get plugin object + $l_arr_Plugin = json_decode($l_str_Response, true); + if (empty($l_arr_Plugin)) { + echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                                                                                                      URL: " . $l_str_Url . "
                                                                                                                                                                      Response: " . $l_str_Response)); + exit; + } + + $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; + $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; + $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); + + // return Plugin information as JSON encoded string + echo json_encode( + array( + "error" => "", + "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", + "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", + "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", + "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", + "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", + "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", + "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", + "PluginRating" => $l_int_NumRatings, + "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", + "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" + ) + ); + exit; + } +} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php new file mode 100644 index 0000000..d16ad8b --- /dev/null +++ b/class/dashboard/layout.php @@ -0,0 +1,552 @@ + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); + } + + /** + * Returns an array describing a meta box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SectionID Parent Section ID. + * @param string $p_str_ID Unique ID suffix. + * @param string $p_str_Title Title for the meta box. + * @param string $p_str_CallbackFunctionName Class method name for callback. + * @return array meta box description to be able to append a meta box to the output. + */ + protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { + return array( + "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, + "id" => $p_str_ID, + "title" => $p_str_Title, + "callback" => $p_str_CallbackFunctionName + ); + } + + /** + * Registers a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSubPage() { + global $submenu; + // any sub menu for our main menu exists + if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { + // iterate through all sub menu entries of the ManFisher main menu + foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { + if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { + // remove that sub menu and add it again to move it to the bottom + remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); + } + } + } + + $this->a_str_SubPageHook = add_submenu_page( + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug + $this->getSubPageTitle(), // page title + $this->getSubPageTitle(), // menu title + 'manage_options', // capability + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug + array($this, 'displayContent') // function + ); + } + + /** + * Registers all sections for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function registerSections() { + // iterate through each section + foreach($this->getSections() as $l_arr_Section) { + // append tab to the tab-array + $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; + add_settings_section( + $l_arr_Section["id"], // unique id + "", //$l_arr_Section["title"], // title + array($this, 'Description'), // callback function for the description + $l_arr_Section["id"] // parent sub page slug + ); + $this->registerMetaBoxes($l_arr_Section["id"]); + } + } + + /** + * Registers all Meta boxes for a sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_ParentID Parent section unique id. + */ + private function registerMetaBoxes($p_str_ParentID) { + // iterate through each meta box + foreach($this->getMetaBoxes() as $l_arr_MetaBox) { + if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { + continue; + } + add_meta_box( + $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id + $l_arr_MetaBox["title"], // meta box title + array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content + $p_str_ParentID, // post type = parent section id + 'main' // context + ); + } + } + + /** + * Append javascript and css files for specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + private function appendScripts() { + // enable meta boxes layout and close functionality + wp_enqueue_script('postbox'); + // add WordPress color picker layout + wp_enqueue_style('wp-color-picker'); + // add WordPress color picker function + wp_enqueue_script('wp-color-picker'); + + + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * automated update of version number for cache busting. + * No need to use '-styles' in the handle, as '-css' is appended automatically. + */ + if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style('mci-footnotes-admin'); + } + + /** + * Displays the content of specific sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function displayContent() { + // register and enqueue scripts and styling + $this->appendScripts(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + // store settings + $l_bool_SettingsUpdated = false; + if (array_key_exists("save-settings", $_POST)) { + if ($_POST["save-settings"] == "save") { + unset($_POST["save-settings"]); + unset($_POST["submit"]); + $l_bool_SettingsUpdated = $this->saveSettings(); + } + } + + // display all sections and highlight the active section + echo '
                                                                                                                                                                      '; + echo '
                                                                                                                                                                      '; + + if ($l_bool_SettingsUpdated) { + echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + } + + // form to submit the active section + echo '
                                                                                                                                                                      '; + //settings_fields($l_arr_ActiveSection["container"]); + echo ''; + // outputs the settings field of the active section + do_settings_sections($l_arr_ActiveSection["id"]); + do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); + + // add submit button to active section if defined + if ($l_arr_ActiveSection["submit"]) { + submit_button(); + } + // close the form to submit data + echo ''; + // close container for the settings page + echo '
                                                                                                                                                                      '; + // output special javascript for the expand/collapse function of the meta boxes + echo ''; + } + + /** + * Save all Plugin settings. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return bool + */ + private function saveSettings() { + $l_arr_newSettings = array(); + // get current section + reset($this->a_arr_Sections); + $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); + $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; + + // iterate through each value that has to be in the specific container + foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { + // setting is available in the POST array, use it + if (array_key_exists($l_str_Key, $_POST)) { + $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; + } else { + // setting is not defined in the POST array, define it to avoid the Default value + $l_arr_newSettings[$l_str_Key] = ""; + } + } + // update settings + return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); + } + + /** + * Output the Description of a section. May be overwritten in any section. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Description() { + // default no description will be displayed + } + + /** + * Loads specific setting and returns an array with the keys [id, name, value]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingKeyName Settings Array key name. + * @return array Contains Settings ID, Settings Name and Settings Value. + */ + protected function LoadSetting($p_str_SettingKeyName) { + // get current section + reset($this->a_arr_Sections); + $p_arr_Return = array(); + $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); + $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); + return $p_arr_Return; + } + + /** + * Returns a line break to start a new line. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addNewline() { + return '
                                                                                                                                                                      '; + } + + /** + * Returns a line break to have a space between two lines. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return string + */ + protected function addLineSpace() { + return '

                                                                                                                                                                      '; + } + + /** + * Returns a simple text inside html text. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_Text Message to be surrounded with simple html tag (span). + * @return string + */ + protected function addText($p_str_Text) { + return sprintf('%s', $p_str_Text); + } + + /** + * Returns the html tag for an input/select label. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. + * @param string $p_str_Caption Label caption. + * @return string + * + * Edited 2020-12-01T0159+0100.. + * @since 2.1.6 no colon + */ + protected function addLabel($p_str_SettingName, $p_str_Caption) { + if (empty($p_str_Caption)) { + return ""; + } + // remove the colon causing localization issues with French, + // and with languages not using punctuation at all, + // and with languages using other punctuation marks instead of colon, + // e.g. Greek using a raised dot. + // In French, colon is preceded by a space, forcibly non-breaking, + // and narrow per new school. + // Add colon to label strings for inclusion in localization. + // Colon after label is widely preferred best practice, mandatory per style guides. + // + return sprintf('', $p_str_SettingName, $p_str_Caption); + // ^ here deleted colon 2020-12-08T1546+0100 + } + + /** + * Returns the html tag for an input [type = text]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. + * @param bool $p_bool_Readonly Set the input to be read only, default false. + * @param bool $p_bool_Hidden Set the input to be hidden, default false. + * @return string + */ + protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { + $l_str_Style = ""; + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + if ($p_bool_Hidden) { + $l_str_Style .= 'display:none;'; + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, + $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); + } + + /** + * Returns the html tag for an input [type = checkbox]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addCheckbox($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], + MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); + } + + /** + * Returns the html tag for a select box. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre select the current value. + * @param array $p_arr_Options Possible options to be selected. + * @return string + */ + protected function addSelectBox($p_str_SettingName, $p_arr_Options) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + $l_str_Options = ""; + + /* loop through all array keys */ + foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { + $l_str_Options .= sprintf('', + $l_str_Value, + $l_arr_Data["value"] == $l_str_Value ? "selected" : "", + $l_str_Caption); + } + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); + } + + /** + * Returns the html tag for a text area. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. + * @return string + */ + protected function addTextArea($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = text] with color selection class. + * + * @author Stefan Herndler + * @since 1.5.6 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @return string + */ + protected function addColorSelection($p_str_SettingName) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); + } + + /** + * Returns the html tag for an input [type = num]. + * + * @author Stefan Herndler + * @since 1.5.0 + * @param string $p_str_SettingName Name of the Settings key to pre load the input field. + * @param int $p_in_Min Minimum value. + * @param int $p_int_Max Maximum value. + * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) + * @return string + * + * Edited: + * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + */ + protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { + // collect data for given settings field + $l_arr_Data = $this->LoadSetting($p_str_SettingName); + + if ($p_bool_Deci) { + $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); + } else { + return sprintf('', + $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); + } + } + +} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php new file mode 100644 index 0000000..33f327a --- /dev/null +++ b/class/dashboard/subpage-diagnostics.php @@ -0,0 +1,140 @@ +addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) + ); + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + */ + protected function getMetaBoxes() { + return array( + $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") + ); + } + + /** + * Displays a diagnostics about the web server, php and WordPress. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Diagnostics() { + global $wp_version; + $l_str_PhpExtensions = ""; + // iterate through each PHP extension + foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { + if ($l_int_Index > 0) { + $l_str_PhpExtensions .= ' | '; + } + $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); + } + + /** @var WP_Theme $l_obj_CurrentTheme */ + $l_obj_CurrentTheme = wp_get_theme(); + + $l_str_WordPressPlugins = ""; + // iterate through each installed WordPress Plugin + foreach (get_plugins() as $l_arr_Plugin) { + $l_str_WordPressPlugins .= '
                                                                                                                                                                      '; + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= ''; + $l_str_WordPressPlugins .= ''; + } + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "diagnostics"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-server" => __("Server name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "server" => $_SERVER["SERVER_NAME"], + + "label-php" => __("PHP version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php" => phpversion(), + + "label-user-agent" => __("User agent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "user-agent" => $_SERVER["HTTP_USER_AGENT"], + + "label-max-execution-time" => __("Max execution time", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "max-execution-time" => ini_get('max_execution_time') . ' ' . __('seconds', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-memory-limit" => __("Memory limit", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "memory-limit" => ini_get('memory_limit'), + + "label-php-extensions" => __("PHP extensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "php-extensions" => $l_str_PhpExtensions, + + "label-wordpress" => __("WordPress version", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "wordpress" => $wp_version, + + "label-theme" => __("Active Theme", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "theme" => $l_obj_CurrentTheme->get("Name") . " " . $l_obj_CurrentTheme->get("Version") . ", " . $l_obj_CurrentTheme->get("Author"). " [" . $l_obj_CurrentTheme->get("AuthorURI") . "]", + + "plugins" => $l_str_WordPressPlugins + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} \ No newline at end of file diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php new file mode 100644 index 0000000..940a22b --- /dev/null +++ b/class/dashboard/subpage-main.php @@ -0,0 +1,1182 @@ +addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true); + + // sync tab name with mirror in public function CustomCSSMigration(): + $l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true); + + $l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true); + $l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true); + $l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false); + + return $l_arr_Tabs; + } + + /** + * Returns an array of all registered meta boxes for each section of the sub page. + * + * @author Stefan Herndler + * @since 1.5.0 + * @return array + * + * Edited for 2.0.0 and later. + * + * HyperlinkArrow meta box: + * @since 2.0.0 discontinued + * @since 2.0.4 restored to meet user demand for arrow symbol semantics + * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol + * + * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 + * spans need position:fixed and become unlocalizable + * fix: logo is kept only in the label that doesn’t need to be translated: + * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 + * @see details in class/config.php + * + * @since 2.1.6 / 2.2.0 tabs reordered and renamed + */ + protected function getMetaBoxes() { + $l_arr_MetaBoxes = array(); + + // sync box name with mirror in task.php: + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); + $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-dimensions", __("Tooltip dimensions", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDimensions"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-text", __("Tooltip text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxText"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"); + } + + $l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE))) { + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration"); + } + $l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew"); + + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"); + $l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate"); + + return $l_arr_MetaBoxes; + } + + /** + * Displays all settings for the reference container. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Completed: + * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + */ + public function ReferenceContainer() { + + // options for the label element: + $l_arr_LabelElement = array( + "p" => __("paragraph", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h2" => __("heading 2", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h3" => __("heading 3", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h4" => __("heading 4", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h5" => __("heading 5", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "h6" => __("heading 6", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the positioning of the reference container + $l_arr_Positions = array( + "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), + "footer" => __("in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // basic responsive page layout options: + $l_arr_PageLayoutOptions = array( + "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the separating punctuation between backlinks: + $l_arr_Separators = array( + // Unicode character names are conventionally uppercase. + "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the terminating punctuation after backlinks: + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because + // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. + $l_arr_Terminators = array( + "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): + "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the first column width (per cent is a ratio, not a unit): + $l_arr_WidthUnits = array( + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for reference container script mode: + $l_arr_ScriptMode = array( + "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("Heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), + + "label-element" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __("Heading’s HTML element:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "element" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_LabelElement), + + "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + + "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), + + "label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode), + "notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), + "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ''), + + "label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE), + "notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-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), + + "label-margin-top" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __("Top margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-top" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500), + "notice-margin-top" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-margin-bottom" => $this->addLabel(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __("Bottom margin:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "margin-bottom" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500), + "notice-margin-bottom" => __("pixels; may be negative", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions), + "notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled), + "notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), + "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), + + "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), + "notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled), + "separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators), + "separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM), + "notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled), + "terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators), + "terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM), + "notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled), + "width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true), + "width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled), + "max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true), + "max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits), + "notice-max-width" => __("Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled), + "notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled), + "notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all options for the footnotes start and end tag short codes + * Displays all options for the footnotes numbering + * Displays all options for the scrolling behavior + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1412+0100 + * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ + * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 + * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra + * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + */ + public function StartEnd() { + // footnotes start tag short code options: + $l_arr_ShortCodeStart = array( + "((" => "((", + "(((" => "(((", + "{{" => "{{", + "{{{" => "{{{", + "[n]" => "[n]", + "[fn]" => "[fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[ref]" => "[ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // footnotes end tag short code options: + $l_arr_ShortCodeEnd = array( + "))" => "))", + ")))" => ")))", + "}}" => "}}", + "}}}" => "}}}", + "[/n]" => "[/n]", + "[/fn]" => "[/fn]", + htmlspecialchars("") => htmlspecialchars(""), + "[/ref]" => "[/ref]", + htmlspecialchars("") => htmlspecialchars(""), + // Custom (user-defined) start and end tags bracketing the footnote text inline: + "userdefined" => __("custom short code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the syntax validation: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), + "short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED), + + "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("Footnote end tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), + "short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), + + // for script showing/hiding user defined text boxes: + "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, + "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, + "short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, + "short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, + + "description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // option to enable syntax validation, label mirrored in task.php: + "label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable), + "notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-syntax" => __("If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Numbering() { + // define some space for the output + $l_str_Space = "     "; + // options for the combination of identical footnotes + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the numbering style of the footnotes: + $l_arr_CounterStyle = array( + "arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …", + "arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …", + "latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …", + "latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …", + "romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …", + "roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …", + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle), + + // algorithmically combine identicals: + "label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable), + "notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Support for Ibid. notation added thanks to @meglio in . + "description-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function Scrolling() { + + // options for enabling hard links for AMP compat: + $l_arr_Enable = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100), + "notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000), + "notice-scroll-duration" => __("milliseconds; instantly if hard links are enabled and JavaScript is disabled", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable hard links for AMP compat: + "label-hard-links" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, __("Enable hard links:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "hard-links" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_Enable), + "notice-hard-links" => __("Hard links are indispensable for AMP compatibility and allow to link to footnotes.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-footnote" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "footnote" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG), + "notice-footnote" => __("This will show up in the address bar after clicking on a hard-linked footnote referrer.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-referrer" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __("Fragment identifier slug for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "referrer" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG), + "notice-referrer" => __("This will show up in the address bar after clicking on a hard-linked backlink.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __("ID separator:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR), + "notice-separator" => __("May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // enable backlink tooltips: + "label-backlink-tooltips" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __("Enable backlink tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltips" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_Enable), + "notice-backlink-tooltips" => __("Hard backlinks get ordinary tooltips hinting to use the backbutton instead.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-backlink-tooltip-text" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __("Backlink tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "backlink-tooltip-text" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT), + "notice-backlink-tooltip-text" => __("Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for 'I love Footnotes'. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 + * @since 2.2.0 more options 2020-12-11T0432+0100 + */ + public function Love() { + // options for the acknowledgment display in the footer: + $l_arr_Love = array( + // logo only: + "text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // logo followed by heart symbol: + "text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // logo preceded by heart symbol: + "text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol. + "text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL), + // "This website uses Footnotes." + "text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the Footnotes plugin." + "text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + // "This website uses the awesome Footnotes plugin." + "text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME), + "random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // "No display of any “Footnotes love” mention in the footer" + "no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-love"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love), + + "label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)), + "no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the excerpt setting + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1453+0100 + * @since 2.1.1 more settings and notices, thanks to @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 + * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + */ + public function Excerpts() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled), + "notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts. + "description-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 'Advanced Excerpt'), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnote referrers + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading 2020-12-12T1513+0100 + * @since 2.1.1 option for superscript (optionally baseline referrers) + * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + */ + public function Superscript() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for superscript normalize scope: + $l_arr_NormalizeSuperscript = array( + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled), + + "label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + + "label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + + "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), + "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the footnotes mouse-over box. + * + * @author Stefan Herndler + * @since 1.5.2 + * + * Edited: + * @since 2.2.0 5 parts to address increased settings number + * @since 2.2.5 position settings for alternative tooltips + */ + public function MouseOverBox() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), + "notice-enable" => __("Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), + "notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the name of the plugin as logogram “footnotes”. + "description-alternative" => sprintf(__("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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxPosition() { + + // options for the Mouse-over box position + $l_arr_Position = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top center" => __("top center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center right" => __("center right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + // options for the alternative Mouse-over box position + $l_arr_AlternativePosition = array( + "top left" => __("top left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "top right" => __("top right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-position"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), + "position-alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_AlternativePosition), + "notice-position" => __("The second column of settings boxes is for the alternative tooltips.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-x" => $this->addLabel (MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "offset-x-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500), + "notice-offset-x" => __("pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Vertical offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "offset-y-alternative" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500), + "notice-offset-y" => __("pixels; negative value for an upwards offset; alternative tooltips: direction depends on position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxDimensions() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-dimensions"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Maximum width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280), + "width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280), + "notice-max-width" => __("pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTiming() { + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-timing"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000), + "notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000), + "notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000), + "notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000), + "notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxTruncation() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-truncation"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), + + "label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000), + // The feature trims back until the last full word. + "notice-max-length" => __("No weird cuts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxText() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-text"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-delimiter" => __("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.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), + "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-mirror" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __("Mirror the tooltip in the reference container:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "mirror" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_Enabled), + "notice-mirror" => __("Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR), + "notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function MouseOverBoxAppearance() { + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + // options for the font size unit: + $l_arr_FontSizeUnits = array( + "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance"); + // replace all placeholders + $l_obj_Template->replace( + array( + + "label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled), + "font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true), + "font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits), + "notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), + // To use default: Clear or leave empty. + "notice-color" => sprintf(__("To use the current theme’s default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND), + // To use default: Clear or leave empty. + "notice-background" => sprintf(__("To use the current theme’s default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true), + "notice-border-width" => __("pixels; 0 for borderless", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR), + // To use default: Clear or leave empty. + "notice-border-color" => sprintf(__("To use the current theme’s default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500), + "notice-border-radius" => __("pixels; 0 for sharp corners", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), + // To use default: Clear or leave empty. + "notice-box-shadow-color" => sprintf(__("To use the current theme’s default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all settings for the prepended symbol + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited heading for v2.0.4 + * + * The former 'hyperlink arrow', incompatible with combined identical footnotes, + * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics + * of the footnote number. + * + * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol + * @since 2.2.1 and 2.2.4 back here + */ + public function HyperlinkArrow() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select or input the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), + "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), + "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays the custom css box. + * + * @author Stefan Herndler + * @since 1.5.0 + * + * Edited: + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * list directly in the template, as CSS is in English anyway + * @see templates/dashboard/customize-css.html + * 2020-12-09T1113+0100 + * + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report + */ + public function CustomCSS() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + // CSS classes are listed in the template. + // Localized notices are dropped to ease translators’ task. + + // "label-class-1" => ".footnote_plugin_tooltip_text", + // "class-1" => $this->addText(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-2" => ".footnote_tooltip", + // "class-2" => $this->addText(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-3" => ".footnote_plugin_index", + // "class-3" => $this->addText(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + // "label-class-4" => ".footnote_plugin_text", + // "class-4" => $this->addText(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSMigration() { + + // options for Yes/No select box: + $l_arr_Enabled = array( + "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ); + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS), + "description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-show-legacy" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, "Show legacy Custom CSS settings containers:"), + "show-legacy" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_Enabled), + "notice-show-legacy" => __("Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // The placeholder is the “Referrers and tooltips” settings tab name. + "description-show-legacy" => sprintf(__('The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + public function CustomCSSNew() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new"); + // replace all placeholders + $l_obj_Template->replace( + array( + "css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW), + + "headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays available Hooks to look for Footnote short codes. + * + * @author Stefan Herndler + * @since 1.5.5 + * + * Edited: + * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 + * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * + * priority level was initially hard-coded default + * shows "9223372036854775807" in the numbox + * empty should be interpreted as PHP_INT_MAX, + * but a numbox cannot be set to empty: + * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + */ + public function LookupHooks() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup"); + + // replace all placeholders + $l_obj_Template->replace( + array( + + "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), + "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), + "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"), + "the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE), + "priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/", + + "label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"), + "the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT), + "priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/", + + "label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"), + "the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT), + "priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/", + + "label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"), + "widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE), + "priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title", + + "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), + "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), + "priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX), + "url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays a short introduction of the Plugin. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Help() { + global $g_obj_MCI_Footnotes; + // load footnotes starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + + if ($l_arr_Footnote_StartingTag["value"] == "userdefined" || $l_arr_Footnote_EndingTag["value"] == "userdefined") { + // load user defined starting and end tag + $l_arr_Footnote_StartingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_arr_Footnote_EndingTag = $this->LoadSetting(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); + } + $l_str_Example = "Hello" . $l_arr_Footnote_StartingTag["value"] . + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,". + " sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.". + " Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,". + " consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.". + " At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + . $l_arr_Footnote_EndingTag["value"] . " World!"; + + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-help"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-start" => __("Start your footnote with the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "start" => $l_arr_Footnote_StartingTag["value"], + + "label-end" => __("…and end your footnote with this short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "end" => $l_arr_Footnote_EndingTag["value"], + + "example-code" => $l_str_Example, + "example-string" => "
                                                                                                                                                                      " . __("will be displayed as:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "example" => $g_obj_MCI_Footnotes->a_obj_Task->exec($l_str_Example, true), + + "information" => sprintf(__("For further information please check out our %ssupport forum%s on WordPress.org.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', '') + ) + ); + // call wp_head function to get the Styling of the mouse-over box + $g_obj_MCI_Footnotes->a_obj_Task->wp_head(); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } + + /** + * Displays all Donate button to support the developers. + * + * @author Stefan Herndler + * @since 1.5.0 + */ + public function Donate() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "how-to-donate"); + // replace all placeholders + $l_obj_Template->replace( + array( + "caption" => __('Donate now',MCI_Footnotes_Config::C_STR_PLUGIN_NAME) + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } +} diff --git a/class/hooks.php b/class/hooks.php index 617a658..e86d106 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,18 +1,19 @@ -ClearAll(); } /** * Add Links to the Plugin in the "installed Plugins" page. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_links Current Links. - * @param string $p_str_plugin_file_name Plugins init file name. + * @param array $p_arr_Links Current Links. + * @param string $p_str_PluginFileName Plugins init file name. * @return array */ - public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { - // Append link to the WordPress Plugin page. - $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); - // Append link to the settings page. - $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); - // Append link to the PayPal donate function. - $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); - // Return new links. - return $p_arr_links; + public static function PluginLinks($p_arr_Links, $p_str_PluginFileName) { + // append link to the WordPress Plugin page + $p_arr_Links[] = sprintf('%s', __('Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the Settings page + $p_arr_Links[] = sprintf('%s', admin_url('admin.php?page=mfmmf-footnotes'), __('Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // append link to the PlayPal Donate function + $p_arr_Links[] = sprintf('%s', __('Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); + // return new links + return $p_arr_Links; } } diff --git a/class/init.php b/class/init.php index 812bd13..e1001a3 100644 --- a/class/init.php +++ b/class/init.php @@ -1,11 +1,13 @@ -initialize_dashboard(); - // Initialize the Plugin Task. - $this->initialize_task(); + // initialize the Plugin Dashboard + $this->initializeDashboard(); + // initialize the Plugin Task + $this->initializeTask(); - // Register all Public Stylesheets and Scripts. - add_action( 'init', array( $this, 'register_public' ) ); - // Enqueue all Public Stylesheets and Scripts. - add_action( 'wp_enqueue_scripts', array( $this, 'register_public' ) ); - // Register all Widgets of the Plugin.. - add_action( 'widgets_init', array( $this, 'initialize_widgets' ) ); + // Register all Public Stylesheets and Scripts + add_action('init', array($this, 'registerPublic')); + // Enqueue all Public Stylesheets and Scripts + add_action('wp_enqueue_scripts', array($this, 'registerPublic')); + // Register all Widgets of the Plugin. + add_action('widgets_init', array($this, 'initializeWidgets')); } /** * Initializes all Widgets of the Plugin. * + * @author Stefan Herndler * @since 1.5.0 * + * * - Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution * * @since 1.6.5 @@ -124,34 +129,37 @@ class MCI_Footnotes { * and use the bare register_widget() here. * @see self::run() * - * Also, the visibility of initialize_widgets() is not private any longer. + * Also, the visibility of initializeWidgets() is not private any longer. */ - public function initialize_widgets() { - register_widget( 'MCI_Footnotes_Widget_Reference_container' ); + public function initializeWidgets() { + register_widget( "MCI_Footnotes_Widget_ReferenceContainer" ); } /** * Initializes the Dashboard of the Plugin and loads them. * + * @author Stefan Herndler * @since 1.5.0 */ - private function initialize_dashboard() { + private function initializeDashboard() { new MCI_Footnotes_Layout_Init(); } /** * Initializes the Plugin Task and registers the Task hooks. * + * @author Stefan Herndler * @since 1.5.0 */ - private function initialize_task() { - $this->a_obj_task = new MCI_Footnotes_Task(); - $this->a_obj_task->register_hooks(); + private function initializeTask() { + $this->a_obj_Task = new MCI_Footnotes_Task(); + $this->a_obj_Task->registerHooks(); } /** * Registers and enqueues scripts and stylesheets to the public pages. * + * @author Stefan Herndler * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. @@ -160,7 +168,7 @@ class MCI_Footnotes { * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ - public function register_public() { + public function registerPublic() { /** * Enqueues external scripts. @@ -173,10 +181,10 @@ class MCI_Footnotes { * * The condition about tooltips was missing, only the not-alternative-tooltips part was present. */ - // Set conditions re-used for stylesheet enqueuing. - self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); - $l_str_script_mode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE ); + // set conditions re-used for stylesheet enqueuing: + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); /** * Enqueues the jQuery library registered by WordPress. @@ -187,79 +195,68 @@ class MCI_Footnotes { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * jQuery is also used for animated scrolling, so it was loaded by default. * The function wp_enqueue_script() avoids loading the same library multiple times. * After adding the alternative reference container, jQuery has become optional, * but still enabled by default. */ - if ( 'jquery' === $l_str_script_mode || ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) ) { - + if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) { + wp_enqueue_script( 'jquery' ); - + } - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { /** * Enqueues the jQuery Tools library shipped with the plugin. * - * Redacted jQuery.browser, completed minification; - * see full header in js/jquery.tools.js. - * - * Add versioning. - * - * @since 2.1.2 - * @date 2020-11-18T2150+0100 - * - * No '-js' in the handle, is appended automatically. - * - * Deferring to the footer breaks jQuery tooltip display. - * @date 2021-02-23T1105+0100 + * redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js + * 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' ), + plugins_url('footnotes/js/jquery.tools.min.js'), array(), - '1.2.7.redacted.2', - false + '1.2.7.redacted.2' ); + /** + * Registers jQuery UI from the JavaScript Content Delivery Network. + * + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: + * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + * Used to add jQuery UI following @vonpiernik: + * : + * + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. + * + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: + * + * See + * + * This was enabled in Footnotes v2.0.0 through v2.0.3. + * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + */ + //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 + //wp_enqueue_script( 'jQueryUI' ); + /** + * This is then needed instead of the above first instance: + * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + */ + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + /** * Enqueues some jQuery UI libraries registered by WordPress. * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * - * @reporter @rajinderverma - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/ - * - * @reporter @ericcorbett2 - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13324142 - * - * @reporter @honlapdavid - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13355421 - * - * @reporter @mmallett - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13445437 - * - * Fetch jQuery UI from cdnjs.cloudflare.com. - * @since 2.0.0 - * @date 2020-10-26T1907+0100 - * @contributor @vonpiernik - * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 - * - * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. - * - * @since 2.0.4 - * @date 2020-11-01T1902+0100 - * @reporter @check2020de - * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ - * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui - * + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 * If alternative tooltips are enabled, these libraries are not needed. */ wp_enqueue_script( 'jquery-ui-core' ); @@ -311,43 +308,34 @@ class MCI_Footnotes { * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. */ - // Set tooltip mode for use in stylesheet name. - if ( self::$a_bool_tooltips_enabled ) { - if ( self::$a_bool_alternative_tooltips_enabled ) { - $l_str_tooltip_mode_short = 'al'; - $l_str_tooltip_mode_rest = 'ternative-tooltips'; + // set tooltip mode for use in stylesheet name: + if ( self::$a_bool_TooltipsEnabled ) { + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + $l_str_TooltipMode = 'al'; + $l_str_TComplement = 'ternative-tooltips'; } else { - $l_str_tooltip_mode_short = 'jq'; - $l_str_tooltip_mode_rest = 'uery-tooltips'; + $l_str_TooltipMode = 'jq'; + $l_str_TComplement = 'uery-tooltips'; } } else { - $l_str_tooltip_mode_short = 'no'; - $l_str_tooltip_mode_rest = '-tooltips'; + $l_str_TooltipMode = 'no'; + $l_str_TComplement = '-tooltips'; } - // Set basic responsive page layout mode for use in stylesheet name. - $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); - switch ( $l_str_page_layout_option ) { - case 'reference-container': - $l_str_layout_mode = '1'; - break; - case 'entry-content': - $l_str_layout_mode = '2'; - break; - case 'main-content': - $l_str_layout_mode = '3'; - break; - case 'none': - default: - $l_str_layout_mode = '0'; - break; + // set basic responsive page layout mode for use in stylesheet name: + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + switch ( $l_str_PageLayoutOption ) { + case "reference-container": $l_str_LayoutMode = '1'; break; + case "entry-content" : $l_str_LayoutMode = '2'; break; + case "main-content" : $l_str_LayoutMode = '3'; break; + case "none": default: $l_str_LayoutMode = '0'; break; } - // Enqueue the tailored united minified stylesheet. + // enqueue the tailored united minified stylesheet: wp_enqueue_style( - 'mci-footnotes-' . $l_str_tooltip_mode_short . $l_str_tooltip_mode_rest . '-pagelayout-' . $l_str_page_layout_option, + 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, @@ -368,12 +356,12 @@ class MCI_Footnotes { wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); - $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); - if ( 'none' !== $l_str_page_layout_option ) { + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + if ($l_str_PageLayoutOption != 'none') { wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_page_layout_option, + 'mci-footnotes-layout-' . $l_str_PageLayoutOption, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' ), array(), C_STR_FOOTNOTES_VERSION, diff --git a/class/language.php b/class/language.php index fd86a8c..fccf143 100644 --- a/class/language.php +++ b/class/language.php @@ -1,11 +1,13 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_id, - 'title' => $p_str_title, - 'submit' => $p_bool_has_submit_button, - 'container' => $p_int_settings_container_index, - ); - } - - /** - * Returns an array describing a meta box. - * - * @since 1.5.0 - * @param string $p_str_section_id Parent Section ID. - * @param string $p_str_id Unique ID suffix. - * @param string $p_str_title Title for the meta box. - * @param string $p_str_callback_function_name Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function add_meta_box( $p_str_section_id, $p_str_id, $p_str_title, $p_str_callback_function_name ) { - return array( - 'parent' => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '-' . $p_str_section_id, - 'id' => $p_str_id, - 'title' => $p_str_title, - 'callback' => $p_str_callback_function_name, - ); - } - - /** - * Registers a sub page. - * - * @since 1.5.0 - */ - public function register_sub_page() { - global $submenu; - - if ( array_key_exists( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ), $submenu ) ) { - foreach ( $submenu[ plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG ) ] as $l_arr_sub_menu ) { - if ( plugin_basename( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ) === $l_arr_sub_menu[2] ) { - remove_submenu_page( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ); - } - } - } - - $this->a_str_sub_page_hook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, - $this->get_sub_page_title(), - $this->get_sub_page_title(), - 'manage_options', - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), - array( $this, 'display_content' ) - ); - } - - /** - * Registers all sections for a sub page. - * - * @since 1.5.0 - */ - public function register_sections() { - foreach ( $this->get_sections() as $l_arr_section ) { - // Append tab to the tab-array. - $this->a_arr_sections[ $l_arr_section['id'] ] = $l_arr_section; - add_settings_section( - $l_arr_section['id'], - '', - array( $this, 'Description' ), - $l_arr_section['id'] - ); - $this->register_meta_boxes( $l_arr_section['id'] ); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @since 1.5.0 - * @param string $p_str_parent_id Parent section unique id. - */ - private function register_meta_boxes( $p_str_parent_id ) { - // Iterate through each meta box. - foreach ( $this->get_meta_boxes() as $l_arr_meta_box ) { - if ( $p_str_parent_id !== $l_arr_meta_box['parent'] ) { - continue; - } - add_meta_box( - $p_str_parent_id . '-' . $l_arr_meta_box['id'], - $l_arr_meta_box['title'], - array( $this, $l_arr_meta_box['callback'] ), - $p_str_parent_id, - 'main' - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @since 1.5.0 - */ - private function append_scripts() { - wp_enqueue_script( 'postbox' ); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker' ); - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style( 'mci-footnotes-admin' ); - } - - // phpcs:disable WordPress.Security.NonceVerification.Recommended - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * Displays the content of specific sub page. - * - * @since 1.5.0 - */ - public function display_content() { - $this->append_scripts(); - - // TODO: add nonce verification. - - // Get the current section. - reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); - $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; - - // Store settings. - $l_bool_settings_updated = false; - if ( array_key_exists( 'save-settings', $_POST ) ) { - if ( 'save' === $_POST['save-settings'] ) { - unset( $_POST['save-settings'] ); - unset( $_POST['submit'] ); - $l_bool_settings_updated = $this->save_settings(); - } - } - - // Display all sections and highlight the active section. - echo '
                                                                                                                                                                      '; - echo '
                                                                                                                                                                      '; - - if ( $l_bool_settings_updated ) { - echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); - } - - // Form to submit the active section. - echo '
                                                                                                                                                                      '; - echo ''; - // Outputs the settings field of the active section. - do_settings_sections( $l_arr_active_section['id'] ); - do_meta_boxes( $l_arr_active_section['id'], 'main', null ); - - // Add submit button to active section if defined. - if ( $l_arr_active_section['submit'] ) { - submit_button(); - } - echo ''; - echo '
                                                                                                                                                                      '; - - // Echo JavaScript for the expand/collapse function of the meta boxes. - echo ''; - } - // phpcs:enable - - // phpcs:disable WordPress.Security.NonceVerification.Recommended - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * Save all Plugin settings. - * - * @since 1.5.0 - * @return bool - */ - private function save_settings() { - $l_arr_new_settings = array(); - - // TODO: add nonce verification. - - // Get current section. - reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); - $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; - - foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { - if ( array_key_exists( $l_str_key, $_POST ) ) { - $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); - } else { - // Setting is not defined in the POST array, define it to avoid the Default value. - $l_arr_new_settings[ $l_str_key ] = ''; - } - } - // Update settings. - return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); - } - // phpcs:enable - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @since 1.5.0 - */ - public function description() { - // Default no description will be displayed. - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @since 1.5.0 - * @param string $p_str_setting_key_name Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function load_setting( $p_str_setting_key_name ) { - // Get current section. - reset( $this->a_arr_sections ); - $p_arr_return = array(); - $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); - $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); - $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); - return $p_arr_return; - } - - /** - * Returns a line break to start a new line. - * - * @since 1.5.0 - * @return string - */ - protected function add_newline() { - return '
                                                                                                                                                                      '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @since 1.5.0 - * @return string - */ - protected function add_line_space() { - return '

                                                                                                                                                                      '; - } - - /** - * Returns a simple text inside html text. - * - * @since 1.5.0 - * @param string $p_str_text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function add_text( $p_str_text ) { - return sprintf( '%s', $p_str_text ); - } - - /** - * Returns the html tag for an input/select label. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_caption Label caption. - * @return string - */ - protected function add_label( $p_str_setting_name, $p_str_caption ) { - if ( empty( $p_str_caption ) ) { - return ''; - } - - /* - * Remove the colon causing localization issues with French, and with - * languages not using punctuation at all, and with languages using other - * punctuation marks instead of colon, e.g. Greek using a raised dot. - * In French, colon is preceded by a space, forcibly non-breaking, and - * narrow per new school. - * Add colon to label strings for inclusion in localization. Colon after - * label is widely preferred best practice, mandatory per - * [style guides](https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui). - */ - return sprintf( '', $p_str_setting_name, $p_str_caption ); - } - - /** - * Returns the html tag for an input [type = text]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @param int $p_str_max_length Maximum length of the input, default 999 characters. - * @param bool $p_bool_readonly Set the input to be read only, default false. - * @param bool $p_bool_hidden Set the input to be hidden, default false. - * @return string - */ - protected function add_text_box( $p_str_setting_name, $p_str_max_length = 999, $p_bool_readonly = false, $p_bool_hidden = false ) { - $l_str_style = ''; - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - if ( $p_bool_hidden ) { - $l_str_style .= 'display:none;'; - } - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $p_str_max_length, - $l_str_style, - $l_arr_data['value'], - $p_bool_readonly ? 'readonly="readonly"' : '' - ); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @return string - */ - protected function add_checkbox( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - MCI_Footnotes_Convert::to_bool( $l_arr_data['value'] ) ? 'checked="checked"' : '' - ); - } - - /** - * Returns the html tag for a select box. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre select the current value. - * @param array $p_arr_options Possible options to be selected. - * @return string - */ - protected function add_select_box( $p_str_setting_name, $p_arr_options ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - $l_str_options = ''; - - foreach ( $p_arr_options as $l_str_value => $l_str_caption ) { - $l_str_options .= sprintf( - '', - $l_str_value, - $l_str_value === $l_arr_data['value'] ? 'selected' : '', - $l_str_caption - ); - } - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_str_options - ); - } - - /** - * Returns the html tag for a text area. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre fill the text area. - * @return string - */ - protected function add_textarea( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'] - ); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @since 1.5.6 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @return string - */ - protected function add_color_selection( $p_str_setting_name ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'] - ); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @since 1.5.0 - * @param string $p_str_setting_name Name of the Settings key to pre load the input field. - * @param int $p_in_min Minimum value. - * @param int $p_int_max Maximum value. - * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { - // Collect data for given settings field. - $l_arr_data = $this->load_setting( $p_str_setting_name ); - - if ( $p_bool_deci ) { - $l_str_value = number_format( floatval( $l_arr_data['value'] ), 1 ); - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_str_value, - $p_in_min, - $p_int_max - ); - } else { - return sprintf( - '', - $l_arr_data['name'], - $l_arr_data['id'], - $l_arr_data['value'], - $p_in_min, - $p_int_max - ); - } - } - -} diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php deleted file mode 100644 index 502f293..0000000 --- a/class/layout/diagnostics.php +++ /dev/null @@ -1,149 +0,0 @@ -add_section( 'diagnostics', __( 'Diagnostics', 'footnotes' ), null, false ), - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @since 1.5.0 - * @return array - */ - protected function get_meta_boxes() { - return array( - $this->add_meta_box( 'diagnostics', 'diagnostics', __( 'Displays information about the web server, PHP and WordPress', 'footnotes' ), 'Diagnostics' ), - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_php_extensions = ''; - // Iterate through each PHP extension. - foreach ( get_loaded_extensions() as $l_int_index => $l_str_extension ) { - if ( $l_int_index > 0 ) { - $l_str_php_extensions .= ' | '; - } - $l_str_php_extensions .= $l_str_extension . ' ' . phpversion( $l_str_extension ); - } - - $l_obj_current_theme = wp_get_theme(); - - $l_str_wordpress_plugins = ''; - // Iterate through each installed WordPress Plugin. - foreach ( get_plugins() as $l_arr_plugin ) { - $l_str_wordpress_plugins .= '
                                                                                                                                                                      '; - $l_str_wordpress_plugins .= ''; - // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found - $l_str_wordpress_plugins .= ''; - // phpcs:enable - $l_str_wordpress_plugins .= ''; - } - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'diagnostics' ); - - if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { - die; - } else { - $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); - } - if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { - die; - } else { - $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); - } - - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-server' => __( 'Server name', 'footnotes' ), - 'server' => $l_str_server_name, - - 'label-php' => __( 'PHP version', 'footnotes' ), - 'php' => phpversion(), - - 'label-user-agent' => __( 'User agent', 'footnotes' ), - 'user-agent' => $l_str_http_user_agent, - - 'label-max-execution-time' => __( 'Max execution time', 'footnotes' ), - 'max-execution-time' => ini_get( 'max_execution_time' ) . ' ' . __( 'seconds', 'footnotes' ), - - 'label-memory-limit' => __( 'Memory limit', 'footnotes' ), - 'memory-limit' => ini_get( 'memory_limit' ), - - 'label-php-extensions' => __( 'PHP extensions', 'footnotes' ), - 'php-extensions' => $l_str_php_extensions, - - 'label-wordpress' => __( 'WordPress version', 'footnotes' ), - 'wordpress' => $wp_version, - - 'label-theme' => __( 'Active Theme', 'footnotes' ), - 'theme' => $l_obj_current_theme->get( 'Name' ) . ' ' . $l_obj_current_theme->get( 'Version' ) . ', ' . $l_obj_current_theme->get( 'Author' ) . ' [' . $l_obj_current_theme->get( 'AuthorURI' ) . ']', - - 'plugins' => $l_str_wordpress_plugins, - ) - ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - // Display template with replaced placeholders. - echo $l_obj_template->get_content(); - // phpcs:enable - } -} diff --git a/class/layout/init.php b/class/layout/init.php deleted file mode 100644 index 72c347d..0000000 --- a/class/layout/init.php +++ /dev/null @@ -1,207 +0,0 @@ -a_arr_sub_page_classes[ $l_obj_class->get_priority() ] = $l_obj_class; - } - } - ksort( $this->a_arr_sub_page_classes ); - - // Register hooks/actions. - add_action( 'admin_init', array( $this, 'initialize_settings' ) ); - add_action( 'admin_menu', array( $this, 'register_main_menu' ) ); - // Register AJAX callbacks for Plugin information. - add_action( 'wp_ajax_nopriv_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); - add_action( 'wp_ajax_footnotes_get_plugin_info', array( $this, 'get_plugin_meta_information' ) ); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @since 1.5.0 - */ - public function initialize_settings() { - MCI_Footnotes_Settings::instance()->register_settings(); - // Iterate though each sub class of the layout engine and register their sections. - foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { - $l_obj_layout_engine_sub_class->register_sections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function register_main_menu() { - global $menu; - // Iterate through each main menu. - foreach ( $menu as $l_arr_main_menu ) { - // 3terate through each main menu attribute. - foreach ( $l_arr_main_menu as $l_str_attribute ) { - // Main menu already added, append sub pages and stop. - if ( self::C_STR_MAIN_MENU_SLUG === $l_str_attribute ) { - $this->register_sub_pages(); - return; - } - } - } - - // Add a new main menu page to the WordPress dashboard. - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // Page title. - self::C_STR_MAIN_MENU_TITLE, // Menu title. - 'manage_options', // Capability. - self::C_STR_MAIN_MENU_SLUG, // Menu slug. - array( $this, 'display_other_plugins' ), // Function. - plugins_url( 'footnotes/img/main-menu.png' ), // Icon URL. - null // Position. - ); - $this->register_sub_pages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @since 1.5.0 - */ - private function register_sub_pages() { - // First registered sub menu page MUST NOT contain a unique slug suffix. - // Iterate though each sub class of the layout engine and register their sub page. - foreach ( $this->a_arr_sub_page_classes as $l_obj_layout_engine_sub_class ) { - $l_obj_layout_engine_sub_class->register_sub_page(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @since 1.5.0 - */ - public function display_other_plugins() { - printf( '

                                                                                                                                                                      ' ); - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'manfisher' ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - - printf( 'visit Mark Cheret' ); - printf( '

                                                                                                                                                                      ' ); - - printf( '' ); - } - - // phpcs:disable WordPress.Security.NonceVerification.Missing - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @since 1.5.0 - */ - public function get_plugin_meta_information() { - // TODO: add nonce verification. - - // Get plugin internal name from POST data. - if ( isset( $_POST['plugin'] ) ) { - $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); - } - - if ( empty( $l_str_plugin_name ) ) { - echo wp_json_encode( array( 'error' => 'Plugin name invalid.' ) ); - exit; - } - $l_str_url = 'https://api.wordpress.org/plugins/info/1.0/' . $l_str_plugin_name . '.json'; - // Call URL and collect data. - $l_arr_response = wp_remote_get( $l_str_url ); - // Check if response is valid. - if ( is_wp_error( $l_arr_response ) ) { - echo wp_json_encode( array( 'error' => 'Error receiving Plugin Information from WordPress.' ) ); - exit; - } - if ( ! array_key_exists( 'body', $l_arr_response ) ) { - echo wp_json_encode( array( 'error' => 'Error reading WordPress API response message.' ) ); - exit; - } - // Get the body of the response. - $l_str_response = $l_arr_response['body']; - // Get plugin object. - $l_arr_plugin = json_decode( $l_str_response, true ); - if ( empty( $l_arr_plugin ) ) { - echo wp_json_encode( array( 'error' => 'Error reading Plugin meta information.
                                                                                                                                                                      URL: ' . $l_str_url . '
                                                                                                                                                                      Response: ' . $l_str_response ) ); - exit; - } - - $l_int_num_ratings = array_key_exists( 'num_ratings', $l_arr_plugin ) ? intval( $l_arr_plugin['num_ratings'] ) : 0; - $l_int_rating = array_key_exists( 'rating', $l_arr_plugin ) ? floatval( $l_arr_plugin['rating'] ) : 0.0; - $l_int_stars = round( 5 * $l_int_rating / 100.0, 1 ); - - // Return Plugin information as JSON encoded string. - echo wp_json_encode( - array( - 'error' => '', - 'PluginDescription' => array_key_exists( 'short_description', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['short_description'] ) : 'Error reading Plugin information', - 'PluginAuthor' => array_key_exists( 'author', $l_arr_plugin ) ? html_entity_decode( $l_arr_plugin['author'] ) : 'unknown', - 'PluginRatingText' => $l_int_stars . ' ' . __( 'rating based on', 'footnotes' ) . ' ' . $l_int_num_ratings . ' ' . __( 'ratings', 'footnotes' ), - 'PluginRating1' => $l_int_stars >= 0.5 ? 'star-full' : 'star-empty', - 'PluginRating2' => $l_int_stars >= 1.5 ? 'star-full' : 'star-empty', - 'PluginRating3' => $l_int_stars >= 2.5 ? 'star-full' : 'star-empty', - 'PluginRating4' => $l_int_stars >= 3.5 ? 'star-full' : 'star-empty', - 'PluginRating5' => $l_int_stars >= 4.5 ? 'star-full' : 'star-empty', - 'PluginRating' => $l_int_num_ratings, - 'PluginLastUpdated' => array_key_exists( 'last_updated', $l_arr_plugin ) ? $l_arr_plugin['last_updated'] : 'unknown', - 'PluginDownloads' => array_key_exists( 'downloaded', $l_arr_plugin ) ? $l_arr_plugin['downloaded'] : '---', - ) - ); - exit; - } - // phpcs:enable -} diff --git a/class/layout/settings.php b/class/layout/settings.php deleted file mode 100644 index bfddc98..0000000 --- a/class/layout/settings.php +++ /dev/null @@ -1,1261 +0,0 @@ -add_section( 'settings', __( 'General settings', 'footnotes' ), 0, true ); - - // Sync tab name with mirror in public function custom_css_migration(). - $l_arr_tabs[] = $this->add_section( 'customize', __( 'Referrers and tooltips', 'footnotes' ), 1, true ); - - $l_arr_tabs[] = $this->add_section( 'expert', __( 'Scope and priority', 'footnotes' ), 2, true ); - $l_arr_tabs[] = $this->add_section( 'customcss', __( 'Custom CSS', 'footnotes' ), 3, true ); - $l_arr_tabs[] = $this->add_section( 'how-to', __( 'Quick start guide', 'footnotes' ), null, false ); - - return $l_arr_tabs; - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @since 1.5.0 - * @return array - * - * Edited for 2.0.0 and later. - * - * hyperlink_arrow meta box: - * @since 2.0.0 discontinued - * @since 2.0.4 restored to meet user demand for arrow symbol semantics - * @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol - * - * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 - * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: - * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 - * @see details in class/config.php - * - * @since 2.1.6 / 2.2.0 tabs reordered and renamed - */ - protected function get_meta_boxes() { - $l_arr_meta_boxes = array(); - - // Sync box name with mirror in task.php. - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); - - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-timing', __( 'Tooltip timing', 'footnotes' ), 'mouseover_box_timing' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-truncation', __( 'Tooltip truncation', 'footnotes' ), 'mouseover_box_truncation' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-text', __( 'Tooltip text', 'footnotes' ), 'mouseover_box_text' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-appearance', __( 'Tooltip appearance', 'footnotes' ), 'mouseover_box_appearance' ); - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'custom-css', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css' ); - } - - $l_arr_meta_boxes[] = $this->add_meta_box( 'expert', 'lookup', __( 'WordPress hooks with priority level', 'footnotes' ), 'lookup_hooks' ); - - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE ) ) ) { - $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-migration', __( 'Your existing Custom CSS code', 'footnotes' ), 'custom_css_migration' ); - } - $l_arr_meta_boxes[] = $this->add_meta_box( 'customcss', 'custom-css-new', __( 'Custom CSS', 'footnotes' ), 'custom_css_new' ); - - $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'help', __( 'Brief introduction in how to use the plugin', 'footnotes' ), 'help' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'how-to', 'donate', __( 'Help us to improve our Plugin', 'footnotes' ), 'donate' ); - - return $l_arr_meta_boxes; - } - - /** - * Displays all settings for the reference container. - * - * @since 1.5.0 - * - * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 - * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - */ - public function reference_container() { - - // Options for the label element. - $l_arr_label_element = array( - 'p' => __( 'paragraph', 'footnotes' ), - 'h2' => __( 'heading 2', 'footnotes' ), - 'h3' => __( 'heading 3', 'footnotes' ), - 'h4' => __( 'heading 4', 'footnotes' ), - 'h5' => __( 'heading 5', 'footnotes' ), - 'h6' => __( 'heading 6', 'footnotes' ), - ); - // Options for the positioning of the reference container. - $l_arr_positions = array( - 'post_end' => __( 'at the end of the post', 'footnotes' ), - 'widget' => __( 'in the widget area', 'footnotes' ), - 'footer' => __( 'in the footer', 'footnotes' ), - ); - // Basic responsive page layout options. - $l_arr_page_layout_options = array( - 'none' => __( 'No', 'footnotes' ), - 'reference-container' => __( 'to the reference container exclusively', 'footnotes' ), - 'entry-content' => __( 'to the div element starting below the post title', 'footnotes' ), - 'main-content' => __( 'to the main element including the post title', 'footnotes' ), - ); - // Options for the separating punctuation between backlinks. - $l_arr_separators = array( - // Unicode character names are conventionally uppercase. - 'comma' => __( 'COMMA', 'footnotes' ), - 'semicolon' => __( 'SEMICOLON', 'footnotes' ), - 'en_dash' => __( 'EN DASH', 'footnotes' ), - ); - // Options for the terminating punctuation after backlinks. - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. - // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. - // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. - $l_arr_terminators = array( - 'period' => __( 'FULL STOP', 'footnotes' ), - // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts). - 'parenthesis' => __( 'CLOSING PARENTHESIS', 'footnotes' ), - 'colon' => __( 'COLON', 'footnotes' ), - ); - // Options for the first column width (per cent is a ratio, not a unit). - $l_arr_width_units = array( - '%' => __( 'per cent', 'footnotes' ), - 'px' => __( 'pixels', 'footnotes' ), - 'rem' => __( 'root em', 'footnotes' ), - 'em' => __( 'em', 'footnotes' ), - 'vw' => __( 'viewport width', 'footnotes' ), - ); - // Options for reference container script mode. - $l_arr_script_mode = array( - 'jquery' => __( 'jQuery', 'footnotes' ), - 'js' => __( 'plain JavaScript', 'footnotes' ), - ); - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-reference-container' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), - 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), - - 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), - 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), - - 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), - 'border' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_enabled ), - - 'label-collapse' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, __( 'Collapse by default:', 'footnotes' ) ), - 'collapse' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE, $l_arr_enabled ), - - 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), - 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), - 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), - - 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), - 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), - // Translators: %s: at the end of the post. - 'notice-position' => sprintf( __( 'To use the position shortcode, please set the position to: %s', 'footnotes' ), '' . __( 'at the end of the post', 'footnotes' ) . '' ), - - 'label-shortcode' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __( 'Position shortcode:', 'footnotes' ) ), - 'shortcode' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ), - 'notice-shortcode' => __( 'If present in the content, any shortcode in this text box will be replaced with the reference container.', 'footnotes' ), - - 'label-startpage' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, __( 'Display on start page too:', 'footnotes' ) ), - 'startpage' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_enabled ), - - 'label-margin-top' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, __( 'Top margin:', 'footnotes' ) ), - 'margin-top' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN, -500, 500 ), - 'notice-margin-top' => __( 'pixels; may be negative', 'footnotes' ), - - 'label-margin-bottom' => $this->add_label( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, __( 'Bottom margin:', 'footnotes' ) ), - 'margin-bottom' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN, -500, 500 ), - 'notice-margin-bottom' => __( 'pixels; may be negative', 'footnotes' ), - - 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), - 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), - 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), - - 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), - 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), - 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), - - 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), - 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), - 'notice-symbol' => __( 'Please choose or input the symbol at the top of the next dashboard tab.', 'footnotes' ), - - 'label-switch' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __( 'Symbol appended, not prepended:', 'footnotes' ) ), - 'switch' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_enabled ), - - 'label-3column' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __( 'Backlink symbol in an extra column:', 'footnotes' ) ), - '3column' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_enabled ), - 'notice-3column' => __( 'This legacy layout is available if identical footnotes are not combined.', 'footnotes' ), - - 'label-row-borders' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __( 'Borders around the table rows:', 'footnotes' ) ), - 'row-borders' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_enabled ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, __( 'Add a separator when enumerating backlinks:', 'footnotes' ) ), - 'separator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED, $l_arr_enabled ), - 'separator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_separators ), - 'separator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ), - 'notice-separator' => __( 'Your input overrides the selection.', 'footnotes' ), - - 'label-terminator' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, __( 'Add a terminal punctuation to backlinks:', 'footnotes' ) ), - 'terminator-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED, $l_arr_enabled ), - 'terminator-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_terminators ), - 'terminator-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ), - 'notice-terminator' => __( 'Your input overrides the selection.', 'footnotes' ), - - 'label-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, __( 'Set backlinks column width:', 'footnotes' ) ), - 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), - 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), - 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), - 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - - 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), - 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), - 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), - 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), - 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), - - 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), - 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), - 'notice-line-break' => __( 'This option adds a line break before each added backlink when identical footnotes are combined.', 'footnotes' ), - - 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), - 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), - 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the footnotes start and end tag short codes. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 - * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 - * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 - * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra - * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ - */ - public function start_end() { - // Footnotes start tag short code options. - $l_arr_shortcode_start = array( - '((' => '((', - '(((' => '(((', - '{{' => '{{', - '{{{' => '{{{', - '[n]' => '[n]', - '[fn]' => '[fn]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - '[ref]' => '[ref]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - // Custom (user-defined) start and end tags bracketing the footnote text inline. - 'userdefined' => __( 'custom short code', 'footnotes' ), - ); - // Footnotes end tag short code options. - $l_arr_shortcode_end = array( - '))' => '))', - ')))' => ')))', - '}}' => '}}', - '}}}' => '}}}', - '[/n]' => '[/n]', - '[/fn]' => '[/fn]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - '[/ref]' => '[/ref]', - htmlspecialchars( '' ) => htmlspecialchars( '' ), - // Custom (user-defined) start and end tags bracketing the footnote text inline. - 'userdefined' => __( 'custom short code', 'footnotes' ), - ); - // Options for the syntax validation. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-start-end' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), - - 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), - 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), - 'short-code-start-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ), - - 'label-short-code-end' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __( 'Footnote end tag short code:', 'footnotes' ) ), - 'short-code-end' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_shortcode_end ), - 'short-code-end-user' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ), - - // For script showing/hiding user defined text boxes. - 'short-code-start-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, - 'short-code-end-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, - 'short-code-start-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, - 'short-code-end-user-id' => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, - - 'description-parentheses' => __( 'WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.', 'footnotes' ), - - // Option to enable syntax validation, label mirrored in task.php. - 'label-syntax' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __( 'Check for balanced shortcodes:', 'footnotes' ) ), - 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), - 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), - - 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the footnotes numbering. - * - * @since 2.2.0 - */ - public function numbering() { - // Define some space for the output. - $l_str_space = '     '; - // Options for the combination of identical footnotes. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for the numbering style of the footnotes. - $l_arr_counter_style = array( - 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', - 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', - 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', - 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', - 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', - 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-numbering' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-counter-style' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __( 'Numbering style:', 'footnotes' ) ), - 'counter-style' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_counter_style ), - - // Algorithmically combine identicals. - 'label-identical' => $this->add_label( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, __( 'Combine identical footnotes:', 'footnotes' ) ), - 'identical' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_enable ), - 'notice-identical' => __( 'This option may require copy-pasting footnotes in multiple instances.', 'footnotes' ), - // Support for Ibid. notation added thanks to @meglio in . - 'description-identical' => __( 'Even when footnotes are combined, footnote numbers keep incrementing. This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system. The Ibid. notation and the op. cit. abbreviation followed by the current page number avoid repeating the footnote content. For changing sources, shortened citations may be used. Repeating full citations is also an opportunity to add details.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all options for the scrolling behavior. - * - * @since 2.2.0 - */ - public function scrolling() { - - // Options for enabling hard links for AMP compat. - $l_arr_enable = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-scrolling' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), - 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), - 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), - - 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), - 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), - 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), - - // Enable hard links for AMP compat. - 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), - 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), - 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), - - 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), - 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), - 'notice-footnote' => __( 'This will show up in the address bar after clicking on a hard-linked footnote referrer.', 'footnotes' ), - - 'label-referrer' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnote referrers:', 'footnotes' ) ), - 'referrer' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ), - 'notice-referrer' => __( 'This will show up in the address bar after clicking on a hard-linked backlink.', 'footnotes' ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR, __( 'ID separator:', 'footnotes' ) ), - 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ), - 'notice-separator' => __( 'May be empty or any string, for example _, - or +, to distinguish post number, container number and footnote number.', 'footnotes' ), - - // Enable backlink tooltips. - 'label-backlink-tooltips' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, __( 'Enable backlink tooltips:', 'footnotes' ) ), - 'backlink-tooltips' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE, $l_arr_enable ), - 'notice-backlink-tooltips' => __( 'Hard backlinks get ordinary tooltips hinting to use the backbutton instead.', 'footnotes' ), - - 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), - 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), - 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for 'I love Footnotes'. - * - * @since 1.5.0 - * - * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 - */ - public function love() { - // Options for the acknowledgment display in the footer. - $l_arr_love = array( - // Logo only. - 'text-3' => sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Logo followed by heart symbol. - 'text-4' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // Logo preceded by heart symbol. - 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: 2: heart symbol 1: footnotes logogram. - 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // Translators: %s: Plugin logo. - 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. - 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. - 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - 'random' => __( 'randomly determined display of either mention', 'footnotes' ), - // Translators: 1: Plugin logo.2: heart symbol. - 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-love' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - // Translators: %s: Plugin logo. - 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), - 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), - // Translators: %s: Plugin logo. - 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), - 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the excerpt setting. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1453+0100 - * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 - */ - public function excerpts() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-excerpts' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), - 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), - 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), - // Translators: %s: link to the Advanced Excerpt Plugin. - 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for the footnote referrers. - * - * @since 1.5.0 - * - * Edited heading 2020-12-12T1513+0100 - * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 - */ - public function superscript() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for superscript normalize scope. - $l_arr_normalize_superscript = array( - 'no' => __( 'No', 'footnotes' ), - 'referrers' => __( 'Footnote referrers', 'footnotes' ), - 'all' => __( 'All superscript elements', 'footnotes' ), - ); - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-superscript' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), - 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), - - 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), - 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), - - 'label-after' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __( 'At the end of the footnote referrers:', 'footnotes' ) ), - 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), - - 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), - - 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), - 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), - 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays enabled status for the footnotes mouse-over box. - * - * @since 1.5.2 - * - * Edited: - * @since 2.2.0 5 parts to address increased settings number - * @since 2.2.5 position settings for alternative tooltips - */ - public function mouseover_box() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-display' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-enable' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __( 'Display tooltips:', 'footnotes' ) ), - 'enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_enabled ), - 'notice-enable' => __( 'Formatted text boxes allowing hyperlinks, displayed on mouse-over or tap and hold.', 'footnotes' ), - - 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), - 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), - 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), - // Translators: %s: Plugin logo. - 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays position settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_position() { - - // Options for the Mouse-over box position. - $l_arr_position = array( - 'top left' => __( 'top left', 'footnotes' ), - 'top center' => __( 'top center', 'footnotes' ), - 'top right' => __( 'top right', 'footnotes' ), - 'center right' => __( 'center right', 'footnotes' ), - 'bottom right' => __( 'bottom right', 'footnotes' ), - 'bottom center' => __( 'bottom center', 'footnotes' ), - 'bottom left' => __( 'bottom left', 'footnotes' ), - 'center left' => __( 'center left', 'footnotes' ), - ); - // Options for the alternative Mouse-over box position. - $l_arr_alternative_position = array( - 'top left' => __( 'top left', 'footnotes' ), - 'top right' => __( 'top right', 'footnotes' ), - 'bottom right' => __( 'bottom right', 'footnotes' ), - 'bottom left' => __( 'bottom left', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-position' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __( 'Position:', 'footnotes' ) ), - 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_position ), - 'position-alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION, $l_arr_alternative_position ), - 'notice-position' => __( 'The second column of settings boxes is for the alternative tooltips.', 'footnotes' ), - - 'label-offset-x' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __( 'Horizontal offset:', 'footnotes' ) ), - 'offset-x' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), - 'offset-x-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X, -500, 500 ), - 'notice-offset-x' => __( 'pixels; negative value for a leftwards offset; alternative tooltips: direction depends on position', 'footnotes' ), - - 'label-offset-y' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __( 'Vertical offset:', 'footnotes' ) ), - 'offset-y' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), - 'offset-y-alternative' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y, -500, 500 ), - 'notice-offset-y' => __( 'pixels; negative value for an upwards offset; alternative tooltips: direction depends on position', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays dimensions setting for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_dimensions() { - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-dimensions' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __( 'Maximum width:', 'footnotes' ) ), - 'max-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280 ), - 'width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH, 0, 1280 ), - 'notice-max-width' => __( 'pixels; set to 0 for jQuery tooltips without max width; alternative tooltips are given the value in the second box as fixed width.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays timing settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_timing() { - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-timing' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-fade-in-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __( 'Fade-in delay:', 'footnotes' ) ), - 'fade-in-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000 ), - 'notice-fade-in-delay' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-in-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __( 'Fade-in duration:', 'footnotes' ) ), - 'fade-in-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000 ), - 'notice-fade-in-duration' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-out-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __( 'Fade-out delay:', 'footnotes' ) ), - 'fade-out-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000 ), - 'notice-fade-out-delay' => __( 'milliseconds', 'footnotes' ), - - 'label-fade-out-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __( 'Fade-out duration:', 'footnotes' ) ), - 'fade-out-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000 ), - 'notice-fade-out-duration' => __( 'milliseconds', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays truncation settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_truncation() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-truncation' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-truncation' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __( 'Truncate the note in the tooltip:', 'footnotes' ) ), - 'truncation' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_enabled ), - - 'label-max-length' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __( 'Maximum number of characters in the tooltip:', 'footnotes' ) ), - 'max-length' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000 ), - // The feature trims back until the last full word. - 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), - - 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), - 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays dedicated tooltip text settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_text() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-text' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'description-delimiter' => __( '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.', 'footnotes' ), - - 'label-delimiter' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __( 'Delimiter for dedicated tooltip text:', 'footnotes' ) ), - 'delimiter' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ), - 'notice-delimiter' => __( 'If the delimiter shortcode is present, the tooltip text will be the part before it.', 'footnotes' ), - - 'label-mirror' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, __( 'Mirror the tooltip in the reference container:', 'footnotes' ) ), - 'mirror' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE, $l_arr_enabled ), - 'notice-mirror' => __( 'Tooltips may be harder to use on mobiles. This option allows to read it in the reference container.', 'footnotes' ), - - 'label-separator' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __( 'Separator between tooltip text and footnote text:', 'footnotes' ) ), - 'separator' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ), - 'notice-separator' => __( 'May be a simple space, or a line break <br />, or any string in your language.', 'footnotes' ), - - 'description-mirror' => __( 'Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.', 'footnotes' ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays style settings for the footnotes mouse-over box. - * - * @since 2.2.0 - */ - public function mouseover_box_appearance() { - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - // Options for the font size unit. - $l_arr_font_size_units = array( - 'em' => __( 'em', 'footnotes' ), - 'rem' => __( 'rem', 'footnotes' ), - 'px' => __( 'pixels', 'footnotes' ), - 'pt' => __( 'points', 'footnotes' ), - 'pc' => __( 'picas', 'footnotes' ), - 'mm' => __( 'millimeters', 'footnotes' ), - '%' => __( 'per cent', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'mouse-over-box-appearance' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - - 'label-font-size' => $this->add_label( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __( 'Set font size:', 'footnotes' ) ), - 'font-size-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_enabled ), - 'font-size-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true ), - 'font-size-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_font_size_units ), - 'notice-font-size' => __( 'By default, the font size is set to equal the surrounding text.', 'footnotes' ), - - 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), - 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), - 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), - // Translators: %s: Clear or leave empty. - 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), - 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), - 'notice-border-width' => __( 'pixels; 0 for borderless', 'footnotes' ), - - 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), - 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), - 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), - 'notice-border-radius' => __( 'pixels; 0 for sharp corners', 'footnotes' ), - - 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), - 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), - // Translators: %s: Clear or leave empty. - 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all settings for the backlink symbol. - * - * @since 1.5.0 - * - * Edited heading for v2.0.4 - * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. - * - * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol - * @since 2.2.1 and 2.2.4 back here - */ - public function hyperlink_arrow() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-hyperlink-arrow' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __( 'Select or input the backlink symbol:', 'footnotes' ) ), - 'symbol-options' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::get_arrow() ), - 'symbol-custom' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ), - 'notice-symbol' => __( 'Your input overrides the selection.', 'footnotes' ), - 'description-symbol' => __( 'This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the Custom CSS box. - * - * @since 1.5.0 - * - * Edited: - * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 - * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 - * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 - * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report - */ - public function custom_css() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), - 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area under the new tab.', 'footnotes' ), - - // phpcs:disable Squiz.PHP.CommentedOutCode.Found - // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. - - // "label-class-1" => ".footnote_plugin_tooltip_text",. - // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-2" => ".footnote_tooltip",. - // "class-2" => $this->add_text(__("mouse-over box, tooltip for each superscript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-3" => ".footnote_plugin_index",. - // "class-3" => $this->add_text(__("1st column of the Reference Container, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. - - // "label-class-4" => ".footnote_plugin_text",. - // "class-4" => $this->add_text(__("2nd column of the Reference Container, Footnote text", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)). - // phpcs:enable - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays transitional legacy Custom CSS box. - * - * @since 2.2.2 - */ - public function custom_css_migration() { - - // Options for Yes/No select box. - $l_arr_enabled = array( - 'yes' => __( 'Yes', 'footnotes' ), - 'no' => __( 'No', 'footnotes' ), - ); - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-migration' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __( 'Your existing Custom CSS code:', 'footnotes' ) ), - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS ), - 'description-css' => __( 'Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe, and the code remains valid while visible. Please copy-paste the content into the new text area below. Set Show legacy to No. Save twice.', 'footnotes' ), - - 'label-show-legacy' => $this->add_label( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, 'Show legacy Custom CSS settings containers:' ), - 'show-legacy' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_LEGACY_ENABLE, $l_arr_enabled ), - 'notice-show-legacy' => __( 'Please set to No when you are done migrating, for the legacy Custom CSS containers to disappear.', 'footnotes' ), - // Translators: %s: Referres and tooltips. - 'description-show-legacy' => sprintf( __( 'The legacy Custom CSS under the %s tab and its mirror here are emptied, and the select box saved as No, when the settings tab is saved while the settings container is not displayed.', 'footnotes' ), __( 'Referrers and tooltips', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays the new Custom CSS box. - * - * @since 2.2.2 - */ - public function custom_css_new() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'customize-css-new' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'css' => $this->add_textarea( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ), - - 'headline' => $this->add_text( __( 'Recommended CSS classes:', 'footnotes' ) ), - - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays available Hooks to look for Footnote short codes. - * - * @since 1.5.5 - * - * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 - * - * priority level was initially hard-coded default - * shows "9223372036854775807" in the numbox - * empty should be interpreted as PHP_INT_MAX, - * but a numbox cannot be set to empty: - * define -1 as PHP_INT_MAX instead - * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 - */ - public function lookup_hooks() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'expert-lookup' ); - - // Replace all placeholders. - $l_obj_template->replace( - array( - 'description-1' => __( 'The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', 'footnotes' ), - // Translators: 1: 99; 2: 1200. - 'description-2' => sprintf( __( 'For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', 'footnotes' ), 99, 1200 ), - // Translators: 1: PHP_INT_MAX; 2: 0; 3: -1; 4: 'PHP_INT_MAX'. - 'description-3' => sprintf( __( '%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', 'footnotes' ), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX' ), - 'description-4' => __( 'The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', 'footnotes' ), - - 'head-hook' => __( 'WordPress hook function name', 'footnotes' ), - 'head-checkbox' => __( 'Activate', 'footnotes' ), - 'head-numbox' => __( 'Priority level', 'footnotes' ), - 'head-url' => __( 'WordPress documentation', 'footnotes' ), - - 'label-the-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE, 'the_title' ), - 'the-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ), - 'priority-the-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-title' => 'https://developer.wordpress.org/reference/hooks/the_title/', - - 'label-the-content' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT, 'the_content' ), - 'the-content' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ), - 'priority-the-content' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-content' => 'https://developer.wordpress.org/reference/hooks/the_content/', - - 'label-the-excerpt' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT, 'the_excerpt' ), - 'the-excerpt' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ), - 'priority-the-excerpt' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-the-excerpt' => 'https://developer.wordpress.org/reference/functions/the_excerpt/', - - 'label-widget-title' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE, 'widget_title' ), - 'widget-title' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ), - 'priority-widget-title' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-widget-title' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title', - - 'label-widget-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT, 'widget_text' ), - 'widget-text' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ), - 'priority-widget-text' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX ), - 'url-widget-text' => 'https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text', - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays a short introduction of the Plugin. - * - * @since 1.5.0 - */ - public function Help() { - global $g_obj_mci_footnotes; - // Load footnotes starting and end tag. - $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - - if ( 'userdefined' === $l_arr_footnote_starting_tag['value'] || 'userdefined' === $l_arr_footnote_ending_tag['value'] ) { - // Load user defined starting and end tag. - $l_arr_footnote_starting_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_arr_footnote_ending_tag = $this->load_setting( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); - } - $l_str_example = 'Hello' . $l_arr_footnote_starting_tag['value'] . - 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . - 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . - 'labore et dolore magna aliquyam erat, sed diam ' . - 'voluptua. At vero eos et accusam et justo duo dolores ' . - 'et ea rebum. Stet clita kasd gubergren, no sea ' . - 'takimata sanctus est Lorem ipsum dolor sit amet. ' . - 'Lorem ipsum dolor sit amet, consetetur sadipscing ' . - 'elitr, sed diam nonumy eirmod tempor invidunt ut ' . - 'labore et dolore magna aliquyam erat, sed diam ' . - 'voluptua. At vero eos et accusam et justo duo ' . - 'dolores et ea rebum. Stet clita kasd gubergren, no ' . - 'sea takimata sanctus est Lorem ipsum dolor sit amet.' . - $l_arr_footnote_ending_tag['value'] . ' World!'; - - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-help' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), - 'start' => $l_arr_footnote_starting_tag['value'], - 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), - 'end' => $l_arr_footnote_ending_tag['value'], - 'example-code' => $l_str_example, - 'example-string' => '
                                                                                                                                                                      ' . __( 'will be displayed as:', 'footnotes' ), - 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), - // Translators: 1: ; 2: . - 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), - ) - ); - // Call wp_head function to get the Styling of the mouse-over box. - $g_obj_mci_footnotes->a_obj_task->wp_head(); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } - - /** - * Displays all Donate button to support the developers. - * - * @since 1.5.0 - */ - public function donate() { - // Load template file. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'how-to-donate' ); - // Replace all placeholders. - $l_obj_template->replace( - array( - 'caption' => __( 'Donate now', 'footnotes' ), - ) - ); - // Display template with replaced placeholders. - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $l_obj_template->get_content(); - // phpcs:enable - } -} diff --git a/class/settings.php b/class/settings.php index 7073a0e..2e8acaa 100644 --- a/class/settings.php +++ b/class/settings.php @@ -1,11 +1,13 @@ - array( + "footnotes_storage" => array( - self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', - self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', - self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', - self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_STR_FOOTNOTES_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', + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', - self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', - self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', - 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_INT_FOOTNOTES_SCROLL_OFFSET => 20, - self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, - // 2.5.4 fast-tracked. - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', - self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', - 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_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_STR_REFERENCE_CONTAINER_POSITION => 'post_end', + self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', + self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - // Whether to enqueue additional stylesheet. - self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', - // Top and bottom margins. - self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, - self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, - // Table cell borders. - self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', - // Backlink symbol. - self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', - self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', - // Backlink separators and terminators are often not preferred.. - // But a choice must be provided along with the ability to customize. - 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 => '', + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', - // Set backlinks column width. - self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', - self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', - self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', - // Set backlinks column max. width. - self::C_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', + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', - // Whether a
                                                                                                                                                                      tag is inserted. - self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // whether a
                                                                                                                                                                      tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', - // Whether to enable URL line wrapping. - self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', - // Whether to use link elements. - self::C_STR_LINK_ELEMENT_ENABLED => 'yes', + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', - // Excerpt should be disabled. - self::C_STR_FOOTNOTES_IN_EXCERPT => 'no', + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', - self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', - self::C_STR_FOOTNOTES_LOVE => 'no', + self::C_STR_FOOTNOTES_LOVE => 'no', ), - 'footnotes_storage_custom' => array( + "footnotes_storage_custom" => array( - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', - self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', - self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', - // 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. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - // The truncation length is raised from 150 to 200 chars. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - // 2.5.4 fast-tracked. - 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 => ' — ', - self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', - // 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. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover. - // The current line of text (web coordinates origin is top left). - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - // The width should be limited to start with, for the box to have shape. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - // Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, - self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, - // Tooltip display durations. - // Called mouse over box not tooltip for consistency. - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, - self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, - self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, - // Tooltip font size reset to legacy by default since 2.1.4;. - // Was set to inherit since 2.1.1 as it overrode custom CSS,. - // Is moved to settings since 2.1.4 2020-12-04T1023+0100. - self::C_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', + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background. - // By default, due to diverging user preferences. White is neutral. - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - 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_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - // The mouse over box corners mustn’t be rounded as that is outdated. - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - // Custom CSS migrates to a dedicated tab. - self::C_STR_CUSTOM_CSS => '', + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', ), - 'footnotes_storage_expert' => array( + "footnotes_storage_expert" => array( - // These are checkboxes; keyword 'checked' is converted to Boolean true,. - // Empty string to false (default). + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): - // Titles should all be enabled by default to prevent users from. - // Thinking at first that the feature is broken in post titles.. - // See . - // Yet in titles, footnotes are still buggy, because WordPress. - // Uses the title string in menus and in the title element.. - self::C_STR_EXPERT_LOOKUP_THE_TITLE => '', + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See + // Yet in titles, footnotes are still buggy, because WordPress + // uses the title string in menus and in the title element. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', - self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked', + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', - // And the_excerpt is disabled by default following @nikelaos in. - // . - // . - self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => '', + // And the_excerpt is disabled by default following @nikelaos in + // + // + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', - self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', - // 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.. - self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '', + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', - // Initially hard-coded default. - // Shows "9223372036854780000" instead of 9223372036854775807 in the numbox. - // Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty. - // . - // Interpret -1 as PHP_INT_MAX instead. - self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // 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.. - self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, - self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), - 'footnotes_storage_custom_css' => array( + "footnotes_storage_custom_css" => array( - self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes', - self::C_STR_CUSTOM_CSS_NEW => '', + self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', + self::C_STR_CUSTOM_CSS_NEW => '', ), @@ -1032,123 +1074,130 @@ class MCI_Footnotes_Settings { /** * Contains all Settings from each Settings container as soon as this class is initialized. * + * @author Stefan Herndler * @since 1.5.0 * @var array */ - private $a_arr_settings = array(); + private $a_arr_Settings = array(); /** * Class Constructor. Loads all Settings from each WordPress Settings container. * + * @author Stefan Herndler * @since 1.5.0 */ private function __construct() { - $this->load_all(); + $this->loadAll(); } /** * Returns a singleton of this class. * + * @author Stefan Herndler * @since 1.5.0 * @return MCI_Footnotes_Settings */ public static function instance() { - // No instance defined yet, load it. - if ( ! self::$a_obj_instance ) { - self::$a_obj_instance = new self(); + // no instance defined yet, load it + if (self::$a_obj_Instance === null) { + self::$a_obj_Instance = new self(); } - // Return a singleton of this class. - return self::$a_obj_instance; + // return a singleton of this class + return self::$a_obj_Instance; } /** * Returns the name of a specified Settings Container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Settings Container Array Key Index. + * @param int $p_int_Index Settings Container Array Key Index. * @return str Settings Container name. */ - public function get_container( $p_int_index ) { - return $this->a_arr_container[ $p_int_index ]; + public function getContainer($p_int_Index) { + return $this->a_arr_Container[$p_int_Index]; } /** * Returns the default values of a specific Settings Container. * + * @author Stefan Herndler * @since 1.5.6 - * @param int $p_int_index Settings Container Aray Key Index. + * @param int $p_int_Index Settings Container Aray Key Index. * @return array */ - public function get_defaults( $p_int_index ) { - return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ]; + public function getDefaults($p_int_Index) { + return $this->a_arr_Default[$this->a_arr_Container[$p_int_Index]]; } /** * Loads all Settings from each Settings container. * + * @author Stefan Herndler * @since 1.5.0 */ - 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 ) ); + private function loadAll() { + // clear current settings + $this->a_arr_Settings = array(); + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // load settings + $this->a_arr_Settings = array_merge($this->a_arr_Settings, $this->Load($i)); } } /** * Loads all Settings from specified Settings Container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Settings Container Array Key Index. + * @param int $p_int_Index Settings Container Array Key Index. * @return array Settings loaded from Container of Default Settings if Settings Container is empty (first usage). * * @since ditched trimming whitespace from text box content in response to user request. * @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 */ - 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 ) ]; + private function Load($p_int_Index) { + // load all settings from container + $l_arr_Options = get_option($this->getContainer($p_int_Index)); + // load all default settings + $l_arr_Default = $this->a_arr_Default[$this->getContainer($p_int_Index)]; - // No settings found, set them to their default value. - if ( empty( $l_arr_options ) ) { - return $l_arr_default; + // no settings found, set them to their default value + if (empty($l_arr_Options)) { + return $l_arr_Default; } - // 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; + // 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; } } - // Iterate through each setting in the container. - foreach ( $l_arr_options as $l_str_key => $l_str_value ) { - // Remove all whitespace at the beginning and end of a setting. - // Trimming whitespace is ditched. - // $l_str_value = trim($l_str_value);. - // Write the sanitized value back to the setting container. - $l_arr_options[ $l_str_key ] = $l_str_value; + // iterate through each setting in the container + foreach($l_arr_Options as $l_str_Key => $l_str_Value) { + // remove all whitespace at the beginning and end of a setting + // trimming whitespace is ditched: + //$l_str_Value = trim($l_str_Value); + // write the sanitized value back to the setting container + $l_arr_Options[$l_str_Key] = $l_str_Value; } - // Return settings loaded from Container. - return $l_arr_options; + // return settings loaded from Container + return $l_arr_Options; } /** * Updates a whole Settings container. * + * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_index Index of the Settings container. - * @param array $p_arr_new_values new Settings. + * @param int $p_int_Index Index of the Settings container. + * @param array $p_arr_newValues new Settings. * @return bool */ - 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(); + public function saveOptions($p_int_Index, $p_arr_newValues) { + if (update_option($this->getContainer($p_int_Index), $p_arr_newValues)) { + $this->loadAll(); return true; } return false; @@ -1157,17 +1206,19 @@ class MCI_Footnotes_Settings { /** * Returns the value of specified Settings name. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_key Settings Array Key name. + * @param string $p_str_Key Settings Array Key name. * @return mixed Value of the Setting on Success or Null in Settings name is invalid. */ - 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; + 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; } /** * Deletes each Settings Container and loads the default values for each Settings Container. * + * @author Stefan Herndler * @since 1.5.0 * * Edit: This didn’t actually work. @@ -1176,28 +1227,27 @@ class MCI_Footnotes_Settings { * done by deleting and reinstalling (see the warning about database backup). * 2020-12-13T1353+0100 */ - 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 ) ); + public function ClearAll() { + // iterate through each Settings Container + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + // delete the settings container + delete_option($this->getContainer($i)); } - // Set settings back to the default values. - $this->a_arr_settings = $this->a_arr_default; + // set settings back to the default values + $this->a_arr_Settings = $this->a_arr_Default; } /** * Register all Settings Container for the Plugin Settings Page in the Dashboard. * Settings Container Label will be the same as the Settings Container Name. * + * @author Stefan Herndler * @since 1.5.0 */ - 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 ) ); + public function RegisterSettings() { + // register all settings + for ($i = 0; $i < count($this->a_arr_Container); $i++) { + register_setting($this->getContainer($i), $this->getContainer($i)); } } } diff --git a/class/task.php b/class/task.php index 7694943..28c0282 100644 --- a/class/task.php +++ b/class/task.php @@ -1,11 +1,14 @@ -get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) ); - $l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) ); - $l_int_the_excerpt_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL ) ); - $l_int_widget_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL ) ); - $l_int_widget_text_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL ) ); + // get values from settings: + $l_int_TheTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL)); + $l_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL)); + $l_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL)); + $l_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL)); + $l_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL)); - // PHP_INT_MAX can be set by -1. - $l_int_the_title_priority = ( -1 === $l_int_the_title_priority ) ? PHP_INT_MAX : $l_int_the_title_priority; - $l_int_the_content_priority = ( -1 === $l_int_the_content_priority ) ? PHP_INT_MAX : $l_int_the_content_priority; - $l_int_the_excerpt_priority = ( -1 === $l_int_the_excerpt_priority ) ? PHP_INT_MAX : $l_int_the_excerpt_priority; - $l_int_widget_title_priority = ( -1 === $l_int_widget_title_priority ) ? PHP_INT_MAX : $l_int_widget_title_priority; - $l_int_widget_text_priority = ( -1 === $l_int_widget_text_priority ) ? PHP_INT_MAX : $l_int_widget_text_priority; + // PHP_INT_MAX can be set by -1: + $l_int_TheTitlePriority = ($l_int_TheTitlePriority == -1) ? PHP_INT_MAX : $l_int_TheTitlePriority ; + $l_int_TheContentPriority = ($l_int_TheContentPriority == -1) ? PHP_INT_MAX : $l_int_TheContentPriority ; + $l_int_TheExcerptPriority = ($l_int_TheExcerptPriority == -1) ? PHP_INT_MAX : $l_int_TheExcerptPriority ; + $l_int_WidgetTitlePriority = ($l_int_WidgetTitlePriority == -1) ? PHP_INT_MAX : $l_int_WidgetTitlePriority; + $l_int_WidgetTextPriority = ($l_int_WidgetTextPriority == -1) ? PHP_INT_MAX : $l_int_WidgetTextPriority ; - // Append custom css to the header. - add_filter( 'wp_head', array( $this, 'wp_head' ), PHP_INT_MAX ); - // Append the love and share me slug to the footer. - add_filter( 'wp_footer', array( $this, 'wp_footer' ), PHP_INT_MAX ); + // append custom css to the header + add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_TITLE ) ) ) { - add_filter( 'the_title', array( $this, 'the_title' ), $l_int_the_title_priority ); + // append the love and share me slug to the footer + add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); + + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { + add_filter('the_title', array($this, "the_title"), $l_int_TheTitlePriority); } - // Configurable priority level for reference container relative positioning; default 98. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_CONTENT ) ) ) { - add_filter( 'the_content', array( $this, 'the_content' ), $l_int_the_content_priority ); + // configurable priority level for reference container relative positioning; default 98: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { + add_filter('the_content', array($this, "the_content"), $l_int_TheContentPriority); /** - * Hook for category pages. + * Hook for category pages * * - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. * @@ -529,10 +463,10 @@ class MCI_Footnotes_Task { * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. * @link https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ */ - add_filter( 'term_description', array( $this, 'the_content' ), $l_int_the_content_priority ); + add_filter('term_description', array($this, "the_content"), $l_int_TheContentPriority); /** - * Hook for popup maker popups. + * Hook for popup maker popups * * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @@ -542,21 +476,22 @@ class MCI_Footnotes_Task { * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ */ - add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority ); + add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_THE_EXCERPT ) ) ) { - add_filter( 'the_excerpt', array( $this, 'the_excerpt' ), $l_int_the_excerpt_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { + add_filter('the_excerpt', array($this, "the_excerpt"), $l_int_TheExcerptPriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TITLE ) ) ) { - add_filter( 'widget_title', array( $this, 'widget_title' ), $l_int_widget_title_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { + add_filter('widget_title', array($this, "widget_title"), $l_int_WidgetTitlePriority); } - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_EXPERT_LOOKUP_WIDGET_TEXT ) ) ) { - add_filter( 'widget_text', array( $this, 'widget_text' ), $l_int_widget_text_priority ); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { + add_filter('widget_text', array($this, "widget_text"), $l_int_WidgetTextPriority); } + /** - * The the_post hook. + * The the_post hook * * - Adding: Hooks: support 'the_post' in response to user request for custom post types. * @@ -621,16 +556,18 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges */ - // Reset stored footnotes when displaying the header. - self::$a_arr_footnotes = array(); - self::$a_bool_allow_love_me = true; + // reset stored footnotes when displaying the header + self::$a_arr_Footnotes = array(); + self::$a_bool_AllowLoveMe = true; } /** * Outputs the custom css to the header of the public page. * + * @author Stefan Herndler * @since 1.5.0 * + * * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. * @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. * @since 2.1.3 raise settings priority to override theme stylesheets @@ -643,7 +580,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // Insert start tag without switching out of PHP. + // insert start tag without switching out of PHP: echo "\r\n\r\n"; /** @@ -1002,110 +922,84 @@ class MCI_Footnotes_Task { * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * - * The script for alternative tooltips is printed formatted, not minified, - * for transparency. It isn’t indented though (the PHP open tag neither). + * The script for alternative tooltips is printed formatted, not minified: */ - if ( self::$a_bool_alternative_tooltips_enabled ) { - - // Start internal script. + if ( self::$a_bool_AlternativeTooltipsEnabled ) { ?> get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $this->reference_container(); - // phpcs:enable + if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") { + echo $this->ReferenceContainer(); } - // Get setting for love and share this plugin. - $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); - // Check if the admin allows to add a link to the footer. - if ( empty( $l_str_love_me_index ) || 'no' === strtolower( $l_str_love_me_index ) || ! self::$a_bool_allow_love_me ) { + // get setting for love and share this plugin + $l_str_LoveMeIndex = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE); + // check if the admin allows to add a link to the footer + if (empty($l_str_LoveMeIndex) || strtolower($l_str_LoveMeIndex) == "no" || !self::$a_bool_AllowLoveMe) { return; } - // Set a hyperlink to the word "footnotes" in the Love slug. - $l_str_linked_name = sprintf( '%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ); - // Get random love me text. - if ( 'random' === strtolower( $l_str_love_me_index ) ) { - $l_str_love_me_index = 'text-' . wp_rand( 1, 7 ); + // set a hyperlink to the word "footnotes" in the Love slug + $l_str_LinkedName = sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME); + // get random love me text + if (strtolower($l_str_LoveMeIndex) == "random") { + $l_str_LoveMeIndex = "text-" . rand(1,7); } - switch ( $l_str_love_me_index ) { - // Options named wrt backcompat, simplest is default. - case 'text-1': - /* Translators: 2: Link to plugin page 1: Love heart symbol */ - $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); - break; - case 'text-2': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-4': - /* Translators: 1: Link to plugin page 2: Love heart symbol */ - $l_str_love_me_text = sprintf( '%1$s %2$s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); - break; - case 'text-5': - /* Translators: 1: Love heart symbol 2: Link to plugin page */ - $l_str_love_me_text = sprintf( '%1$s %2$s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); - break; - case 'text-6': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-7': - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); - break; - case 'text-3': - default: - /* Translators: %s: Link to plugin page */ - $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); - break; + switch ($l_str_LoveMeIndex) { + // options named wrt backcompat, simplest is default: + case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break; + case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break; + case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break; + case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break; } - echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( $l_str_love_me_text ) ); + echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', $l_str_LoveMeText); } /** * Replaces footnotes in the post/page title. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function the_title( $p_str_content ) { - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, false ); + public function the_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); } /** * Replaces footnotes in the content of the current page/post. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Page/Post content. + * @param string $p_str_Content Page/Post content. * @return string Content with replaced footnotes. */ public function the_content($p_str_Content) { - /** * Empties the footnotes list every time Footnotes is run when the_content hook is called. * @@ -1132,94 +1026,99 @@ class MCI_Footnotes_Task { /** * Replaces footnotes in the excerpt of the current page/post. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Page/Post content. + * @param string $p_str_Content Page/Post content. * @return string Content with replaced footnotes. */ - public function the_excerpt( $p_str_content ) { - return $this->exec( $p_str_content, false, ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT ) ) ); + public function the_excerpt($p_str_Content) { + return $this->exec($p_str_Content, false, !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT))); } /** * Replaces footnotes in the widget title. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function widget_title( $p_str_content ) { - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, false ); + public function widget_title($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, false); } /** * Replaces footnotes in the content of the current widget. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Widget content. + * @param string $p_str_Content Widget content. * @return string Content with replaced footnotes. */ - public function widget_text( $p_str_content ) { - // phpcs:disable WordPress.PHP.YodaConditions.NotYoda - // Appends the reference container if set to "post_end". - return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); - // phpcs:enable + public function widget_text($p_str_Content) { + // appends the reference container if set to "post_end" + return $this->exec($p_str_Content, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "post_end" ? true : false); } /** * Replaces footnotes in each Content var of the current Post object. * + * @author Stefan Herndler * @since 1.5.4 - * @param array|WP_Post $p_mixed_posts The current Post object. + * @param array|WP_Post $p_mixed_Posts */ - public function the_post( &$p_mixed_posts ) { - // Single WP_Post object received. - if ( ! is_array( $p_mixed_posts ) ) { - $p_mixed_posts = $this->replace_post_object( $p_mixed_posts ); + public function the_post(&$p_mixed_Posts) { + // single WP_Post object received + if (!is_array($p_mixed_Posts)) { + $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); return; } - $num_posts = count( $p_mixed_posts ); - // Array of WP_Post objects received. - for ( $l_int_index = 0; $l_int_index < $num_posts; $l_int_index++ ) { - $p_mixed_posts[ $l_int_index ] = $this->replace_post_object( $p_mixed_posts[ $l_int_index ] ); + // array of WP_Post objects received + for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { + $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); } } /** * Replace all Footnotes in a WP_Post object. * + * @author Stefan Herndler * @since 1.5.6 - * @param WP_Post $p_obj_post The Post object. + * @param WP_Post $p_obj_Post * @return WP_Post */ - private function replace_post_object( $p_obj_post ) { - $p_obj_post->post_content = $this->exec( $p_obj_post->post_content ); - $p_obj_post->post_content_filtered = $this->exec( $p_obj_post->post_content_filtered ); - $p_obj_post->post_excerpt = $this->exec( $p_obj_post->post_excerpt ); - return $p_obj_post; + private function replacePostObject($p_obj_Post) { + //MCI_Footnotes_Convert::debug($p_obj_Post); + $p_obj_Post->post_content = $this->exec($p_obj_Post->post_content); + $p_obj_Post->post_content_filtered = $this->exec($p_obj_Post->post_content_filtered); + $p_obj_Post->post_excerpt = $this->exec($p_obj_Post->post_excerpt); + return $p_obj_Post; } /** * Replaces all footnotes that occur in the given content. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Any string that may contain footnotes to be replaced. - * @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true. - * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. + * @param string $p_str_Content Any string that may contain footnotes to be replaced. + * @param bool $p_bool_OutputReferences Appends the Reference Container to the output if set to true, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. * @return string * + * * @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. */ - public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) { + public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { - // Replace all footnotes in the content, settings are converted to html characters. - $p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text ); - // Replace all footnotes in the content, settings are NOT converted to html characters. - $p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text ); + // replace all footnotes in the content, settings are converted to html characters + $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); + // replace all footnotes in the content, settings are NOT converted to html characters + $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); /** - * Reference container customized positioning through shortcode. + * Reference container customized positioning through shortcode * * - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. * @@ -1237,48 +1136,50 @@ class MCI_Footnotes_Task { * * @reporter @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 + * */ - // Append the reference container or insert at shortcode. - $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); - if ( empty( $l_str_reference_container_position_shortcode ) ) { - $l_str_reference_container_position_shortcode = '[[references]]'; + // append the reference container or insert at shortcode: + $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); + if ( empty( $l_str_ReferenceContainerPositionShortcode ) ) { + $l_str_ReferenceContainerPositionShortcode = '[[references]]'; } - if ( $p_bool_output_references ) { + if ( $p_bool_OutputReferences ) { - if ( strpos( $p_str_content, $l_str_reference_container_position_shortcode ) ) { + if ( strpos( $p_str_Content, $l_str_ReferenceContainerPositionShortcode ) !== false ) { - $p_str_content = str_replace( $l_str_reference_container_position_shortcode, $this->reference_container(), $p_str_content ); + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, $this->ReferenceContainer(), $p_str_Content ); } else { - $p_str_content .= $this->reference_container(); + $p_str_Content .= $this->ReferenceContainer(); } - // Increment the container ID. - self::$a_int_reference_container_id++; + // increment the container ID: + self::$a_int_ReferenceContainerId++; } - // Delete position shortcode should any remain. - $p_str_content = str_replace( $l_str_reference_container_position_shortcode, '', $p_str_content ); + // delete position shortcode should any remain: + $p_str_Content = str_replace( $l_str_ReferenceContainerPositionShortcode, '', $p_str_Content ); - // Take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found. - if ( strpos( $p_str_content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ) ) { - self::$a_bool_allow_love_me = false; - $p_str_content = str_replace( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, '', $p_str_content ); + // take a look if the LOVE ME slug should NOT be displayed on this page/post, remove the short code if found + if (strpos($p_str_Content, MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG) !== false) { + self::$a_bool_AllowLoveMe = false; + $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); } - // Return the content with replaced footnotes and optional reference container appended. - return $p_str_content; + // return the content with replaced footnotes and optional reference container appended: + return $p_str_Content; } /** * Replaces all footnotes in the given content and appends them to the static property. * + * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_content Content to be searched for footnotes. - * @param bool $p_bool_convert_html_chars html encode settings, default true. - * @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string. + * @param string $p_str_Content Content to be searched for footnotes. + * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. + * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. * @return string * * @since 2.0.0 various. @@ -1287,37 +1188,37 @@ class MCI_Footnotes_Task { * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. * @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. */ - public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) { + public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { - // Post ID to make everything unique wrt infinite scroll and archive view. - self::$a_int_post_id = get_the_id(); + // post ID to make everything unique wrt infinite scroll and archive view + self::$a_int_PostId = get_the_id(); - // Contains the index for the next footnote on this page. - $l_int_footnote_index = count( self::$a_arr_footnotes ) + 1; + // contains the index for the next footnote on this page + $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; - // Contains the starting position for the lookup of a footnote. - $l_int_pos_start = 0; + // contains the starting position for the lookup of a footnote + $l_int_PosStart = 0; - // Get start and end tag for the footnotes short code. - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); } - // Decode html special chars. - if ( $p_bool_convert_html_chars ) { - $l_str_starting_tag = htmlspecialchars( $l_str_starting_tag ); - $l_str_ending_tag = htmlspecialchars( $l_str_ending_tag ); + // decode html special chars + if ($p_bool_ConvertHtmlChars) { + $l_str_StartingTag = htmlspecialchars($l_str_StartingTag); + $l_str_EndingTag = htmlspecialchars($l_str_EndingTag); } - // If footnotes short code is empty, return the content without changes. - if ( empty( $l_str_starting_tag ) || empty( $l_str_ending_tag ) ) { - return $p_str_content; + // if footnotes short code is empty, return the content without changes + if (empty($l_str_StartingTag) || empty($l_str_EndingTag)) { + return $p_str_Content; } /** - * Footnote delimiter syntax validation. + * Footnote delimiter syntax validation * * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * @@ -1338,74 +1239,74 @@ class MCI_Footnotes_Task { * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) { - // Make shortcodes conform to regex syntax. - $l_str_start_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_starting_tag ); - $l_str_end_tag_regex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_ending_tag ); + // make shortcodes conform to regex syntax: + $l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag ); + $l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag ); - // Apply different regex depending on whether start shortcode is double/triple opening parenthesis. - if ( '((' === $l_str_starting_tag || '(((' === $l_str_starting_tag ) { + // apply different regex depending on whether start shortcode is double/triple opening parenthesis: + if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) { - // This prevents from catching a script containing e.g. a double opening parenthesis. - $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ')[^\{\}])*?)(' . $l_str_start_tag_regex . '|$)#s'; + // this prevents from catching a script containing e.g. a double opening parenthesis: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s'; } else { - // Catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts. - $l_str_validation_regex = '#' . $l_str_start_tag_regex . '(((?!' . $l_str_end_tag_regex . ').)*?)(' . $l_str_start_tag_regex . '|$)#s'; + // catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts: + $l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s'; } - // Check syntax and get error locations. - preg_match( $l_str_validation_regex, $p_str_content, $p_arr_error_location ); - if ( empty( $p_arr_error_location ) ) { - self::$a_bool_syntax_error_flag = false; + // check syntax and get error locations: + preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation ); + if ( empty( $p_arr_ErrorLocation ) ) { + self::$a_bool_SyntaxErrorFlag = false; } - // Prevent generating and inserting the warning multiple times. - if ( self::$a_bool_syntax_error_flag ) { + // prevent generating and inserting the warning multiple times: + if ( self::$a_bool_SyntaxErrorFlag ) { - // Get plain text string for error location. - $l_str_error_spot_string = wp_strip_all_tags( $p_arr_error_location[1] ); + // get plain text string for error location: + $l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] ); - // Limit string length to 300 characters. - if ( strlen( $l_str_error_spot_string ) > 300 ) { - $l_str_error_spot_string = substr( $l_str_error_spot_string, 0, 299 ) . '…'; + // limit string length to 300 characters: + if ( strlen( $l_str_ErrorSpotString ) > 300 ) { + $l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…'; } - // Compose warning box. - $l_str_syntax_error_warning = '

                                                                                                                                                                      '; - $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); - $l_str_syntax_error_warning .= '

                                                                                                                                                                      '; + // compose warning box: + $l_str_SyntaxErrorWarning = '

                                                                                                                                                                      '; + $l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; - // Syntax validation setting in the dashboard under the General settings tab. - /* Translators: 1: General Settings 2: Footnote start and end short codes 3: Check for balanced shortcodes */ - $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); + // syntax validation setting in the dashboard under the General settings tab: + $l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s > %s > %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); - $l_str_syntax_error_warning .= '

                                                                                                                                                                      '; - $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); - $l_str_syntax_error_warning .= '

                                                                                                                                                                      “'; - $l_str_syntax_error_warning .= $l_str_error_spot_string; - $l_str_syntax_error_warning .= '”

                                                                                                                                                                      '; + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      '; + $l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME); + $l_str_SyntaxErrorWarning .= '

                                                                                                                                                                      “'; + $l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString; + $l_str_SyntaxErrorWarning .= '”

                                                                                                                                                                      '; - // Prepend the warning box to the content. - $p_str_content = $l_str_syntax_error_warning . $p_str_content; + // prepend the warning box to the content: + $p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content; - // Checked, set flag to false to prevent duplicate warning. - self::$a_bool_syntax_error_flag = false; + // checked, set flag to false to prevent duplicate warning: + self::$a_bool_SyntaxErrorFlag = false; - return $p_str_content; + return $p_str_Content; } } - // Load referrer templates if footnotes text not hidden. - if ( ! $p_bool_hide_footnotes_text ) { - // Load footnote referrer template file. - if ( self::$a_bool_alternative_tooltips_enabled ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote-alternative' ); + // load referrer templates if footnotes text not hidden: + if (!$p_bool_HideFootnotesText) { + + // load footnote referrer template file: + if (self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); } else { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'footnote' ); + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); } /** @@ -1414,57 +1315,56 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. * * @since 2.5.4 - * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_the_content_priority) + * @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority) */ - self::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) ); - self::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) ); + self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)); + self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)); - // Load tooltip inline script if jQuery tooltips are enabled. - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { - $l_obj_template_tooltip = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'tooltip' ); + // load tooltip inline script if jQuery tooltips are enabled: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { + $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); } + } else { - $l_obj_template = null; - $l_obj_template_tooltip = null; + $l_obj_Template = null; + $l_obj_TemplateTooltip = null; } - // Search footnotes short codes in the content. + // search footnotes short codes in the content do { - // Get first occurrence of the footnote start tag short code. - $i_int_len_content = strlen( $p_str_content ); - if ( $l_int_pos_start > $i_int_len_content ) { - $l_int_pos_start = $i_int_len_content; - } - $l_int_pos_start = strpos( $p_str_content, $l_str_starting_tag, $l_int_pos_start ); - // No short code found, stop here. - if ( ! $l_int_pos_start ) { + // get first occurrence of the footnote start tag short code: + $i_int_LenContent = strlen($p_str_Content); + if ($l_int_PosStart > $i_int_LenContent) $l_int_PosStart = $i_int_LenContent; + $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosStart === false) { break; } - // Get first occurrence of the footnote end tag short code. - $l_int_pos_end = strpos( $p_str_content, $l_str_ending_tag, $l_int_pos_start ); - // No short code found, stop here. - if ( ! $l_int_pos_end ) { + // get first occurrence of the footnote end tag short code: + $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); + // no short code found, stop here + if ($l_int_PosEnd === false) { break; } - // Calculate the length of the footnote. - $l_int_length = $l_int_pos_end - $l_int_pos_start; + // calculate the length of the footnote + $l_int_Length = $l_int_PosEnd - $l_int_PosStart; - // Get footnote text. - $l_str_footnote_text = substr( $p_str_content, $l_int_pos_start + strlen( $l_str_starting_tag ), $l_int_length - strlen( $l_str_starting_tag ) ); + // get footnote text + $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); - // Get tooltip text if present. - self::$a_str_tooltip_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER ); - self::$a_int_tooltip_shortcode_length = strlen( self::$a_str_tooltip_shortcode ); - $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); - $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; - if ( $l_bool_has_tooltip_text ) { - $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); + // get tooltip text if present: + self::$a_str_TooltipShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER); + self::$a_int_TooltipShortcodeLength = strlen( self::$a_str_TooltipShortcode ); + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); } else { - $l_str_tooltip_text = ''; + $l_str_TooltipText = ''; } /** - * URL line wrapping for Unicode non conformant browsers. + * URL line wrapping for Unicode non conformant browsers * * @since 2.1.1 (CSS) * @since 2.1.4 (PHP) @@ -1557,6 +1457,7 @@ class MCI_Footnotes_Task { * @reporter @bernardzit * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * + * * @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * @date 2020-12-23T1107+0100 * @@ -1597,48 +1498,48 @@ class MCI_Footnotes_Task { * Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces. * But given they can occur on WP-powered websites, some page builders may probably not. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) { - $l_str_footnote_text = preg_replace( + $l_str_FootnoteText = preg_replace( '#(?$1', - $l_str_footnote_text + $l_str_FootnoteText ); } - // Text to be displayed instead of the footnote. - $l_str_footnote_replace_text = ''; + // Text to be displayed instead of the footnote + $l_str_FootnoteReplaceText = ""; - // Whether hard links are enabled. - if ( self::$a_bool_hard_links_enable ) { + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { - // Get the configurable parts. - self::$a_str_referrer_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG ); - self::$a_str_footnote_link_slug = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ); - self::$a_str_link_ids_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR ); + // get the configurable parts: + self::$a_str_ReferrerLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERRER_FRAGMENT_ID_SLUG); + self::$a_str_FootnoteLinkSlug = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG); + self::$a_str_LinkIdsSeparator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HARD_LINK_IDS_SEPARATOR); - // Streamline ID concatenation. - self::$a_str_post_container_id_compound = self::$a_str_link_ids_separator; - self::$a_str_post_container_id_compound .= self::$a_int_post_id; - self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; - self::$a_str_post_container_id_compound .= self::$a_int_reference_container_id; - self::$a_str_post_container_id_compound .= self::$a_str_link_ids_separator; + // streamline ID concatenation: + self::$a_str_PostContainerIdCompound = self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_PostId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; + self::$a_str_PostContainerIdCompound .= self::$a_int_ReferenceContainerId; + self::$a_str_PostContainerIdCompound .= self::$a_str_LinkIdsSeparator; } - // Display the footnote referrers and the tooltips. - if ( ! $p_bool_hide_footnotes_text ) { - $l_int_index = MCI_Footnotes_Convert::index( $l_int_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // display the footnote referrers and the tooltips: + if (!$p_bool_HideFootnotesText) { + $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - // Display only a truncated footnote text if option enabled. - $l_bool_enable_excerpt = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED ) ); - $l_int_max_length = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH ) ); + // display only a truncated footnote text if option enabled: + $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); + $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); - // Define excerpt text as footnote text by default. - $l_str_excerpt_text = $l_str_footnote_text; + // define excerpt text as footnote text by default: + $l_str_ExcerptText = $l_str_FootnoteText; /** - * Tooltip truncation. + * Tooltip truncation * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1653,34 +1554,34 @@ class MCI_Footnotes_Task { * This is equivalent to the WordPress default excerpt generation, i.e. without a * custom excerpt and without a delimiter. But WordPress does word count, usually 55. */ - if ( self::$a_bool_tooltips_enabled && $l_bool_enable_excerpt ) { - $l_str_dummy_text = wp_strip_all_tags( $l_str_footnote_text ); - if ( is_int( $l_int_max_length ) && strlen( $l_str_dummy_text ) > $l_int_max_length ) { - $l_str_excerpt_text = substr( $l_str_dummy_text, 0, $l_int_max_length ); - $l_str_excerpt_text = substr( $l_str_excerpt_text, 0, strrpos( $l_str_excerpt_text, ' ' ) ); - $l_str_excerpt_text .= ' … <'; - $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? 'a' : 'span'; - $l_str_excerpt_text .= ' class="footnote_tooltip_continue" '; - $l_str_excerpt_text .= 'onclick="footnote_move_to_anchor_' . self::$a_int_post_id; - $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; - $l_str_excerpt_text .= '(\'footnote_plugin_reference_' . self::$a_int_post_id; - $l_str_excerpt_text .= '_' . self::$a_int_reference_container_id; - $l_str_excerpt_text .= "_$l_int_index');\""; + if (self::$a_bool_TooltipsEnabled && $l_bool_EnableExcerpt) { + $l_str_DummyText = strip_tags($l_str_FootnoteText); + if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { + $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); + $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); + $l_str_ExcerptText .= ' … <'; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? 'a' : 'span'; + $l_str_ExcerptText .= ' class="footnote_tooltip_continue" '; + $l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= '(\'footnote_plugin_reference_' . self::$a_int_PostId; + $l_str_ExcerptText .= '_' . self::$a_int_ReferenceContainerId; + $l_str_ExcerptText .= "_$l_int_Index');\""; - // If enabled, add the hard link fragment ID. - if ( self::$a_bool_hard_links_enable ) { + // if enabled, add the hard link fragment ID: + if (self::$a_bool_HardLinksEnable) { - $l_str_excerpt_text .= ' href="#'; - $l_str_excerpt_text .= self::$a_str_footnote_link_slug; - $l_str_excerpt_text .= self::$a_str_post_container_id_compound; - $l_str_excerpt_text .= $l_int_index; - $l_str_excerpt_text .= '"'; + $l_str_ExcerptText .= ' href="#'; + $l_str_ExcerptText .= self::$a_str_FootnoteLinkSlug; + $l_str_ExcerptText .= self::$a_str_PostContainerIdCompound; + $l_str_ExcerptText .= $l_int_Index; + $l_str_ExcerptText .= '"'; } - $l_str_excerpt_text .= '>'; + $l_str_ExcerptText .= '>'; /** - * Configurable read-on button label. + * Configurable read-on button label * * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @@ -1690,56 +1591,55 @@ class MCI_Footnotes_Task { * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ */ - $l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); + $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); - $l_str_excerpt_text .= self::$a_bool_hard_links_enable ? '' : ''; + $l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '' : ''; } } /** - * Referrers element superscript or baseline. + * Referrers element superscript or baseline * * Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report - * * @since 2.1.1 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * - * define the HTML element to use for the referrers. + * define the HTML element to use for the referrers: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { - $l_str_sup_span = 'sup'; + $l_str_SupSpan = 'sup'; } else { - $l_str_sup_span = 'span'; + $l_str_SupSpan = 'span'; } - // Whether hard links are enabled. - if ( self::$a_bool_hard_links_enable ) { + // whether hard links are enabled: + if (self::$a_bool_HardLinksEnable) { - self::$a_str_link_span = 'a'; - self::$a_str_link_close_tag = ''; - // Self::$a_str_link_open_tag will be defined as needed. + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkCloseTag = ''; + // self::$a_str_LinkOpenTag will be defined as needed - // Compose hyperlink address (leading space is in template). - $l_str_footnote_link_argument = 'href="#'; - $l_str_footnote_link_argument .= self::$a_str_footnote_link_slug; - $l_str_footnote_link_argument .= self::$a_str_post_container_id_compound; - $l_str_footnote_link_argument .= $l_int_index; - $l_str_footnote_link_argument .= '" class="footnote_hard_link"'; + // compose hyperlink address (leading space is in template): + $l_str_FootnoteLinkArgument = 'href="#'; + $l_str_FootnoteLinkArgument .= self::$a_str_FootnoteLinkSlug; + $l_str_FootnoteLinkArgument .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteLinkArgument .= $l_int_Index; + $l_str_FootnoteLinkArgument .= '" class="footnote_hard_link"'; /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_referrer_anchor_element = ''; + $l_str_ReferrerAnchorElement = ''; } else { @@ -1756,101 +1656,101 @@ class MCI_Footnotes_Task { * * If no hyperlink nor offset anchor is needed, initialize as empty. */ - $l_str_footnote_link_argument = ''; - $l_str_referrer_anchor_element = ''; + $l_str_FootnoteLinkArgument = ''; + $l_str_ReferrerAnchorElement = ''; - // The link element is set independently as it may be needed for styling. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED ) ) ) { + // The link element is set independently as it may be needed for styling: + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) { - self::$a_str_link_span = 'a'; - self::$a_str_link_open_tag = ''; - self::$a_str_link_close_tag = ''; + self::$a_str_LinkSpan = 'a'; + self::$a_str_LinkOpenTag = ''; + self::$a_str_LinkCloseTag = ''; } } - // Determine tooltip content. - if ( self::$a_bool_tooltips_enabled ) { - $l_str_tooltip_content = $l_bool_has_tooltip_text ? $l_str_tooltip_text : $l_str_excerpt_text; + // determine tooltip content: + if ( self::$a_bool_TooltipsEnabled ) { + $l_str_TooltipContent = $l_bool_HasTooltipText ? $l_str_TooltipText : $l_str_ExcerptText; } else { - $l_str_tooltip_content = ''; + $l_str_TooltipContent = ''; } - + /** * Determine shrink width if alternative tooltips are enabled. - * + * * @since 2.5.6 */ - $l_str_tooltip_style = ''; - if ( self::$a_bool_alternative_tooltips_enabled && self::$a_bool_tooltips_enabled ) { - $l_int_tooltip_length = strlen( wp_strip_all_tags( $l_str_tooltip_content ) ); - if ( $l_int_tooltip_length < 70 ) { - $l_str_tooltip_style = ' style="width: '; - $l_str_tooltip_style .= ( $l_int_tooltip_length * .7 ); - $l_str_tooltip_style .= 'em;"'; + $l_str_TooltipStyle = ''; + if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) { + $l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) ); + if ( $l_int_TooltipLength < 70 ) { + $l_str_TooltipStyle = ' style="width: '; + $l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 ); + $l_str_TooltipStyle .= 'em;"'; } } - // Fill in 'templates/public/footnote.html'. - $l_obj_template->replace( + // fill in 'templates/public/footnote.html': + $l_obj_Template->replace( array( - 'link-span' => self::$a_str_link_span, - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => $l_int_index, - 'hard-link' => $l_str_footnote_link_argument, - 'sup-span' => $l_str_sup_span, - 'before' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), - 'index' => $l_int_index, - 'after' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), - 'anchor-element' => $l_str_referrer_anchor_element, - 'style' => $l_str_tooltip_style, - 'text' => $l_str_tooltip_content, + "link-span" => self::$a_str_LinkSpan, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "hard-link" => $l_str_FootnoteLinkArgument, + "sup-span" => $l_str_SupSpan, + "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), + "index" => $l_int_Index, + "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), + "anchor-element" => $l_str_ReferrerAnchorElement, + "style" => $l_str_TooltipStyle, + "text" => $l_str_TooltipContent, ) ); - $l_str_footnote_replace_text = $l_obj_template->get_content(); + $l_str_FootnoteReplaceText = $l_obj_Template->getContent(); - // Reset the template. - $l_obj_template->reload(); + // reset the template + $l_obj_Template->reload(); - // If standard tooltips are enabled but alternative are not. - if ( self::$a_bool_tooltips_enabled && ! self::$a_bool_alternative_tooltips_enabled ) { + // if standard tooltips are enabled but alternative are not: + if (self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled) { - $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y ) ); - $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X ) ); - $l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) ); - $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); - $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); - $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); + $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); + $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); + $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); + $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); + $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); + $l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION)); - // Fill in 'templates/public/tooltip.html'. - $l_obj_template_tooltip->replace( + // fill in 'templates/public/tooltip.html': + $l_obj_TemplateTooltip->replace( array( - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => $l_int_index, - 'position' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION ), - 'offset-y' => ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0, - 'offset-x' => ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0, - 'fade-in-delay' => ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : 0, - 'fade-in-duration' => ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : 0, - 'fade-out-delay' => ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : 0, - 'fade-out-duration' => ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : 0, + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), + "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, + "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, + "fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0, + "fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0, + "fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0, + "fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0, ) ); - $l_str_footnote_replace_text .= $l_obj_template_tooltip->get_content(); - $l_obj_template_tooltip->reload(); + $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + $l_obj_TemplateTooltip->reload(); } } - // Replace the footnote with the template. - $p_str_content = substr_replace( $p_str_content, $l_str_footnote_replace_text, $l_int_pos_start, $l_int_length + strlen( $l_str_ending_tag ) ); + // replace the footnote with the template + $p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag)); - // Add footnote only if not empty. - if ( ! empty( $l_str_footnote_text ) ) { - // Set footnote to the output box at the end. - self::$a_arr_footnotes[] = $l_str_footnote_text; - // Increase footnote index. - $l_int_footnote_index++; + // add footnote only if not empty + if (!empty($l_str_FootnoteText)) { + // set footnote to the output box at the end + self::$a_arr_Footnotes[] = $l_str_FootnoteText; + // increase footnote index + $l_int_FootnoteIndex++; } /** @@ -1885,18 +1785,19 @@ class MCI_Footnotes_Task { * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. */ - // Add offset to the new starting position. - $l_int_pos_start += $l_int_length + strlen( $l_str_ending_tag ); + // add offset to the new starting position + $l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag); - } while ( true ); + } while (true); - // Return content. - return $p_str_content; + // return content + return $p_str_Content; } /** * Generates the reference container. * + * @author Stefan Herndler * @since 1.5.0 * @return string * @@ -1907,15 +1808,16 @@ class MCI_Footnotes_Task { * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. */ - public function reference_container() { + public function ReferenceContainer() { - // No footnotes have been replaced on this page. - if ( empty( self::$a_arr_footnotes ) ) { - return ''; + // no footnotes have been replaced on this page: + if (empty(self::$a_arr_Footnotes)) { + return ""; } + /** - * Footnote index backlink symbol. + * Footnote index backlink symbol * * - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. * @@ -1924,36 +1826,37 @@ class MCI_Footnotes_Task { * @reporter @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * - * If the backlink symbol is enabled. + * If the backlink symbol is enabled: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { - // Get html arrow. - $l_str_arrow = MCI_Footnotes_Convert::get_arrow( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW ) ); - // Set html arrow to the first one if invalid index defined. - if ( is_array( $l_str_arrow ) ) { - $l_str_arrow = MCI_Footnotes_Convert::get_arrow( 0 ); + // get html arrow + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW)); + // set html arrow to the first one if invalid index defined + if (is_array($l_str_Arrow)) { + $l_str_Arrow = MCI_Footnotes_Convert::getArrow(0); } - // Get user defined arrow. - $l_str_arrow_user_defined = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED ); - if ( ! empty( $l_str_arrow_user_defined ) ) { - $l_str_arrow = $l_str_arrow_user_defined; + // get user defined arrow + $l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED); + if (!empty($l_str_ArrowUserDefined)) { + $l_str_Arrow = $l_str_ArrowUserDefined; } - // Wrap the arrow in a @media print { display:hidden } span. - $l_str_footnote_arrow = ''; - $l_str_footnote_arrow .= $l_str_arrow . ''; + // wrap the arrow in a @media print { display:hidden } span: + $l_str_FootnoteArrow = ''; + $l_str_FootnoteArrow .= $l_str_Arrow . ''; } else { - // If the backlink symbol isn’t enabled, set it to empty. - $l_str_arrow = ''; - $l_str_footnote_arrow = ''; + // If the backlink symbol isn’t enabled, set it to empty: + $l_str_Arrow = ''; + $l_str_FootnoteArrow = ''; } + /** - * Backlink separator. + * Backlink separator * * - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. * @@ -1969,69 +1872,59 @@ class MCI_Footnotes_Task { * Initially a comma was appended in this algorithm for enumerations. * The comma in enumerations is not generally preferred. */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) { - // Check if it is input-configured. - $l_str_separator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM ); + // check if it is input-configured: + $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); - if ( empty( $l_str_separator ) ) { + if (empty($l_str_Separator)) { - // If it is not, check which option is on. - $l_str_separator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION ); - switch ( $l_str_separator_option ) { - case 'comma': - $l_str_separator = ','; - break; - case 'semicolon': - $l_str_separator = ';'; - break; - case 'en_dash': - $l_str_separator = ' –'; - break; + // if it is not, check which option is on: + $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); + switch ($l_str_SeparatorOption) { + case 'comma' : $l_str_Separator = ','; break; + case 'semicolon': $l_str_Separator = ';'; break; + case 'en_dash' : $l_str_Separator = ' –'; break; } } + } else { - $l_str_separator = ''; + $l_str_Separator = ''; } /** - * Backlink terminator. + * Backlink terminator * * Initially a dot was appended in the table row template. - * * @since 2.0.6 a dot after footnote numbers is discarded as not localizable; * making it optional was envisaged. - * @since 2.1.4 the terminator is optional, has options, and is configurable. + * @since 2.1.4 the terminator is optional, has options, and is configurable: */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_ENABLED ) ) ) { + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) { - // Check if it is input-configured. - $l_str_terminator = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM ); + // check if it is input-configured: + $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); - if ( empty( $l_str_terminator ) ) { + if (empty($l_str_Terminator)) { - // If it is not, check which option is on. - $l_str_terminator_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION ); - switch ( $l_str_terminator_option ) { - case 'period': - $l_str_terminator = '.'; - break; - case 'parenthesis': - $l_str_terminator = ')'; - break; - case 'colon': - $l_str_terminator = ':'; - break; + // if it is not, check which option is on: + $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); + switch ($l_str_TerminatorOption) { + case 'period' : $l_str_Terminator = '.'; break; + case 'parenthesis': $l_str_Terminator = ')'; break; + case 'colon' : $l_str_Terminator = ':'; break; } } + } else { - $l_str_terminator = ''; + $l_str_Terminator = ''; } + /** - * Line breaks. + * Line breaks * * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * @@ -2043,19 +1936,18 @@ class MCI_Footnotes_Task { * Variable number length and proportional character width require explicit line breaks. * Otherwise, an ordinary space character offering a line break opportunity is inserted. */ - $l_str_line_break = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED ) ) ? '
                                                                                                                                                                      ' : ' '; + $l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '
                                                                                                                                                                      ' : ' '; /** - * Line breaks for source readability. - * * For maintenance and support, table rows in the reference container should be * separated by an empty line. So we add these line breaks for source readability. - * Before the first table row (breaks between rows are ~200 lines below). + * Before the first table row (breaks between rows are ~200 lines below): */ - $l_str_body = "\r\n\r\n"; + $l_str_Body = "\r\n\r\n"; + /** - * Reference container table row template load. + * Reference container table row template load * * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * @@ -2063,34 +1955,34 @@ class MCI_Footnotes_Task { * @date 2020-11-16T2024+0100 */ - // When combining identical footnotes is turned on, another template is needed. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { - // The combining template allows for backlink clusters and supports cell clicking for single notes. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-combi' ); + // when combining identical footnotes is turned on, another template is needed: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { + // the combining template allows for backlink clusters and supports cell clicking for single notes: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); } else { - // When 3-column layout is turned on (only available if combining is turned off). - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE ) ) ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-3column' ); + // when 3-column layout is turned on (only available if combining is turned off): + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); } else { - // When switch symbol and index is turned on, and combining and 3-columns are off. - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ) ) { - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body-switch' ); + // when switch symbol and index is turned on, and combining and 3-columns are off: + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); } else { - // Default is the standard template. - $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_PUBLIC, 'reference-container-body' ); + // default is the standard template: + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body"); } } } /** - * Switch backlink symbol and footnote number. + * Switch backlink symbol and footnote number * * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * @@ -2106,37 +1998,36 @@ class MCI_Footnotes_Task { * @since 2.1.4 * @date 2020-11-26T1633+0100 */ - $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); + $l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH)); - // Loop through all footnotes found in the page. - $num_footnotes = count( self::$a_arr_footnotes ); - for ( $l_int_index = 0; $l_int_index < $num_footnotes; $l_int_index++ ) { + // loop through all footnotes found in the page + for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) { - // Get footnote text. - $l_str_footnote_text = self::$a_arr_footnotes[ $l_int_index ]; + // get footnote text + $l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index]; - // If footnote is empty, go to the next one;. - // With combine identicals turned on, identicals will be deleted and are skipped. - if ( empty( $l_str_footnote_text ) ) { + // if footnote is empty, go to the next one; + // With combine identicals turned on, identicals will be deleted and are skipped: + if (empty($l_str_FootnoteText)) { continue; } - // Generate content of footnote index cell. - $l_int_first_footnote_index = ( $l_int_index + 1 ); + // generate content of footnote index cell + $l_int_FirstFootnoteIndex = ($l_int_Index + 1); - // Get the footnote index string and. - // Keep supporting legacy index placeholder. - $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // get the footnote index string and + // keep supporting legacy index placeholder: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); /** - * Case of only one backlink per table row. + * Case of only one backlink per table row * - * If enabled, and for the case the footnote is single, compose hard link. + * If enabled, and for the case the footnote is single, compose hard link: */ - // Define anyway. - $l_str_hard_link_address = ''; + // define anyway: + $l_str_HardLinkAddress = ''; - if ( self::$a_bool_hard_links_enable ) { + if (self::$a_bool_HardLinksEnable) { /** * Use-Backbutton-Hint tooltip, optional and configurable. @@ -2152,42 +2043,43 @@ class MCI_Footnotes_Task { * 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 */ - if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { - $l_str_use_backbutton_hint = ' title="'; - $l_str_use_backbutton_hint .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ); - $l_str_use_backbutton_hint .= '"'; + if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE ) ) ) { + $l_str_UseBackbuttonHint = ' title="'; + $l_str_UseBackbuttonHint .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT); + $l_str_UseBackbuttonHint .= '"'; } else { - $l_str_use_backbutton_hint = ''; + $l_str_UseBackbuttonHint = ''; } /** * Compose fragment ID anchor with offset, for use in reference container. * Empty span, child of empty span, to avoid tall dotted rectangles in browser. */ - $l_str_footnote_anchor_element = ''; + $l_str_FootnoteAnchorElement = ''; - // Compose optional hard link address. - $l_str_hard_link_address = ' href="#'; - $l_str_hard_link_address .= self::$a_str_referrer_link_slug; - $l_str_hard_link_address .= self::$a_str_post_container_id_compound; - $l_str_hard_link_address .= $l_str_footnote_id . '"'; - $l_str_hard_link_address .= $l_str_use_backbutton_hint; + // compose optional hard link address: + $l_str_HardLinkAddress = ' href="#'; + $l_str_HardLinkAddress .= self::$a_str_ReferrerLinkSlug; + $l_str_HardLinkAddress .= self::$a_str_PostContainerIdCompound; + $l_str_HardLinkAddress .= $l_str_FootnoteId . '"'; + $l_str_HardLinkAddress .= $l_str_UseBackbuttonHint; - // Compose optional opening link tag with optional hard link, mandatory for instance. - self::$a_str_link_open_tag = 'get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ) ) { + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { - // ID, optional hard link address, and class. - $l_str_footnote_reference = '<' . self::$a_str_link_span; - $l_str_footnote_reference .= ' id="footnote_plugin_reference_'; - $l_str_footnote_reference .= self::$a_int_post_id; - $l_str_footnote_reference .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_reference .= "_$l_str_footnote_id\""; - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_reference .= ' href="#'; - $l_str_footnote_reference .= self::$a_str_referrer_link_slug; - $l_str_footnote_reference .= self::$a_str_post_container_id_compound; - $l_str_footnote_reference .= $l_str_footnote_id . '"'; - $l_str_footnote_reference .= $l_str_use_backbutton_hint; + // ID, optional hard link address, and class: + $l_str_FootnoteReference = '<' . self::$a_str_LinkSpan; + $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteReference .= self::$a_int_PostId; + $l_str_FootnoteReference .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= ' href="#'; + $l_str_FootnoteReference .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteReference .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteReference .= $l_str_FootnoteId . '"'; + $l_str_FootnoteReference .= $l_str_UseBackbuttonHint; } - $l_str_footnote_reference .= ' class="footnote_backlink"'; + $l_str_FootnoteReference .= ' class="footnote_backlink"'; - // The click event goes in the table cell if footnote remains single. - $l_str_backlink_event = ' onclick="footnote_move_to_anchor_'; - $l_str_backlink_event .= self::$a_int_post_id; - $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; - $l_str_backlink_event .= "('footnote_plugin_tooltip_"; - $l_str_backlink_event .= self::$a_int_post_id; - $l_str_backlink_event .= '_' . self::$a_int_reference_container_id; - $l_str_backlink_event .= "_$l_str_footnote_id');\""; + // the click event goes in the table cell if footnote remains single: + $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; + $l_str_BacklinkEvent .= self::$a_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$a_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; - // The dedicated template enumerating backlinks uses another variable. - $l_str_footnote_backlinks = $l_str_footnote_reference; - // Append the click event right to the backlink item for enumerations;. - // Else it goes in the table cell. - $l_str_footnote_backlinks .= $l_str_backlink_event . '>'; - $l_str_footnote_reference .= '>'; + // the dedicated template enumerating backlinks uses another variable: + $l_str_FootnoteBacklinks = $l_str_FootnoteReference; - // Append the optional offset anchor for hard links. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_reference .= $l_str_footnote_anchor_element; - $l_str_footnote_backlinks .= $l_str_footnote_anchor_element; + // append the click event right to the backlink item for enumerations; + // else it goes in the table cell: + $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent . '>'; + $l_str_FootnoteReference .= '>'; + + // append the optional offset anchor for hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteReference .= $l_str_FootnoteAnchorElement; + $l_str_FootnoteBacklinks .= $l_str_FootnoteAnchorElement; } - // Continue both single note and notes cluster, depending on switch option status. - if ( $l_bool_symbol_switch ) { + // continue both single note and notes cluster, depending on switch option status: + if ($l_bool_SymbolSwitch) { - $l_str_footnote_reference .= "$l_str_footnote_id$l_str_footnote_arrow"; - $l_str_footnote_backlinks .= "$l_str_footnote_id$l_str_footnote_arrow"; + $l_str_FootnoteReference .= "$l_str_FootnoteId$l_str_FootnoteArrow"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteId$l_str_FootnoteArrow"; } else { - $l_str_footnote_reference .= "$l_str_footnote_arrow$l_str_footnote_id"; - $l_str_footnote_backlinks .= "$l_str_footnote_arrow$l_str_footnote_id"; + $l_str_FootnoteReference .= "$l_str_FootnoteArrow$l_str_FootnoteId"; + $l_str_FootnoteBacklinks .= "$l_str_FootnoteArrow$l_str_FootnoteId"; } - // If that is the only footnote with this text, we’re almost done.. + // If that is the only footnote with this text, we’re almost done. - // Check if it isn't the last footnote in the array. - if ( $l_int_first_footnote_index < count( self::$a_arr_footnotes ) ) { + // check if it isn't the last footnote in the array: + if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) { - // Get all footnotes that haven't passed yet. - $num_footnotes = count( self::$a_arr_footnotes ); - for ( $l_int_check_index = $l_int_first_footnote_index; $l_int_check_index < $num_footnotes; $l_int_check_index++ ) { + // get all footnotes that haven't passed yet: + for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { - // Check if a further footnote is the same as the actual one. - if ( self::$a_arr_footnotes[ $l_int_check_index ] === $l_str_footnote_text ) { + // check if a further footnote is the same as the actual one: + if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { - // If so, set the further footnote as empty so it won't be displayed later. - self::$a_arr_footnotes[ $l_int_check_index ] = ''; + // if so, set the further footnote as empty so it won't be displayed later: + self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; - // Set the flag to true for the combined status. - $l_bool_flag_combined = true; + // set the flag to true for the combined status: + $l_bool_FlagCombined = true; - // Update the footnote ID. - $l_str_footnote_id = MCI_Footnotes_Convert::index( ( $l_int_check_index + 1 ), MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ); + // update the footnote ID: + $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - // Resume composing the backlinks enumeration. - $l_str_footnote_backlinks .= "$l_str_separator'; - $l_str_footnote_backlinks .= $l_str_line_break; - $l_str_footnote_backlinks .= '<' . self::$a_str_link_span; - $l_str_footnote_backlinks .= ' id="footnote_plugin_reference_'; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "_$l_str_footnote_id\""; + // resume composing the backlinks enumeration: + $l_str_FootnoteBacklinks .= "$l_str_Separator'; + $l_str_FootnoteBacklinks .= $l_str_LineBreak; + $l_str_FootnoteBacklinks .= '<' . self::$a_str_LinkSpan; + $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\""; - // Insert the optional hard link address. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_backlinks .= ' href="#'; - $l_str_footnote_backlinks .= self::$a_str_referrer_link_slug; - $l_str_footnote_backlinks .= self::$a_str_post_container_id_compound; - $l_str_footnote_backlinks .= $l_str_footnote_id . '"'; - $l_str_footnote_backlinks .= $l_str_use_backbutton_hint; + // insert the optional hard link address: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ' href="#'; + $l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug; + $l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"'; + $l_str_FootnoteBacklinks .= $l_str_UseBackbuttonHint; } - $l_str_footnote_backlinks .= ' class="footnote_backlink"'; - $l_str_footnote_backlinks .= ' onclick="footnote_move_to_anchor_'; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "('footnote_plugin_tooltip_"; - $l_str_footnote_backlinks .= self::$a_int_post_id; - $l_str_footnote_backlinks .= '_' . self::$a_int_reference_container_id; - $l_str_footnote_backlinks .= "_$l_str_footnote_id');\">"; + $l_str_FootnoteBacklinks .= ' class="footnote_backlink"'; + $l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_'; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; + $l_str_FootnoteBacklinks .= self::$a_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; - // Append the offset anchor for optional hard links. - if ( self::$a_bool_hard_links_enable ) { - $l_str_footnote_backlinks .= ''; + // append the offset anchor for optional hard links: + if (self::$a_bool_HardLinksEnable) { + $l_str_FootnoteBacklinks .= ''; } - $l_str_footnote_backlinks .= $l_bool_symbol_switch ? '' : $l_str_footnote_arrow; - $l_str_footnote_backlinks .= $l_str_footnote_id; - $l_str_footnote_backlinks .= $l_bool_symbol_switch ? $l_str_footnote_arrow : ''; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; + $l_str_FootnoteBacklinks .= $l_str_FootnoteId; + $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : ''; } } } - // Append terminator and end tag. - $l_str_footnote_reference .= $l_str_terminator . ''; - $l_str_footnote_backlinks .= $l_str_terminator . ''; + // append terminator and end tag: + $l_str_FootnoteReference .= $l_str_Terminator . ''; + $l_str_FootnoteBacklinks .= $l_str_Terminator . ''; } - // Line wrapping of URLs already fixed, see above. + // line wrapping of URLs already fixed, see above - // Get reference container item text if tooltip text goes separate. - $l_int_tooltip_text_length = strpos( $l_str_footnote_text, self::$a_str_tooltip_shortcode ); - $l_bool_has_tooltip_text = ! $l_int_tooltip_text_length ? false : true; - if ( $l_bool_has_tooltip_text ) { - $l_str_not_tooltip_text = substr( $l_str_footnote_text, ( $l_int_tooltip_text_length + self::$a_int_tooltip_shortcode_length ) ); - self::$a_bool_mirror_tooltip_text = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); - if ( self::$a_bool_mirror_tooltip_text ) { - $l_str_tooltip_text = substr( $l_str_footnote_text, 0, $l_int_tooltip_text_length ); - $l_str_reference_text_introducer = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR ); - $l_str_reference_text = $l_str_tooltip_text . $l_str_reference_text_introducer . $l_str_not_tooltip_text; + // get reference container item text if tooltip text goes separate: + $l_int_TooltipTextLength = strpos( $l_str_FootnoteText, self::$a_str_TooltipShortcode ); + $l_bool_HasTooltipText = $l_int_TooltipTextLength === false ? false : true; + if ( $l_bool_HasTooltipText ) { + $l_str_NotTooltipText = substr( $l_str_FootnoteText, ( $l_int_TooltipTextLength + self::$a_int_TooltipShortcodeLength ) ); + self::$a_bool_MirrorTooltipText = MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE ) ); + if ( self::$a_bool_MirrorTooltipText ) { + $l_str_TooltipText = substr( $l_str_FootnoteText, 0, $l_int_TooltipTextLength ); + $l_str_ReferenceTextIntroducer = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR); + $l_str_ReferenceText = $l_str_TooltipText . $l_str_ReferenceTextIntroducer . $l_str_NotTooltipText; } else { - $l_str_reference_text = $l_str_not_tooltip_text; + $l_str_ReferenceText = $l_str_NotTooltipText; } } else { - $l_str_reference_text = $l_str_footnote_text; + $l_str_ReferenceText = $l_str_FootnoteText; } - // Replace all placeholders in table row template. - $l_obj_template->replace( + // replace all placeholders in table row template: + $l_obj_Template->replace( array( - // Placeholder used in all templates. - 'text' => $l_str_reference_text, + // placeholder used in all templates: + "text" => $l_str_ReferenceText, - // Used in standard layout W/O COMBINED FOOTNOTES. - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'note_id' => MCI_Footnotes_Convert::index( $l_int_first_footnote_index, MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE ) ), - 'link-start' => self::$a_str_link_open_tag, - 'link-end' => self::$a_str_link_close_tag, - 'link-span' => self::$a_str_link_span, - 'terminator' => $l_str_terminator, - 'anchor-element' => $l_str_footnote_anchor_element, - 'hard-link' => $l_str_hard_link_address, + // used in standard layout W/O COMBINED FOOTNOTES: + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "link-start" => self::$a_str_LinkOpenTag, + "link-end" => self::$a_str_LinkCloseTag, + "link-span" => self::$a_str_LinkSpan, + "terminator" => $l_str_Terminator, + "anchor-element" => $l_str_FootnoteAnchorElement, + "hard-link" => $l_str_HardLinkAddress, - // Used in standard layout WITH COMBINED IDENTICALS TURNED ON. - 'pointer' => $l_bool_flag_combined ? '' : ' pointer', - 'event' => $l_bool_flag_combined ? '' : $l_str_backlink_event, - 'backlinks' => $l_bool_flag_combined ? $l_str_footnote_backlinks : $l_str_footnote_reference, + // used in standard layout WITH COMBINED IDENTICALS TURNED ON: + "pointer" => $l_bool_FlagCombined ? '' : ' pointer', + "event" => $l_bool_FlagCombined ? '' : $l_str_BacklinkEvent, + "backlinks" => $l_bool_FlagCombined ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, - // Legacy placeholders for use in legacy layout templates. - 'arrow' => $l_str_footnote_arrow, - 'index' => $l_str_footnote_id, + // Legacy placeholders for use in legacy layout templates: + "arrow" => $l_str_FootnoteArrow, + "index" => $l_str_FootnoteId, ) ); - $l_str_body .= $l_obj_template->get_content(); + $l_str_Body .= $l_obj_Template->getContent(); - // Extra line breaks for page source readability. - $l_str_body .= "\r\n\r\n"; + // extra line breaks for page source readability: + $l_str_Body .= "\r\n\r\n"; - $l_obj_template->reload(); + $l_obj_Template->reload(); } - // Call again for robustness when priority levels don’t match any longer. - self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); + // call again for robustness when priority levels don’t match any longer: + self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); - // Streamline. - $l_bool_collapse_default = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_COLLAPSE ) ); + // streamline: + $l_bool_CollapseDefault = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)); /** - * Reference container label. + * Reference container label * * - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. * @@ -2411,7 +2303,7 @@ class MCI_Footnotes_Task { * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. */ - $l_str_reference_container_label = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ); + $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); /** * Select the reference container template according to the script mode. @@ -2422,40 +2314,37 @@ class MCI_Footnotes_Task { * * @reporter @hopper87it * @link https://wordpress.org/support/topic/footnotes-wp-rocket/ - * + * * @reporter @pkverma99 * @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188 */ $l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE); if ( $l_str_ScriptMode == 'jquery' ) { - // load 'templates/public/reference-container.html': $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); - } else { - // load 'templates/public/js-reference-container.html': $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container"); } - + $l_obj_TemplateContainer->replace( array( - 'post_id' => self::$a_int_post_id, - 'container_id' => self::$a_int_reference_container_id, - 'element' => MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ), - 'name' => empty( $l_str_reference_container_label ) ? ' ' : $l_str_reference_container_label, - 'button-style' => ! $l_bool_collapse_default ? 'display: none;' : '', - 'style' => $l_bool_collapse_default ? 'display: none;' : '', - 'content' => $l_str_body, - 'scroll-offset' => ( self::$a_int_scroll_offset / 100 ), - 'scroll-duration' => intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION ) ), + "post_id" => self::$a_int_PostId, + "container_id" => self::$a_int_ReferenceContainerId, + "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), + "name" => empty($l_str_ReferenceContainerLabel) ? ' ' : $l_str_ReferenceContainerLabel, + "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', + "style" => $l_bool_CollapseDefault ? 'display: none;' : '', + "content" => $l_str_Body, + "scroll-offset" => (self::$a_int_ScrollOffset / 100), + "scroll-duration" => intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION)), ) ); - // Free all found footnotes if reference container will be displayed. - self::$a_arr_footnotes = array(); + // free all found footnotes if reference container will be displayed + self::$a_arr_Footnotes = array(); - return $l_obj_template_container->get_content(); + return $l_obj_TemplateContainer->getContent(); } } diff --git a/class/template.php b/class/template.php index 236734c..2c0b8d4 100644 --- a/class/template.php +++ b/class/template.php @@ -1,20 +1,39 @@ -plugin_directory = plugin_dir_path( dirname( __FILE__ ) ); /** - * Modularize functions. + * Modularize functions * * @since 2.4.0d3 + * + * @author Patrizia Lutz @misfist */ - $template = $this->get_template( $p_str_file_type, $p_str_file_name, $p_str_extension ); - if ( $template ) { + if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) { $this->process_template( $template ); } else { return; @@ -106,125 +133,124 @@ class MCI_Footnotes_Template { /** * Replace all placeholders specified in array. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_placeholders Placeholders (key = placeholder, value = value). + * @param array $p_arr_Placeholders Placeholders (key = placeholder, value = value). * @return bool True on Success, False if Placeholders invalid. */ - public function replace( $p_arr_placeholders ) { - // No placeholders set. - if ( empty( $p_arr_placeholders ) ) { + public function replace($p_arr_Placeholders) { + // no placeholders set + if (empty($p_arr_Placeholders)) { return false; } - // Template content is empty. - if ( empty( $this->a_str_replaced_content ) ) { + // template content is empty + if (empty($this->a_str_ReplacedContent)) { return false; } - // Iterate through each placeholder and replace it with its value. - foreach ( $p_arr_placeholders as $l_str_placeholder => $l_str_value ) { - $this->a_str_replaced_content = str_replace( '[[' . $l_str_placeholder . ']]', $l_str_value, $this->a_str_replaced_content ); + // iterate through each placeholder and replace it with its value + foreach($p_arr_Placeholders as $l_str_Placeholder => $l_str_Value) { + $this->a_str_ReplacedContent = str_replace("[[" . $l_str_Placeholder . "]]", $l_str_Value, $this->a_str_ReplacedContent); } - // Success. + // success return true; } /** * Reloads the original content of the template file. * + * @author Stefan Herndler * @since 1.5.0 */ public function reload() { - $this->a_str_replaced_content = $this->a_str_original_content; + $this->a_str_ReplacedContent = $this->a_str_OriginalContent; } /** * Returns the content of the template file with replaced placeholders. * + * @author Stefan Herndler * @since 1.5.0 * @return string Template content with replaced placeholders. */ - public function get_content() { - return $this->a_str_replaced_content; + public function getContent() { + return $this->a_str_ReplacedContent; } /** - * Process template file. + * Process template file + * + * @author Patrizia Lutz @misfist * * @since 2.4.0d3 * - * @param string $template The template to be processed. + * @param string $template * @return void * - * @since 2.0.3 Replace tab with a space. - * @since 2.0.3 Replace 2 spaces with 1. - * @since 2.0.4 Collapse multiple spaces. - * @since 2.2.6 Delete a space before a closing pointy bracket. - * @since 2.5.4 Collapse HTML comments and PHP/JS docblocks (only). + * + * @since 2.0.3 replace tab with a space + * @since 2.0.3 replace 2 spaces with 1 + * @since 2.0.4 collapse multiple spaces + * @since 2.2.6 delete a space before a closing pointy bracket + * @since 2.5.4 collapse HTML comments and PHP/JS docblocks (only) */ public function process_template( $template ) { - // phpcs:disable WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents - $this->a_str_original_content = preg_replace( '##s', '', file_get_contents( $template ) ); - // phpcs:enable - $this->a_str_original_content = preg_replace( '#/\*\*.+?\*/#s', '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\n", '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\r", '', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( "\t", ' ', $this->a_str_original_content ); - $this->a_str_original_content = preg_replace( '# +#', ' ', $this->a_str_original_content ); - $this->a_str_original_content = str_replace( ' >', '>', $this->a_str_original_content ); + $this->a_str_OriginalContent = preg_replace( '##s', "", file_get_contents( $template ) ); + $this->a_str_OriginalContent = preg_replace( '#/\*\*.+?\*/#s', "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\n", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\r", "", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( "\t", " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = preg_replace( '# +#', " ", $this->a_str_OriginalContent ); + $this->a_str_OriginalContent = str_replace( " >", ">", $this->a_str_OriginalContent ); $this->reload(); } /** - * Get the template. + * Get the template * - * - Adding: Templates: Enable template location stack, thanks to @misfist code contribution. + * @author Patrizia Lutz @misfist * - * @since 2.4.0d3 Contribution. - * @since 2.5.0 Release. + * @since 2.4.0d3 * - * @contributor @misfist - * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 - * - * @param string $p_str_file_type The file type of the template. - * @param string $p_str_file_name The file name of the template. - * @param string $p_str_extension The file extension of the template. + * @param string $p_str_FileType + * @param string $p_str_FileName + * @param string $p_str_Extension * @return mixed false | template path */ - public function get_template( $p_str_file_type, $p_str_file_name, $p_str_extension = 'html' ) { + public function get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension = "html" ) { $located = false; /** - * The directory can be changed. - * - * @usage to change location of templates to 'template_parts/footnotes/': + * The directory change be modified + * @usage to change location of templates to `template_parts/footnotes/': * add_filter( 'mci_footnotes_template_directory', function( $directory ) { - * return 'template_parts/footnotes/'; + * return 'template_parts/footnotes/; * } ); */ $template_directory = apply_filters( 'mci_footnotes_template_directory', 'footnotes/templates/' ); - $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); - $template_name = $p_str_file_type . '/' . $p_str_file_name . '.' . $p_str_extension; + $custom_directory = apply_filters( 'mci_footnotes_custom_template_directory', 'footnotes-custom/' ); + $template_name = $p_str_FileType . '/' . $p_str_FileName . '.' . $p_str_Extension; /** - * Look in active theme. + * Look in active (child) theme */ if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name; - /** - * Look in parent theme in case active is child. - */ + /** + * Look in parent theme + */ } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) { $located = trailingslashit( get_template_directory() ) . $template_directory . $template_name; - /** - * Look in custom plugin directory. - */ + /** + * Look in custom directory + */ } elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) { $located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name; - /** - * Fall back to the templates shipped with the plugin. - */ + /** + * Look in plugin + */ } elseif ( file_exists( $this->plugin_directory . 'templates/' . $template_name ) ) { $located = $this->plugin_directory . 'templates/' . $template_name; } @@ -232,4 +258,4 @@ class MCI_Footnotes_Template { return $located; } -} +} // end of class diff --git a/class/widgets/base.php b/class/widgets/base.php index 6618f28..ad41077 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -1,12 +1,14 @@ - __CLASS__, - 'description' => $this->get_description(), - ); - $l_arr_control_options = array( - 'id_base' => strtolower( $this->get_id() ), - 'width' => $this->get_widget_width(), - ); - // Registers the Widget. + $l_arr_WidgetOptions = array("classname" => __CLASS__, "description" => $this->getDescription()); + $l_arr_ControlOptions = array("id_base" => strtolower($this->getID()), "width" => $this->getWidgetWidth()); + // registers the Widget parent::__construct( - strtolower( $this->get_id() ), // Unique ID for the widget, has to be lowercase. - $this->get_name(), // Plugin name to be displayed. - $l_arr_widget_options, // Optional Widget Options. - $l_arr_control_options // Optional Widget Control Options. - ); + strtolower($this->getID()), // unique ID for the widget, has to be lowercase + $this->getName(), // Plugin name to be displayed + $l_arr_WidgetOptions, // Optional Widget Options + $l_arr_ControlOptions // Optional Widget Control Options + ); } } diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 4a75d11..2e322ec 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,81 +1,85 @@ -get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped - echo $g_obj_mci_footnotes->a_obj_task->Reference_Container(); - // phpcs:enable + public function widget($args, $instance) { + global $g_obj_MCI_Footnotes; + // reference container positioning is set to "widget area" + if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "widget") { + echo $g_obj_MCI_Footnotes->a_obj_Task->ReferenceContainer(); } } } diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 898f133..3a27477 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -1,92 +1,83 @@ -get_content(); - // phpcs:enable + public static function newPlainTextEditorButton() { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "editor-button"); + echo $l_obj_Template->getContent(); } /** * Includes the Plugins WYSIWYG editor script. * + * @author Stefan Herndler * @since 1.5.0 - * @param array $p_arr_plugins Scripts to be included to the editor. + * @param array $p_arr_Plugins Scripts to be included to the editor. * @return array */ - public static function include_scripts( $p_arr_plugins ) { - $p_arr_plugins[ MCI_Footnotes_Config::C_STR_PLUGIN_NAME ] = plugins_url( '/../js/wysiwyg-editor.js', __FILE__ ); - return $p_arr_plugins; + public static function includeScripts($p_arr_Plugins) { + $p_arr_Plugins[MCI_Footnotes_Config::C_STR_PLUGIN_NAME] = plugins_url('/../js/wysiwyg-editor.js', __FILE__); + return $p_arr_Plugins; } /** * AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor. * Returns an JSON encoded array with the Footnotes start and end short code. * + * @author Stefan Herndler * @since 1.5.0 */ - public static function ajax_callback() { - // Get start and end tag for the footnotes short code. - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END ); - if ( 'userdefined' === $l_str_starting_tag || 'userdefined' === $l_str_ending_tag ) { - $l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED ); - $l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED ); + public static function ajaxCallback() { + // get start and end tag for the footnotes short code + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END); + if ($l_str_StartingTag == "userdefined" || $l_str_EndingTag == "userdefined") { + $l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED); + $l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED); } - echo wp_json_encode( - array( - 'start' => htmlspecialchars( $l_str_starting_tag ), - 'end' => htmlspecialchars( $l_str_ending_tag ), - ) - ); + echo json_encode(array("start" => htmlspecialchars($l_str_StartingTag), "end" => htmlspecialchars($l_str_EndingTag))); exit; } -} +} \ No newline at end of file diff --git a/composer.json b/composer.json deleted file mode 100644 index 85ecd48..0000000 --- a/composer.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", - "wp-coding-standards/wpcs": "^2.3" - }, - "scripts": { - "post-install-cmd": [ - "bash _tools/setup.sh" - ] - } -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 9e0ee7c..0000000 --- a/composer.lock +++ /dev/null @@ -1,196 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "3a147d50695956de52f7cbf827b47830", - "packages": [], - "packages-dev": [ - { - "name": "dealerdirect/phpcodesniffer-composer-installer", - "version": "v0.7.1", - "source": { - "type": "git", - "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", - "reference": "fe390591e0241955f22eb9ba327d137e501c771c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "composer/composer": "*", - "phpcompatibility/php-compatibility": "^9.0", - "sensiolabs/security-checker": "^4.1.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" - }, - "autoload": { - "psr-4": { - "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Franck Nijhof", - "email": "franck.nijhof@dealerdirect.com", - "homepage": "http://www.frenck.nl", - "role": "Developer / IT Manager" - } - ], - "description": "PHP_CodeSniffer Standards Composer Installer Plugin", - "homepage": "http://www.dealerdirect.com", - "keywords": [ - "PHPCodeSniffer", - "PHP_CodeSniffer", - "code quality", - "codesniffer", - "composer", - "installer", - "phpcs", - "plugin", - "qa", - "quality", - "standard", - "standards", - "style guide", - "stylecheck", - "tests" - ], - "support": { - "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", - "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" - }, - "time": "2020-12-07T18:04:37+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.5.8", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2020-10-23T02:01:07+00:00" - }, - { - "name": "wp-coding-standards/wpcs", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", - "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." - }, - "type": "phpcodesniffer-standard", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Contributors", - "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" - } - ], - "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", - "keywords": [ - "phpcs", - "standards", - "wordpress" - ], - "support": { - "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", - "source": "https://github.com/WordPress/WordPress-Coding-Standards", - "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" - }, - "time": "2020-05-13T23:57:56+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "2.0.0" -} diff --git a/contrib/pre-commit b/contrib/pre-commit deleted file mode 100644 index 0dc792f..0000000 --- a/contrib/pre-commit +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# Modified from: https://github.com/bjornjohansen/wp-pre-commit-hook -# Also: https://softdiscover.com/wordpress/perfect-setup-for-a-wordpress-project-development/ - -PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` -STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` - -# Determine if a file list is passed -if [ "$#" -eq 1 ] -then - oIFS=$IFS - IFS=' - ' - SFILES="$1" - IFS=$oIFS -fi -SFILES=${SFILES:-$STAGED_FILES_CMD} - -echo "Checking PHP Lint..." -for FILE in $SFILES -do - php -l -d display_errors=0 $PROJECT/$FILE - if [ $? != 0 ] - then - echo "Fix the error before commit." - exit 1 - fi - FILES="$FILES $PROJECT/$FILE" -done - -if [ -f "$PROJECT/phpcs.ruleset.xml" ] -then - RULESET="$PROJECT/phpcs.ruleset.xml" -elif [ -f "$PROJECT/phpcs.xml.dist" ] -then - RULESET="$PROJECT/phpcs.xml.dist" -else - RULESET="WordPress" -fi - -if [ "$FILES" != "" ] -then - echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." - ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Coding standards errors have been detected. Running phpcbf..." - ./vendor/bin/phpcbf --standard="$RULESET" --encoding=utf-8 -n -p $FILES - git add $FILES - echo "Running Code Sniffer again..." - ./vendor/bin/phpcs --standard="$RULESET" --colors --encoding=utf-8 -n -p $FILES - if [ $? != 0 ] - then - echo "Errors found not fixable automatically. You need to manually fix them." - exit 1 - fi - fi -fi - -exit $? diff --git a/footnotes.php b/footnotes.php index f32726b..b227652 100755 --- a/footnotes.php +++ b/footnotes.php @@ -12,7 +12,6 @@ /* * Copyright 2021 Mark Cheret (email: mark@cheret.de) */ - /** * Version number for stylesheet cache busting. * @@ -42,34 +41,34 @@ define( 'C_STR_FOOTNOTES_VERSION', '2.5.7' ); /** * Plugin’s main PHP file. - * + * * @filesource - * @package footnotes + * @author Stefan Herndler * @since 0.0.1 */ -// Get all common classes and functions. -require_once dirname( __FILE__ ) . '/includes.php'; +// Get all common classes and functions +require_once(dirname(__FILE__) . "/includes.php"); -// Add Plugin Links to the "installed plugins" page. +// add Plugin Links to the "installed plugins" page $l_str_plugin_file = 'footnotes/footnotes.php'; -add_filter( "plugin_action_links_{$l_str_plugin_file}", array( 'MCI_Footnotes_Hooks', 'plugin_links' ), 10, 2 ); +add_filter("plugin_action_links_{$l_str_plugin_file}", array("MCI_Footnotes_Hooks", "PluginLinks"), 10, 2); -// Initialize the Plugin. -$g_obj_mci_footnotes = new MCI_Footnotes(); -// Run the Plugin. -$g_obj_mci_footnotes->run(); +// initialize the Plugin +$g_obj_MCI_Footnotes = new MCI_Footnotes(); +// run the Plugin +$g_obj_MCI_Footnotes->run(); /** * Sets the stylesheet enqueuing mode for production. - * + * * @since 2.5.5 * @var bool * @see class/init.php - * + * * In production, a minified CSS file tailored to the settings is enqueued. - * + * * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. - */ + */ define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index 9501097..732cfb9 100644 --- a/includes.php +++ b/includes.php @@ -3,37 +3,36 @@ * Includes all common files. * * @filesource - * @package footnotes + * @author Stefan Herndler * @since 1.5.0 14.09.14 13:40 */ /** - * Requires (`require_once`) all `*.php` files inside a specific Directory. + * Requires (require_once) all *.php files inside a specific Directory. * * @author Stefan Herndler * @since 1.5.0 - * @param string $p_str_directory Absolute Directory path to lookup for `*.php` files. + * @param string $p_str_Directory Absolute Directory path to lookup for *.php files */ -function mci_footnotes_require_php_files( $p_str_directory ) { - // Append slash at the end of the Directory if not exist. - if ( '/' !== substr( $p_str_directory, -1 ) ) { - $p_str_directory .= '/'; +function MCI_Footnotes_requirePhpFiles($p_str_Directory) { + // append slash at the end of the Directory if not exist + if (substr($p_str_Directory, -1) != "/") { + $p_str_Directory .= "/"; + } - // Get all PHP files inside Directory. - $l_arr_files = scandir( $p_str_directory ); - // Iterate through each class. - foreach ( $l_arr_files as $l_str_file_name ) { - // Skip all non-PHP files. - if ( '.php' !== strtolower( substr( $l_str_file_name, -4 ) ) ) { + // get all PHP files inside Directory + $l_arr_Files = scandir($p_str_Directory); + // iterate through each class + foreach ($l_arr_Files as $l_str_FileName) { + // skip all non *.php files + if (strtolower(substr($l_str_FileName, -4)) != ".php") { continue; } - // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIncludeInspection */ - require_once $p_str_directory . $l_str_file_name; - // phpcs:enable + require_once($p_str_Directory . $l_str_FileName); } } -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class' ); -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/layout' ); -mci_footnotes_require_php_files( dirname( __FILE__ ) . '/class/widgets' ); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class"); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/dashboard"); +MCI_Footnotes_requirePhpFiles(dirname(__FILE__) . "/class/widgets"); diff --git a/readme.txt b/readme.txt index 62e37d4..8c5f327 100755 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ === footnotes === -Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges +Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 Tested up to: 5.6.1 @@ -83,7 +83,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.5.6 = - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. - Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. +- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org. = 2.5.5 = - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. @@ -329,7 +329,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.4 = - Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. +- Update: GDPR: Add jQuery UI from WordPress instead of third party. - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - Bugfix: Reference container: remove inconvenient left/right cellpadding. - Bugfix: Tooltips: improve layout with inherited font size by lower line height. diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 03ad002..91fc1e4 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -54,7 +54,7 @@ type: 'POST', url: '/wp-admin/admin-ajax.php', data: { - action: 'footnotes_get_plugin_info', + action: 'footnotes_getPluginInfo', plugin: '[[plugin-name]]' }, dataType: 'json', diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index 4e70481..cb400de 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -4,8 +4,8 @@ --> <[[link-span]] onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" [[hard-link]] @@ -17,7 +17,7 @@ >[[anchor-element]] Date: Sat, 27 Feb 2021 08:14:09 +0000 Subject: [PATCH 083/144] Add authorsfile to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7fdc234..bff37e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .phpdoc/ + +authors.txt From 25c3f2f12eb5de1079e9215bf624ec4289b095a5 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 27 Feb 2021 08:49:08 +0000 Subject: [PATCH 084/144] Replace output escape and input sanitization functions with linter supression messages --- class/hooks.php | 6 +-- class/init.php | 6 +-- class/layout/abstract-engine.php | 32 ++++++------- class/layout/diagnostics.php | 10 ++-- class/layout/init.php | 8 ++-- class/task.php | 66 +++++++++++++-------------- class/widgets/reference-container.php | 4 +- 7 files changed, 62 insertions(+), 70 deletions(-) diff --git a/class/hooks.php b/class/hooks.php index 617a658..f5c90d1 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -1,4 +1,4 @@ -a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? wp_unslash( $_GET['t'] ) : key( $this->a_arr_sections ); $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; // Store settings. @@ -259,16 +258,16 @@ abstract class MCI_Footnotes_Layout_Engine { $l_str_tab_active = ( $l_str_id === $l_arr_active_section['id'] ) ? ' nav-tab-active' : ''; echo sprintf( '%s', - esc_attr( ( $l_str_id === $l_arr_active_section['id'] ) ? ' nav-tab-active' : '' ), - esc_attr( MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug() ), - esc_attr( $l_str_id ), - esc_attr( $l_arr_description['title'] ) + ( $l_str_id === $l_arr_active_section['id'] ) ? ' nav-tab-active' : '', + MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->get_sub_page_slug(), + $l_str_id, + $l_arr_description['title'] ); } echo '
                                                                                                                                                                      '; if ( $l_bool_settings_updated ) { - echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( __( 'Settings saved', 'footnotes' ) ) ); + echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', __( 'Settings saved', 'footnotes' ) ); } // Form to submit the active section. @@ -290,14 +289,13 @@ abstract class MCI_Footnotes_Layout_Engine { echo 'jQuery(document).ready(function ($) {'; echo 'jQuery(".mfmmf-color-picker").wpColorPicker();'; echo "jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');"; - echo "postboxes.add_postbox_toggles('" . esc_js( $this->a_str_sub_page_hook ) . "');"; + echo "postboxes.add_postbox_toggles('" . $this->a_str_sub_page_hook . "');"; echo '});'; echo ''; } - // phpcs:enable + // phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing - // phpcs:disable WordPress.Security.NonceVerification.Recommended - // phpcs:disable WordPress.Security.NonceVerification.Missing + // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing /** * Save all Plugin settings. * @@ -311,12 +309,12 @@ abstract class MCI_Footnotes_Layout_Engine { // Get current section. reset( $this->a_arr_sections ); - $l_str_active_section_id = isset( $_GET['t'] ) ? sanitize_text_field( wp_unslash( $_GET['t'] ) ) : key( $this->a_arr_sections ); + $l_str_active_section_id = isset( $_GET['t'] ) ? wp_unslash( $_GET['t'] ) : key( $this->a_arr_sections ); $l_arr_active_section = $this->a_arr_sections[ $l_str_active_section_id ]; foreach ( MCI_Footnotes_Settings::instance()->get_defaults( $l_arr_active_section['container'] ) as $l_str_key => $l_mixed_value ) { if ( array_key_exists( $l_str_key, $_POST ) ) { - $l_arr_new_settings[ $l_str_key ] = sanitize_text_field( wp_unslash( $_POST[ $l_str_key ] ) ); + $l_arr_new_settings[ $l_str_key ] = wp_unslash( $_POST[ $l_str_key ] ); } else { // Setting is not defined in the POST array, define it to avoid the Default value. $l_arr_new_settings[ $l_str_key ] = ''; @@ -325,7 +323,7 @@ abstract class MCI_Footnotes_Layout_Engine { // Update settings. return MCI_Footnotes_Settings::instance()->save_options( $l_arr_active_section['container'], $l_arr_new_settings ); } - // phpcs:enable + // phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing /** * Output the Description of a section. May be overwritten in any section. @@ -349,7 +347,7 @@ abstract class MCI_Footnotes_Layout_Engine { $p_arr_return = array(); $p_arr_return['id'] = sprintf( '%s', $p_str_setting_key_name ); $p_arr_return['name'] = sprintf( '%s', $p_str_setting_key_name ); - $p_arr_return['value'] = esc_attr( MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ) ); + $p_arr_return['value'] = MCI_Footnotes_Settings::instance()->get( $p_str_setting_key_name ); return $p_arr_return; } diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php index 502f293..1a30015 100644 --- a/class/layout/diagnostics.php +++ b/class/layout/diagnostics.php @@ -1,4 +1,4 @@ -' . $l_arr_plugin['Name'] . ''; // phpcs:disable Generic.Strings.UnnecessaryStringConcat.Found $l_str_wordpress_plugins .= '
                                                                                                                                                                      '; - // phpcs:enable + // phpcs:enable Generic.Strings.UnnecessaryStringConcat.Found $l_str_wordpress_plugins .= ''; } // Load template file. @@ -103,12 +103,12 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine { if ( ! isset( $_SERVER['SERVER_NAME'] ) ) { die; } else { - $l_str_server_name = sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ); + $l_str_server_name = wp_unslash( $_SERVER['SERVER_NAME'] ); } if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { die; } else { - $l_str_http_user_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ); + $l_str_http_user_agent = wp_unslash( $_SERVER['HTTP_USER_AGENT'] ); } // Replace all placeholders. @@ -141,9 +141,7 @@ class MCI_Footnotes_Layout_Diagnostics extends MCI_Footnotes_Layout_Engine { 'plugins' => $l_str_wordpress_plugins, ) ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped // Display template with replaced placeholders. echo $l_obj_template->get_content(); - // phpcs:enable } } diff --git a/class/layout/init.php b/class/layout/init.php index 72c347d..31e5b24 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -1,4 +1,4 @@ -get_content(); - // phpcs:enable + // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped printf( 'visit Mark Cheret' ); printf( '

                                                                                                                                                                      ' ); @@ -152,7 +152,7 @@ class MCI_Footnotes_Layout_Init { // Get plugin internal name from POST data. if ( isset( $_POST['plugin'] ) ) { - $l_str_plugin_name = sanitize_text_field( wp_unslash( $_POST['plugin'] ) ); + $l_str_plugin_name = wp_unslash( $_POST['plugin'] ); } if ( empty( $l_str_plugin_name ) ) { @@ -203,5 +203,5 @@ class MCI_Footnotes_Layout_Init { ); exit; } - // phpcs:enable + // phpcs:enable WordPress.Security.NonceVerification.Missing } diff --git a/class/task.php b/class/task.php index 48f0f37..e39a7e4 100644 --- a/class/task.php +++ b/class/task.php @@ -1,4 +1,4 @@ -get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN ) ); $l_int_reference_container_bottom_margin = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN ) ); echo '.footnotes_reference_container {margin-top: '; - echo empty( $l_int_reference_container_top_margin ) ? '0' : esc_html( $l_int_reference_container_top_margin ); + echo empty( $l_int_reference_container_top_margin ) ? '0' : $l_int_reference_container_top_margin; echo 'px !important; margin-bottom: '; - echo empty( $l_int_reference_container_bottom_margin ) ? '0' : esc_html( $l_int_reference_container_bottom_margin ); + echo empty( $l_int_reference_container_bottom_margin ) ? '0' : $l_int_reference_container_bottom_margin; echo "px !important;}\r\n"; /** @@ -721,7 +721,7 @@ class MCI_Footnotes_Task { */ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER ) ) ) { echo '.footnote_container_prepare > '; - echo esc_html( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ) ); + echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ); echo " {border-bottom: 1px solid #aaaaaa !important;}\r\n"; } @@ -769,7 +769,7 @@ class MCI_Footnotes_Task { $l_int_column_width_scalar = 0; } - echo ' width: ' . esc_html( $l_int_column_width_scalar ) . esc_html( $l_str_column_width_unit ) . ' !important;'; + echo ' width: ' . $l_int_column_width_scalar . $l_str_column_width_unit . ' !important;'; } if ( $l_bool_column_max_width_enabled ) { @@ -786,7 +786,7 @@ class MCI_Footnotes_Task { $l_int_column_max_width_scalar = 0; } - echo ' max-width: ' . esc_html( $l_int_column_max_width_scalar ) . esc_html( $l_str_column_max_width_unit ) . ' !important;'; + echo ' max-width: ' . $l_int_column_max_width_scalar . $l_str_column_max_width_unit . ' !important;'; } echo "}\r\n"; @@ -812,7 +812,7 @@ class MCI_Footnotes_Task { self::$a_int_scroll_offset = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET ) ); if ( self::$a_bool_hard_links_enable ) { echo '.footnote_referrer_anchor, .footnote_item_anchor {bottom: '; - echo esc_html( self::$a_int_scroll_offset ); + echo self::$a_int_scroll_offset; echo "vh;}\r\n"; } @@ -835,8 +835,8 @@ class MCI_Footnotes_Task { */ echo ' font-size: '; if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED ) ) ) { - echo esc_html( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR ) ); - echo esc_html( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT ) ); + echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR ); + echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT ); } else { echo 'inherit'; } @@ -847,7 +847,7 @@ class MCI_Footnotes_Task { */ $l_str_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ); if ( ! empty( $l_str_color ) ) { - printf( ' color: %s !important;', esc_html( $l_str_color ) ); + printf( ' color: %s !important;', $l_str_color ); } /* @@ -855,7 +855,7 @@ class MCI_Footnotes_Task { */ $l_str_background = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ); if ( ! empty( $l_str_background ) ) { - printf( ' background-color: %s !important;', esc_html( $l_str_background ) ); + printf( ' background-color: %s !important;', $l_str_background ); } /* @@ -863,7 +863,7 @@ class MCI_Footnotes_Task { */ $l_int_border_width = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH ); if ( ! empty( $l_int_border_width ) && intval( $l_int_border_width ) > 0 ) { - printf( ' border-width: %dpx !important; border-style: solid !important;', esc_html( $l_int_border_width ) ); + printf( ' border-width: %dpx !important; border-style: solid !important;', $l_int_border_width ); } /* @@ -871,7 +871,7 @@ class MCI_Footnotes_Task { */ $l_str_border_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ); if ( ! empty( $l_str_border_color ) ) { - printf( ' border-color: %s !important;', esc_html( $l_str_border_color ) ); + printf( ' border-color: %s !important;', $l_str_border_color ); } /* @@ -879,7 +879,7 @@ class MCI_Footnotes_Task { */ $l_int_border_radius = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS ); if ( ! empty( $l_int_border_radius ) && intval( $l_int_border_radius ) > 0 ) { - printf( ' border-radius: %dpx !important;', esc_html( $l_int_border_radius ) ); + printf( ' border-radius: %dpx !important;', $l_int_border_radius ); } /* @@ -887,9 +887,9 @@ class MCI_Footnotes_Task { */ $l_str_box_shadow_color = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ); if ( ! empty( $l_str_box_shadow_color ) ) { - printf( ' -webkit-box-shadow: 2px 2px 11px %s;', esc_html( $l_str_box_shadow_color ) ); - printf( ' -moz-box-shadow: 2px 2px 11px %s;', esc_html( $l_str_box_shadow_color ) ); - printf( ' box-shadow: 2px 2px 11px %s;', esc_html( $l_str_box_shadow_color ) ); + printf( ' -webkit-box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color ); + printf( ' -moz-box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color ); + printf( ' box-shadow: 2px 2px 11px %s;', $l_str_box_shadow_color ); } /** @@ -912,7 +912,7 @@ class MCI_Footnotes_Task { */ $l_int_max_width = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH ); if ( ! empty( $l_int_max_width ) && intval( $l_int_max_width ) > 0 ) { - printf( ' max-width: %dpx !important;', esc_html( $l_int_max_width ) ); + printf( ' max-width: %dpx !important;', $l_int_max_width ); } echo "}\r\n"; } else { @@ -924,26 +924,26 @@ class MCI_Footnotes_Task { // Dimensions. $l_int_alternative_tooltip_width = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH ) ); echo '.footnote_tooltip.position {'; - echo ' width: ' . esc_html( $l_int_alternative_tooltip_width ) . 'px;'; + echo ' width: ' . $l_int_alternative_tooltip_width . 'px;'; // Set also as max-width wrt short tooltip shrinking. - echo ' max-width: ' . esc_html( $l_int_alternative_tooltip_width ) . 'px;'; + echo ' max-width: ' . $l_int_alternative_tooltip_width . 'px;'; // Position. $l_str_alternative_position = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION ); $l_int_offset_x = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X ) ); if ( 'top left' === $l_str_alternative_position || 'bottom left' === $l_str_alternative_position ) { - echo ' right: ' . ( ! empty( $l_int_offset_x ) ? esc_html( $l_int_offset_x ) : 0 ) . 'px;'; + echo ' right: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;'; } else { - echo ' left: ' . ( ! empty( $l_int_offset_x ) ? esc_html( $l_int_offset_x ) : 0 ) . 'px;'; + echo ' left: ' . ( ! empty( $l_int_offset_x ) ? $l_int_offset_x : 0 ) . 'px;'; } $l_int_offset_y = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y ) ); if ( 'top left' === $l_str_alternative_position || 'top right' === $l_str_alternative_position ) { - echo ' bottom: ' . ( ! empty( $l_int_offset_y ) ? esc_html( $l_int_offset_y ) : 0 ) . 'px;'; + echo ' bottom: ' . ( ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0 ) . 'px;'; } else { - echo ' top: ' . ( ! empty( $l_int_offset_y ) ? esc_html( $l_int_offset_y ) : 0 ) . 'px;'; + echo ' top: ' . ( ! empty( $l_int_offset_y ) ? $l_int_offset_y : 0 ) . 'px;'; } echo "}\r\n"; @@ -957,22 +957,21 @@ class MCI_Footnotes_Task { $l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) ); $l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0'; $l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0'; - echo ' transition-delay: ' . esc_html( $l_int_fade_in_delay ) . 'ms;'; - echo ' transition-duration: ' . esc_html( $l_int_fade_in_duration ) . 'ms;'; + echo ' transition-delay: ' . $l_int_fade_in_delay . 'ms;'; + echo ' transition-duration: ' . $l_int_fade_in_duration . 'ms;'; echo '} .footnote_tooltip.hidden {'; $l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) ); $l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) ); $l_int_fade_out_delay = ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : '0'; $l_int_fade_out_duration = ! empty( $l_int_fade_out_duration ) ? $l_int_fade_out_duration : '0'; - echo ' transition-delay: ' . esc_html( $l_int_fade_out_delay ) . 'ms;'; - echo ' transition-duration: ' . esc_html( $l_int_fade_out_duration ) . 'ms;'; + echo ' transition-delay: ' . $l_int_fade_out_delay . 'ms;'; + echo ' transition-duration: ' . $l_int_fade_out_duration . 'ms;'; echo "}\r\n"; } } - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped /** * Custom CSS. * @@ -989,7 +988,6 @@ class MCI_Footnotes_Task { echo "\r\n"; } echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW ); - // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped // Insert end tag without switching out of PHP. echo "\r\n\r\n"; @@ -1034,9 +1032,7 @@ class MCI_Footnotes_Task { */ public function wp_footer() { if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped echo $this->reference_container(); - // phpcs:enable } // Get setting for love and share this plugin. $l_str_love_me_index = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE ); @@ -1082,7 +1078,7 @@ class MCI_Footnotes_Task { $l_str_love_me_text = sprintf( '%s', $l_str_linked_name ); break; } - echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', esc_html( $l_str_love_me_text ) ); + echo sprintf( '
                                                                                                                                                                      %s
                                                                                                                                                                      ', $l_str_love_me_text ); } /** @@ -1128,7 +1124,7 @@ class MCI_Footnotes_Task { // phpcs:disable WordPress.PHP.YodaConditions.NotYoda // Appends the reference container if set to "post_end". return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ); - // phpcs:enable + // phpcs:enable WordPress.PHP.YodaConditions.NotYoda } /** @@ -1165,7 +1161,7 @@ class MCI_Footnotes_Task { // phpcs:disable WordPress.PHP.YodaConditions.NotYoda // Appends the reference container if set to "post_end". return $this->exec( $p_str_content, 'post_end' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ? true : false ); - // phpcs:enable + // phpcs:enable WordPress.PHP.YodaConditions.NotYoda } /** diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 4a75d11..1a628a7 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -1,4 +1,4 @@ - Date: Sun, 28 Feb 2021 00:53:50 +0100 Subject: [PATCH 085/144] Restore lost corrections --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5cd8dae..f55c285 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of current defaults but also empowers you to control how your footnotes are being displayed. +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts—those footnotes we know from offline publishing. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. ## Getting Started From ef8050477b770576134353d4a71bff70da76dc8e Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 28 Feb 2021 14:24:57 +0100 Subject: [PATCH 086/144] Backport upcoming bugfix release 2.5.8 Will be released in response to Forum and as agreed. = 2.5.8 = - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. - Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir=rtl pages, thanks to @arahmanshaalan bug report. --- css/dev-common.css | 1123 +++++++++++++------------- css/dev-tooltips-alternative.css | 126 +-- css/dev-tooltips.css | 119 +-- css/footnotes-alttbrpl0.min.css | 2 +- css/footnotes-alttbrpl1.min.css | 2 +- css/footnotes-alttbrpl2.min.css | 2 +- css/footnotes-alttbrpl3.min.css | 2 +- css/footnotes-jqttbrpl0.min.css | 2 +- css/footnotes-jqttbrpl1.min.css | 2 +- css/footnotes-jqttbrpl2.min.css | 2 +- css/footnotes-jqttbrpl3.min.css | 2 +- css/footnotes-nottbrpl0.min.css | 2 +- css/footnotes-nottbrpl1.min.css | 2 +- css/footnotes-nottbrpl2.min.css | 2 +- css/footnotes-nottbrpl3.min.css | 2 +- css/settings.css | 564 +++++++------- footnotes.php | 6 +- readme.txt | 1254 +++++++++++++++--------------- 18 files changed, 1582 insertions(+), 1634 deletions(-) mode change 100755 => 100644 css/settings.css mode change 100755 => 100644 readme.txt diff --git a/css/dev-common.css b/css/dev-common.css index 2b8e657..155d738 100644 --- a/css/dev-common.css +++ b/css/dev-common.css @@ -1,591 +1,532 @@ -/* - * .footnote_plugin_tooltip_text = inner - * .footnote_tooltip = inner - */ - -.footnote_referrer, -.footnote_referrer:link, -.footnote_referrer:hover, -.footnote_referrer > a, -.footnote_referrer > a:link, -.footnote_referrer > a:hover, -.footnote_plugin_tooltip_text, -.footnote_plugin_tooltip_text:hover, -.main-content .footnote_referrer, -.main-content .footnote_referrer:link, -.main-content .footnote_referrer:hover, -.main-content .footnote_referrer > a, -.main-content .footnote_referrer > a:link, -.main-content .footnote_referrer > a:hover, -.main-content .footnote_plugin_tooltip_text, -.main-content .footnote_plugin_tooltip_text:hover { - text-decoration: none !important; - border-bottom: none !important; - box-shadow: none !important; -} - -/** - * Footnote referrer (not “tooltip text”) - * - * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. - * - * @since 2.1.1 - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. - * - * @since 2.5.4 - * @reporter @wisenilesh - * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ - */ - -.footnote_plugin_tooltip_text { - line-height: 0; - position: relative !important; - cursor: pointer; -} - -/** - * Tooltips - * - * - Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. - * - * @since 2.1.6 - * @reporter @russianicons - * @link https://wordpress.org/support/topic/counter-styles-not-working/#post-13767299 - */ - -.footnote_tooltip { - display: none; - z-index: 2147483647 !important; - cursor: auto; - text-align: left; - padding: 12px; - line-height: 1.2; - font-weight: normal; - font-style: normal; -} - -/** - * Alternative tooltips - * - * These default position values may be overridden by internal CSS. - */ - -.footnote_referrer.relative { - position: relative; -} - -.footnote_tooltip.position { - display: unset; - position: absolute; - bottom: 24px; - left: -50px; - width: 400px; -} - -/* -fade-in parameters -*/ - -.footnote_tooltip.shown { - visibility: visible; - opacity: 1; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 0ms; - transition-duration: 200ms; -*/ -} - -/* -fade-out parameters -*/ - -.footnote_tooltip.hidden { - visibility: hidden; - opacity: 0; - transition-property: visibility opacity; - transition-timing-function: linear; -/* -property values of settings are inline CSS - transition-delay: 400ms; - transition-duration: 200ms; -*/ -} - -/* -Read-on button -*/ - -.footnote_tooltip_continue { - font-style: italic; - color: green; - text-decoration: none !important; - cursor: pointer; - white-space: nowrap; -} - -.footnote_tooltip_continue:hover { - color: blue; - text-decoration: underline !important; -} - - -/***************************************************** -Footnote reference container - -Templates: -templates/public/reference-container.html -templates/public/reference-container-body.html -templates/public/reference-container-combi.html -templates/public/reference-container-switch.html -templates/public/reference-container-3column.html - -Optional responsive basic page layout support -stylesheets: -css/layout-reference-container.css -css/layout-main-content.css -css/layout-page-content.css - -Classes: -.footnotes_reference_container = enclosing
                                                                                                                                                                      -.footnote_container_prepare = label
                                                                                                                                                                      -.footnote_reference_container_label = -.footnote_reference_container_collapse_button = sibling -.footnote-reference-container = misleading and inconsistent; alias: -.footnotes_table =
                                                                                                                                                                      if identical footnotes are combined -.footnote_plugin_index = first if not -.footnote_index = or in first in 3-column table -.footnote_plugin_symbol = second in 3-column table -.footnote_plugin_link = or (identical footnotes not combined) -.footnote_backlink = or -.footnote_index_arrow = nested , symbol only -.footnote_plugin_text = second , or third in 3-column table -*/ - -.footnotes_reference_container { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -/* -label -*/ - -.footnote_container_prepare { - display: block !important; - padding-top: 24px !important; -} - -.footnote_container_prepare > p { - line-height: 1.3 !important; - margin-top: 1em !important; - margin-bottom: 0.25em !important; - padding: 0 !important; - font-weight: normal !important; - /* bottom border optional since 2.2.5 */ - display: block !important; - -webkit-margin-before: 0.83em !important; - -webkit-margin-after: 0.83em !important; - -webkit-margin-start: 0px !important; - -webkit-margin-end: 0px !important; - text-align: left !important; - vertical-align: middle; -} - -.footnote_container_prepare > p > span:first-child, - .footnote_container_prepare > p > span:nth-child(3) { - text-align: start !important; - font-size: 1.5em !important; -} - -/* -collapse button -fully clickable, not sign only -*/ - -.footnote_reference_container_collapse_button { - cursor: pointer; - padding: 0 0.5em; - font-size: 1.3em !important; - vertical-align: 2px; - text-decoration: none !important; -} - -h2 > .footnote_reference_container_collapse_button, -h3 > .footnote_reference_container_collapse_button, -h4 > .footnote_reference_container_collapse_button, -h5 > .footnote_reference_container_collapse_button, -h6 > .footnote_reference_container_collapse_button { - font-size: inherit !important; -} - -.footnote_container_prepare > p > span:last-child a, -.footnote_reference_container_collapse_button a { - text-decoration: none !important; -} - -/* -table -*/ - -.footnote-reference-container, -.footnotes_table { - width: 100%; - border: none; -} - -/* -footnotes - -@since 2.0.0 borderless table cells, thanks to @ragonesi bug report -@see -@since 2.0.1 enforce borderless text cells through !important property, thanks to @ragonesi bug report -@see -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi, -.footnote_plugin_symbol, -.footnote_plugin_text { - border: none !important; - text-align: left !important; - vertical-align: top !important; - padding: 5px 6px 10px 0 !important; -} - -.footnote_backlink, -.footnote_backlink:link, -.footnote_plugin_link, -.footnote_plugin_link:link, -.main-content .footnote_backlink, -.main-content .footnote_backlink:link, -.main-content .footnote_plugin_link, -.main-content .footnote_plugin_link:link { - text-decoration: none !important; - border-bottom: none !important; -} - -.footnote_backlink, -.footnote_plugin_link { - white-space: nowrap; -} - -.pointer, -.footnote_index, -.footnote_backlink { - cursor: pointer; -} - -/* -These rules when enabled cause the backlink to take an overline -when hovered in some themes, not in others: -.footnote_plugin_index:hover, -.footnote_plugin_index_combi:hover, -.footnote_plugin_index.pointer:hover, -.footnote_plugin_index_combi.pointer:hover, -*/ - -.footnote_backlink:hover, -.footnote_plugin_link:hover, -.footnote_plugin_text a:hover { - text-decoration: unset; - text-decoration: underline; /*deprioritized to ease customization*/ -} - -.footnote_plugin_text { - width: unset; /*unset width of text column to fix site issues*/ -} - -/* -These rules are just defaults preventing the table from filling the width. -They are not very effective by lack of table-layout: fixed; -since 2.1.4 settings are optionally available, with table-layout: fixed; - -By default, the backlink column is auto-expanding to fit widest. -Not using 'max-content' as that causes no-wrap and overflows. -These are overridden if settings are enabled. -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi { - max-width: 100px; - width: 2.5em; -} - -/* -Responsive -*/ - -@media only screen and (max-width: 768px) { - - .footnote_plugin_index, - .footnote_plugin_index_combi { - max-width: 80px; - } -} - - -/**************************************************************** -Footnotes printing style rules - -Printing a table, browsers tend to avoid page breaks inside, -but it takes a wrapper to avoid a page break before the table -just after the reference container headline. - -UI elements (expand/collapse button, backlink arrows) are hidden. - -Link color set to inherit, so referrers/numbers are not grayed out. - -@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report -@see - */ - -.footnotes_reference_container { - page-break-inside: avoid; -} - -@media print { - - .footnote_tooltip, - .footnote_reference_container_collapse_button, - .footnote_index_arrow { - display: none; - } - - .footnote_plugin_tooltip_text { - color: inherit; - } - - .footnote_plugin_index a, - .footnote_plugin_index_combi a { - color: inherit; - text-decoration: none !important; - } - - /* Edit button in WP2020 (added as a service) */ - div.post-meta-edit-link-wrapper { - display: none; - } -} - -/** - * MCI Footnotes logo - * - * The classes with 'heading' fixing display in dashboard - * have all their rules moved to settings.css so as to alleviate - * the common stylesheet. Still these rules are only used if the - * Footnotes ad link logo is present in the page footer per user - * dashboard setting. Making these rules conditional like those - * pertaining to tooltips, either jQuery or alternative, would - * double the number of united minified stylesheets shipped with - * the plugin. Hence these are present by default at the bottom. - * - * @see class/config.php - * @see css/settings.css - */ - -.footnotes_logo, -.footnotes_logo:hover { - text-decoration: none; - font-weight: normal; -} - -.footnotes_logo_part1 { - color: #2bb975; -} - -.footnotes_logo_part2 { - color: #545f5a; -} +/* + * .footnote_plugin_tooltip_text = inner + * .footnote_tooltip = inner + */ + +.footnote_referrer, +.footnote_referrer:link, +.footnote_referrer:hover, +.footnote_referrer > a, +.footnote_referrer > a:link, +.footnote_referrer > a:hover, +.footnote_plugin_tooltip_text, +.footnote_plugin_tooltip_text:hover, +.main-content .footnote_referrer, +.main-content .footnote_referrer:link, +.main-content .footnote_referrer:hover, +.main-content .footnote_referrer > a, +.main-content .footnote_referrer > a:link, +.main-content .footnote_referrer > a:hover, +.main-content .footnote_plugin_tooltip_text, +.main-content .footnote_plugin_tooltip_text:hover { + text-decoration: none !important; + border-bottom: none !important; + box-shadow: none !important; +} + +/** + * Footnote referrer (not “tooltip text”) + * + * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. + * + * @since 2.1.1 + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. + * + * @since 2.5.4 + * @reporter @wisenilesh + * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ + */ + +.footnote_plugin_tooltip_text { + line-height: 0; + position: relative !important; + cursor: pointer; +} + +/** + * Tooltips + * + * - Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. + * + * @since 2.1.6 + * @reporter @russianicons + * @link https://wordpress.org/support/topic/counter-styles-not-working/#post-13767299 + */ + +.footnote_tooltip { + display: none; + z-index: 2147483647 !important; + cursor: auto; + text-align: left; + padding: 12px; + line-height: 1.2; + font-weight: normal; + font-style: normal; +} + +/** + * Alternative tooltips + * + * These default position values may be overridden by internal CSS. + */ + +.footnote_referrer.relative { + position: relative; +} + +.footnote_tooltip.position { + display: unset; + position: absolute; + bottom: 24px; + left: -50px; + width: 400px; +} + +/* +fade-in parameters +*/ + +.footnote_tooltip.shown { + visibility: visible; + opacity: 1; + transition-property: visibility opacity; + transition-timing-function: linear; +/* +property values of settings are inline CSS + transition-delay: 0ms; + transition-duration: 200ms; +*/ +} + +/* +fade-out parameters +*/ + +.footnote_tooltip.hidden { + visibility: hidden; + opacity: 0; + transition-property: visibility opacity; + transition-timing-function: linear; +/* +property values of settings are inline CSS + transition-delay: 400ms; + transition-duration: 200ms; +*/ +} + +/* +Read-on button +*/ + +.footnote_tooltip_continue { + font-style: italic; + color: green; + text-decoration: none !important; + cursor: pointer; + white-space: nowrap; +} + +.footnote_tooltip_continue:hover { + color: blue; + text-decoration: underline !important; +} + + +/***************************************************** +Footnote reference container + +Templates: +templates/public/reference-container.html +templates/public/reference-container-body.html +templates/public/reference-container-combi.html +templates/public/reference-container-switch.html +templates/public/reference-container-3column.html + +Optional responsive basic page layout support +stylesheets: +css/layout-reference-container.css +css/layout-main-content.css +css/layout-page-content.css + +Classes: +.footnotes_reference_container = enclosing
                                                                                                                                                                      +.footnote_container_prepare = label
                                                                                                                                                                      +.footnote_reference_container_label = +.footnote_reference_container_collapse_button = sibling +.footnote-reference-container = misleading and inconsistent; alias: +.footnotes_table = +.footnotes_plugin_reference_row = +.footnote_plugin_index_combi = first - - - - + + + + + + diff --git a/templates/public/reference-container-body-combi.html b/templates/public/reference-container-body-combi.html index 49f9b8f..b69a453 100644 --- a/templates/public/reference-container-body-combi.html +++ b/templates/public/reference-container-body-combi.html @@ -1,14 +1,14 @@ - - - - - + + + + + diff --git a/templates/public/reference-container-body-switch.html b/templates/public/reference-container-body-switch.html index c3127d4..1f824e3 100644 --- a/templates/public/reference-container-body-switch.html +++ b/templates/public/reference-container-body-switch.html @@ -1,19 +1,19 @@ - - - - - + + + + + diff --git a/templates/public/reference-container-body.html b/templates/public/reference-container-body.html index bcd3ec4..f7158fd 100755 --- a/templates/public/reference-container-body.html +++ b/templates/public/reference-container-body.html @@ -1,24 +1,24 @@ - - - - - + + + + + diff --git a/templates/public/reference-container.html b/templates/public/reference-container.html index 9ce0632..05d9052 100644 --- a/templates/public/reference-container.html +++ b/templates/public/reference-container.html @@ -1,83 +1,83 @@ - -
                                                                                                                                                                      -
                                                                                                                                                                      <[[element]] - >[[name]][+]
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      if identical footnotes are combined +.footnote_plugin_index = first if not +.footnote_index = or in first in 3-column table +.footnote_plugin_symbol = second in 3-column table +.footnote_plugin_link = or (identical footnotes not combined) +.footnote_backlink = or +.footnote_index_arrow = nested , symbol only +.footnote_plugin_text = second , or third in 3-column table +*/ + +.footnotes_reference_container { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* +label +*/ + +.footnote_container_prepare { + display: block !important; + padding-top: 24px !important; +} + +.footnote_container_prepare > p { + line-height: 1.3 !important; + margin-top: 1em !important; + margin-bottom: 0.25em !important; + padding: 0 !important; + font-weight: normal !important; + /* bottom border optional since 2.2.5 */ + display: block !important; + -webkit-margin-before: 0.83em !important; + -webkit-margin-after: 0.83em !important; + -webkit-margin-start: 0px !important; + -webkit-margin-end: 0px !important; + text-align: left !important; + vertical-align: middle; +} + +.footnote_container_prepare > p > span:first-child, + .footnote_container_prepare > p > span:nth-child(3) { + text-align: start !important; + font-size: 1.5em !important; +} + +/* +collapse button +fully clickable, not sign only +*/ + +.footnote_reference_container_collapse_button { + cursor: pointer; + padding: 0 0.5em; + font-size: 1.3em !important; + vertical-align: 2px; + text-decoration: none !important; +} + +h2 > .footnote_reference_container_collapse_button, +h3 > .footnote_reference_container_collapse_button, +h4 > .footnote_reference_container_collapse_button, +h5 > .footnote_reference_container_collapse_button, +h6 > .footnote_reference_container_collapse_button { + font-size: inherit !important; +} + +.footnote_container_prepare > p > span:last-child a, +.footnote_reference_container_collapse_button a { + text-decoration: none !important; +} + +/* +table +*/ + +.footnote-reference-container, +.footnotes_table { + width: 100%; + border: none; +} + +/* +footnotes + +@since 2.0.0 borderless table cells, thanks to @ragonesi bug report +@see +@since 2.0.1 enforce borderless text cells through !important property, thanks to @ragonesi bug report +@see +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi, +.footnote_plugin_symbol, +.footnote_plugin_text { + border: none !important; + text-align: left !important; + vertical-align: top !important; + padding: 5px 6px 10px 0 !important; +} + +.footnote_backlink, +.footnote_backlink:link, +.footnote_plugin_link, +.footnote_plugin_link:link, +.main-content .footnote_backlink, +.main-content .footnote_backlink:link, +.main-content .footnote_plugin_link, +.main-content .footnote_plugin_link:link { + text-decoration: none !important; + border-bottom: none !important; +} + +.footnote_backlink, +.footnote_plugin_link { + white-space: nowrap; +} + +.pointer, +.footnote_index, +.footnote_backlink { + cursor: pointer; +} + +/* +These rules when enabled cause the backlink to take an overline +when hovered in some themes, not in others: +.footnote_plugin_index:hover, +.footnote_plugin_index_combi:hover, +.footnote_plugin_index.pointer:hover, +.footnote_plugin_index_combi.pointer:hover, +*/ + +.footnote_backlink:hover, +.footnote_plugin_link:hover, +.footnote_plugin_text a:hover { + text-decoration: unset; + text-decoration: underline; /*deprioritized to ease customization*/ +} + +.footnote_plugin_text { + width: unset; /*unset width of text column to fix site issues*/ +} + +/* +These rules are just defaults preventing the table from filling the width. +They are not very effective by lack of table-layout: fixed; +since 2.1.4 settings are optionally available, with table-layout: fixed; + +By default, the backlink column is auto-expanding to fit widest. +Not using 'max-content' as that causes no-wrap and overflows. +These are overridden if settings are enabled. +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi { + max-width: 100px; + width: 2.5em; +} + +/* +Responsive +*/ + +@media only screen and (max-width: 768px) { + + .footnote_plugin_index, + .footnote_plugin_index_combi { + max-width: 80px; + } +} + + +/**************************************************************** +Footnotes printing style rules + +Printing a table, browsers tend to avoid page breaks inside, +but it takes a wrapper to avoid a page break before the table +just after the reference container headline. + +UI elements (expand/collapse button, backlink arrows) are hidden. + +Link color set to inherit, so referrers/numbers are not grayed out. + +@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report +@see + */ + +.footnotes_reference_container { + page-break-inside: avoid; +} + +@media print { + + .footnote_tooltip, + .footnote_reference_container_collapse_button, + .footnote_index_arrow { + display: none; + } + + .footnote_plugin_tooltip_text { + color: inherit; + } + + .footnote_plugin_index a, + .footnote_plugin_index_combi a { + color: inherit; + text-decoration: none !important; + } + + /* Edit button in WP2020 (added as a service) */ + div.post-meta-edit-link-wrapper { + display: none; + } +} + +/** + * MCI Footnotes logo + * + * The classes with 'heading' fixing display in dashboard + * have all their rules moved to settings.css so as to alleviate + * the common stylesheet. Still these rules are only used if the + * Footnotes ad link logo is present in the page footer per user + * dashboard setting. Making these rules conditional like those + * pertaining to tooltips, either jQuery or alternative, would + * double the number of united minified stylesheets shipped with + * the plugin. Hence these are present by default at the bottom. + * + * @see class/config.php + * @see css/settings.css + */ + +.footnotes_logo, +.footnotes_logo:hover { + text-decoration: none; + font-weight: normal; +} + +.footnotes_logo_part1 { + color: #2bb975; +} + +.footnotes_logo_part2 { + color: #545f5a; +} diff --git a/css/dev-tooltips-alternative.css b/css/dev-tooltips-alternative.css index e22944a..d12e639 100644 --- a/css/dev-tooltips-alternative.css +++ b/css/dev-tooltips-alternative.css @@ -1,63 +1,63 @@ -/* -*/ -/*input[type=text], input[type=password], textarea, select*/ -#footnote_inputfield_readon_label, -#footnote_inputfield_references_label, -#footnote_inputfield_love { - padding-left: 8px !important; - padding-right: 8px !important; - width: 80% !important; -} - -#footnote_inputfield_reference_container_place { - width: 310px; -} - -#footnote_inputfield_counter_style, -#footnotes_inputfield_page_layout_support { - width: 505px; -} - -#footnote_inputfield_placeholder_start, -#footnote_inputfield_placeholder_end, -#footnote_inputfield_custom_mouse_over_box_excerpt_length { - width: 180px; -} -#footnote_inputfield_placeholder_start_user_defined, -#footnote_inputfield_placeholder_end_user_defined { - width: 320px; -} - -#footnote_inputfield_combine_identical, -#footnotes_inputfield_scroll_offset, -#footnotes_inputfield_scroll_duration, -#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, -#footnote_inputfield_custom_mouse_over_box_offset_x, -#footnote_inputfield_custom_mouse_over_box_offset_y, -#footnote_inputfield_custom_mouse_over_box_max_width, -#footnotes_inputfield_alternative_mouse_over_box_offset_x, -#footnotes_inputfield_alternative_mouse_over_box_offset_y, -#footnotes_inputfield_alternative_mouse_over_box_width, -#footnotes_inputfield_mouse_over_box_fade_in_delay, -#footnotes_inputfield_mouse_over_box_fade_in_duration, -#footnotes_inputfield_mouse_over_box_fade_out_delay, -#footnotes_inputfield_mouse_over_box_fade_out_duration, -#footnote_inputfield_custom_mouse_over_box_border_width, -#footnote_inputfield_custom_mouse_over_box_border_radius { - width: 80px; -} - -#footnote_inputfield_custom_hyperlink_symbol, -#footnotes_inputfield_backlinks_terminator_option, -#footnotes_inputfield_backlinks_separator_option { - width: 230px; -} - -#footnotes_inputfield_reference_container_top_margin, -#footnotes_inputfield_reference_container_bottom_margin, -#footnotes_inputfield_backlinks_column_width_scalar, -#footnotes_inputfield_backlinks_column_max_width_scalar, -#footnotes_inputfield_mouse_over_box_font_size_scalar { - width: 85px; -} - -#footnotes_inputfield_backlinks_column_width_unit, -#footnotes_inputfield_backlinks_column_max_width_unit, -#footnotes_inputfield_mouse_over_box_font_size_unit { - width: 140px; -} - -/************************************************************ -Headings and labels -*/ - -label { - display: inline-block; -} - -.postbox > h3 { - height: 32px !important; - line-height: 32px !important; -} - -.postbox > h3 > span { - padding: 0 10px; -} - -.postbox > .inside > table { - border: none !important; -} - -.postbox > .inside >table > tbody > tr > td:first-child { - width: 15% !important; - font-weight: bold !important; -} - -.footnote_placeholder_box_container { - text-align: center !important; -} - -span.footnote_highlight_placeholder { - font-weight: bold !important; - padding: 0 8px !important; -} - -.footnote_placeholder_box_example { - border: 2px solid #2bb975 !important; - border-radius: 4px !important; - padding: 16px 0 !important; - width: 50% !important; - display: block !important; - margin: 20px auto !important; - text-align: center !important; -} - -/************************************************************ -Special table layout - -Hooks and priority levels: -initialized from style attributes in templates -IE doesn’t support nth child, but these are not critical -*/ -.expert_lookup tr th:first-child, -.expert_lookup tr td:first-child { - width: 170px !important; -} -.expert_lookup tr th:nth-child(2), -.expert_lookup tr td:nth-child(2) { - width: 65px !important; -} -.expert_lookup tr th:nth-child(3), -.expert_lookup tr td:nth-child(3) { - width: 200px !important; -} -.expert_lookup tr td:nth-child(3) input { - width: 190px; -} -.expert_lookup tr th:last-child, -.expert_lookup tr td:last-child { - white-space: nowrap; -} - -/* -Custom CSS - -The number of CSS classes recommended for customization -significantly increased from 4 to 18 as of v2.4.0. - -Localized notices are dropped to ease translators’ task. -CSS classes are listed directly in the template -templates/dashboard/customize-css.html - -For better maintainability and readability of the source -list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: - - -The textarea has monospace font, but no other features -helping edit CSS, like tab support and syntactic colors. -*/ -#customize_css_new tr td:first-child { - width: 38% !important; - font-weight: normal !important; -} -.customize_css_new tr td:first-child span:first-child { - font-weight: bold !important; -} -.customize_css_new .list { - padding-top: 10px; -} -.customize_css_new .list p { - font-family: monospace; - padding: 0 10px; - text-indent: -10px; - margin: .5em 0; -} - -#footnote_inputfield_custom_css_new { - height: 500px; -} -#footnote_inputfield_custom_css, -#footnote_inputfield_custom_css_new { - width: 96%; - resize: both; - overflow: scroll; - font-family: monospace; -} - -/************************************************************ -Notices - -These spans were previously formatted using the em element. -But the intended semantics was not emphasis. -In locales using boldface to emphasize, the effect is the -exact opposite of the intention. - -So we must use spans with explicit italic font style. -Scripts not featuring italic fonts fall back to normal, -and that is just fine, as italic is only needed here for -scripts that do have italic, and failing to use it would -look weird. - -since 2.1.4 -*/ -.footnotes_notice { - font-style: italic; - display: inline-block; - text-align: end; -} - -/************************************************************ -Descriptions - -padded div above or below a settings table - -Use case: more extensive information not fitting into a brief -notice after the end of the settings box. -*/ -.footnotes_description { - padding: 0 4%; -} -.footnotes_description p { - font-size: 1.06em; - font-style: italic; -} +/* +*/ +/*input[type=text], input[type=password], textarea, select*/ +#footnote_inputfield_readon_label, +#footnote_inputfield_references_label, +#footnote_inputfield_love { + padding-left: 8px !important; + padding-right: 8px !important; + width: 80% !important; +} + +#footnote_inputfield_reference_container_place { + width: 310px; +} + +#footnote_inputfield_counter_style, +#footnotes_inputfield_page_layout_support { + width: 505px; +} + +#footnote_inputfield_placeholder_start, +#footnote_inputfield_placeholder_end, +#footnote_inputfield_custom_mouse_over_box_excerpt_length { + width: 180px; +} +#footnote_inputfield_placeholder_start_user_defined, +#footnote_inputfield_placeholder_end_user_defined { + width: 320px; +} + +#footnote_inputfield_combine_identical, +#footnotes_inputfield_scroll_offset, +#footnotes_inputfield_scroll_duration, +#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, +#footnote_inputfield_custom_mouse_over_box_offset_x, +#footnote_inputfield_custom_mouse_over_box_offset_y, +#footnote_inputfield_custom_mouse_over_box_max_width, +#footnotes_inputfield_alternative_mouse_over_box_offset_x, +#footnotes_inputfield_alternative_mouse_over_box_offset_y, +#footnotes_inputfield_alternative_mouse_over_box_width, +#footnotes_inputfield_mouse_over_box_fade_in_delay, +#footnotes_inputfield_mouse_over_box_fade_in_duration, +#footnotes_inputfield_mouse_over_box_fade_out_delay, +#footnotes_inputfield_mouse_over_box_fade_out_duration, +#footnote_inputfield_custom_mouse_over_box_border_width, +#footnote_inputfield_custom_mouse_over_box_border_radius { + width: 80px; +} + +#footnote_inputfield_custom_hyperlink_symbol, +#footnotes_inputfield_backlinks_terminator_option, +#footnotes_inputfield_backlinks_separator_option { + width: 230px; +} + +#footnotes_inputfield_reference_container_top_margin, +#footnotes_inputfield_reference_container_bottom_margin, +#footnotes_inputfield_backlinks_column_width_scalar, +#footnotes_inputfield_backlinks_column_max_width_scalar, +#footnotes_inputfield_mouse_over_box_font_size_scalar { + width: 85px; +} + +#footnotes_inputfield_backlinks_column_width_unit, +#footnotes_inputfield_backlinks_column_max_width_unit, +#footnotes_inputfield_mouse_over_box_font_size_unit { + width: 140px; +} + +/************************************************************ +Headings and labels +*/ + +label { + display: inline-block; +} + +.postbox > h3 { + height: 32px !important; + line-height: 32px !important; +} + +.postbox > h3 > span { + padding: 0 10px; +} + +.postbox > .inside > table { + border: none !important; +} + +.postbox > .inside >table > tbody > tr > td:first-child { + width: 15% !important; + font-weight: bold !important; +} + +.footnote_placeholder_box_container { + text-align: center !important; +} + +span.footnote_highlight_placeholder { + font-weight: bold !important; + padding: 0 8px !important; +} + +.footnote_placeholder_box_example { + border: 2px solid #2bb975 !important; + border-radius: 4px !important; + padding: 16px 0 !important; + width: 50% !important; + display: block !important; + margin: 20px auto !important; + text-align: center !important; +} + +/************************************************************ +Special table layout + +Hooks and priority levels: +initialized from style attributes in templates +IE doesn’t support nth child, but these are not critical +*/ +.expert_lookup tr th:first-child, +.expert_lookup tr td:first-child { + width: 170px !important; +} +.expert_lookup tr th:nth-child(2), +.expert_lookup tr td:nth-child(2) { + width: 65px !important; +} +.expert_lookup tr th:nth-child(3), +.expert_lookup tr td:nth-child(3) { + width: 200px !important; +} +.expert_lookup tr td:nth-child(3) input { + width: 190px; +} +.expert_lookup tr th:last-child, +.expert_lookup tr td:last-child { + white-space: nowrap; +} + +/* +Custom CSS + +The number of CSS classes recommended for customization +significantly increased from 4 to 18 as of v2.4.0. + +Localized notices are dropped to ease translators’ task. +CSS classes are listed directly in the template +templates/dashboard/customize-css.html + +For better maintainability and readability of the source +list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: + + +The textarea has monospace font, but no other features +helping edit CSS, like tab support and syntactic colors. +*/ +#customize_css_new tr td:first-child { + width: 38% !important; + font-weight: normal !important; +} +.customize_css_new tr td:first-child span:first-child { + font-weight: bold !important; +} +.customize_css_new .list { + padding-top: 10px; +} +.customize_css_new .list p { + font-family: monospace; + padding: 0 10px; + text-indent: -10px; + margin: .5em 0; +} + +#footnote_inputfield_custom_css_new { + height: 500px; +} +#footnote_inputfield_custom_css, +#footnote_inputfield_custom_css_new { + width: 96%; + resize: both; + overflow: scroll; + font-family: monospace; +} + +/************************************************************ +Notices + +These spans were previously formatted using the em element. +But the intended semantics was not emphasis. +In locales using boldface to emphasize, the effect is the +exact opposite of the intention. + +So we must use spans with explicit italic font style. +Scripts not featuring italic fonts fall back to normal, +and that is just fine, as italic is only needed here for +scripts that do have italic, and failing to use it would +look weird. + +since 2.1.4 +*/ +.footnotes_notice { + font-style: italic; + display: inline-block; + text-align: end; +} + +/************************************************************ +Descriptions + +padded div above or below a settings table + +Use case: more extensive information not fitting into a brief +notice after the end of the settings box. +*/ +.footnotes_description { + padding: 0 4%; +} +.footnotes_description p { + font-size: 1.06em; + font-style: italic; +} diff --git a/features.txt b/features.txt index c5a4b23..59f5368 100644 --- a/features.txt +++ b/features.txt @@ -1,20 +1,20 @@ - - -== Footnotes Features == -- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes on a single page - - Maybe increase PHP max execution time while processing the Footnotes task -- different background for every odd table row - -- Offer a set of pre-defined styles for the footnotes.Reference.Container -There should be 2 pre-defined styles for the footnotes.Reference.Container and the ability to customize or add templates. -the currently used one should be one of those templates and pre-defined styles offered but not the default setting. - - -== Footnotes Bugs == -- Setting "Excerpt No" doesn't work - - -== TODO == - - Statistics: How many Footnotes in each post/page - - Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes) + + +== Footnotes Features == +- Performance of the task so PHP won't throw an error when there are more than 120? Footnotes on a single page + - Maybe increase PHP max execution time while processing the Footnotes task +- different background for every odd table row + +- Offer a set of pre-defined styles for the footnotes.Reference.Container +There should be 2 pre-defined styles for the footnotes.Reference.Container and the ability to customize or add templates. +the currently used one should be one of those templates and pre-defined styles offered but not the default setting. + + +== Footnotes Bugs == +- Setting "Excerpt No" doesn't work + + +== TODO == + - Statistics: How many Footnotes in each post/page + - Convert from other Footnote Plugins (e.g. ' ((' from Civil Footnotes) - Anonymous stats to the developers \ No newline at end of file diff --git a/footnotes.php b/footnotes.php index 669f735..b227652 100755 --- a/footnotes.php +++ b/footnotes.php @@ -1,74 +1,74 @@ -run(); - -/** - * Sets the stylesheet enqueuing mode for production. - * - * @since 2.5.5 - * @var bool - * @see class/init.php - * - * In production, a minified CSS file tailored to the settings is enqueued. - * - * Developing stylesheets is meant to be easier when this is set to false. - * WARNING: This facility designed for development must NOT be used in production. - */ -define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); +run(); + +/** + * Sets the stylesheet enqueuing mode for production. + * + * @since 2.5.5 + * @var bool + * @see class/init.php + * + * In production, a minified CSS file tailored to the settings is enqueued. + * + * Developing stylesheets is meant to be easier when this is set to false. + * WARNING: This facility designed for development must NOT be used in production. + */ +define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); diff --git a/includes.php b/includes.php index aa35d1c..732cfb9 100644 --- a/includes.php +++ b/includes.php @@ -1,37 +1,38 @@ - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read . \ No newline at end of file diff --git a/readme.txt b/readme.txt index 1d355b5..1e38ae2 100755 --- a/readme.txt +++ b/readme.txt @@ -1,625 +1,625 @@ -=== footnotes === -Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges -Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing -Requires at least: 3.9 -Tested up to: 5.6.1 -Requires PHP: 5.6 -Stable Tag: 2.5.7 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html - -== Description == - -Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ -Cheers for the review, folks! - -https://www.youtube.com/watch?v=HzHaMAAJwbI - -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. - -= Main Features = -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. - -= Example Usage = -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -= Where to get footnotes? = -The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). - -= Support = -Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). - -Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). - -= Development = -Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). - -== Frequently Asked Questions == - -= Is your Plugin a copy of footnotes x? = - -No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. - -= Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = - -1. For anyone interested in converting from the FD Footnotes plugin: -Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 -2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! - -== Installation == -- Visit your WordPress Admin area -- Navigate to `Plugins\Add` -- Search for **footnotes** and find this Plugin among others -- Install the latest version of the **footnotes** Plugin from WordPress.org -- Activate the Plugin - -== Screenshots == -1. Find the footnotes plugin settings in the newly added "ManFisher" Menu -2. Settings for the *References Container* -3. Settings for **footnotes** styling -4. Settings for **footnotes** love -5. Other Settings -6. The HowTo section in the **footnotes** settings -7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? - -== Changelog == - -= 2.5.7 = -- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. - -= 2.5.6 = -- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. -- Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. - -= 2.5.5 = -- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. -- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. -- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. -- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. -- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. -- Update: Dashboard: decrease font size and padding of the descriptions. - -= 2.5.4 = -- 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. -- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. -- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. -- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. -- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. -- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. -- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. -- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. -- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. -- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. -- Bugfix: Editor button: Classic Editor text mode: correct label to singular. -- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. - -= 2.5.3 = -- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. - -= 2.5.2 = -- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. -- Bugfix: Localization: plugin language file name changes effective in version control system. - -= 2.5.1 = -- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. -- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. -- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. -- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. -- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. -- Update: Readme/documentation: add new contributors in the file header’s Contributors field. -- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. - -= 2.5.0 = -- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. -- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. -- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. -- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. -- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. - -= 2.4.0 = -- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. -- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. -- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. -- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. -- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. -- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. -- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. -- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. - -= 2.3.0 = -- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. -- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. -- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. -- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. -- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. -- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. -- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. -- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. -- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. - -= 2.2.10 = -- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. -- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. -- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. - -= 2.2.9 = -- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. -- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. -- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. -- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. - -= 2.2.8 = -- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - -= 2.2.7 = -- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - -= 2.2.6 = -- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. -- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - -= 2.2.5 = -- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. -- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. -- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. -- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. -- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). -- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). -- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. - -= 2.2.4 = -- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. -- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. - -= 2.2.3 = -- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. - -= 2.2.2 = -- Bugfix: Dashboard: Link element setting only under General settings > Reference container. -- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. -- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. - -= 2.2.1 = -- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. - -= 2.2.0 = -- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. -- Adding: Start/end short codes: more predefined options. -- Adding: Numbering styles: lowercase Roman numerals support. -- Update: Priority levels: update the notice in the dashboard Priority tab. -- Update: Dashboard: Tooltip settings: group into 3 thematic containers. -- Update: Dashboard: Main settings: group into 3 specific containers. -- Update: Dashboard: move link element option to the Referrers options. -- Update: Dashboard: move URL wrap option to the Reference container options. -- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. -- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. -- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. -- Bugfix: Localization: correct arguments for plugin textdomain load function. -- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. -- Adding: Footnotes mention in the footer: more options. - -= 2.1.6 = -- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. -- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. -- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. -- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. -- Update: Dashboard: reorder tabs and update tab labels. -- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. -- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. -- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. - -= 2.1.5 = -- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - -= 2.1.4 = -- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. -- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. -- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. -- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. -- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). -- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. -- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. -- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. -- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Referrers: Styling: disable hover underline. -- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. -- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. -- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. -- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. -- Bugfix: Reference container: Label: delete overflow hidden rule. -- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. -- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. -- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. -- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. -- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. -- Update: Dashboard: Notices: use explicit italic style. -- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. -- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. -- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. - -= 2.1.3 = -- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. -- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. -- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. -- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. -- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. -- Bugfix: Styling: raise Custom CSS priority to override settings. -- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. - -= 2.1.2 = -- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. -- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. -- Update: Dashboard: WordPress documentation URLs of the hooks. -- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. - -= 2.1.1 = -- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. -- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. -- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. -- Bugfix: Libraries: jQuery Tools: complete minification. -- Bugfix: Libraries: make script loads depend on tooltip implementation option. -- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. -- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. -- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. -- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. -- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. -- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. -- Bugfix: Reference container: Table rows: fix top and bottom padding. -- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. -- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. -- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. -- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. -- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. -- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. - -= 2.1.0 = -- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. -- Bugfix: Referrers: disable bottom border for theme compatibility. -- Update: Accessibility: add 'speaker-mute' class to reference container. -- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. -- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - -= 2.0.8 = -- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). - -= 2.0.7 = -- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. -- Update: Set priority level back to 10 assuming it is unproblematic. -- Update: Added backwards compatible support for legacy arrow and index placeholders in template. -- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. - -= 2.0.6 = -- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. -- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. -- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. -- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. -- Bugfix: Reference container: IDs: slightly increased left padding. -- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. -- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). -- Bugfix: Reference container: Collapse button fully clickable, not sign only. -- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. -- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). -- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). -- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). -- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. - -= 2.0.5 = -- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. -- Bugfix: Reference container: unset width of text column to fix site issues. -- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. -- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. -- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). - -= 2.0.4 = -- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: GDPR: Add jQuery UI from WordPress instead of third party. -- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. -- Bugfix: Reference container: remove inconvenient left/right cellpadding. -- Bugfix: Tooltips: improve layout with inherited font size by lower line height. -- Bugfix: Tooltips: 'Continue reading' button: disable default underline. -- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. -- Bugfix: Dashboard: fix display of two headings containing the logo. - -= 2.0.3 = -- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. -- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. -- Bugfix: Fragment IDs: Prepended post ID to footnote number. -- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. -- Bugfix: Print style: prevent a page break just after the reference container label. -- Bugfix: Print style: Hide reference collapse button. -- Update: Reference container: Headline: remove padding before reference container label. -- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. - -= 2.0.2 = -- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. -- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. -- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. -- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. - -= 2.0.1 = -- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. -- Update: Translations: revised fr_FR. - -= 2.0.0 = -- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: -- Update: **symbol for backlinks** removed -- Update: hyperlink moved to the reference number -- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. -- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. -- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. -- Bugfix: footnote links script independent -- Bugfix: Get the “Continue reading” link to work in the mouse-over box -- Bugfix: Debug printed posts and pages -- Bugfix: Display of combined identical notes -- Update: Adjusted scrolling time and offset -- Bugfix: No borders around footnotes in the container -- Bugfix: Mouse-over box display timing -- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES - -= 1.6.6 = -- Beginning of translation to French - -= 1.6.5 = -- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. -- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. -- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text -- Bugfix: Dashboard: fix error on demo under the Preview tab. - -= 1.6.4 = -- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. -- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - -= 1.6.3 = -- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress - -= 1.6.2 = -- Update: Changed the Preview tab -- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled - -= 1.6.1 = -- Update: Translations -- Bugfix: Move to anchor - -= 1.6.0 = -- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) -- Adding: Setting to customize the mouse-over box shadow -- Adding: Translation: United States -- Adding: Translation: Austria -- Adding: Translation: Spanish (many thanks to Pablo L.) -- Update: Translations (de_DE and en_GB) -- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) -- Update: ManFisher note styling -- Update: Tested with latest nightly build of WordPress 4.1 -- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed - -= 1.5.7 = -- Adding: Setting to define the positioning of the mouse-over box -- Adding: Setting to define an offset for the mouse-over box (precise positioning) -- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) -- Bugfix: Rating calculation for the 'other plugins' list - -= 1.5.6 = -- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. -- Adding: .pot file to enable Translations for everybody -- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) -- Update: Translation file names -- Update: Translation EN and DE -- Update: Styling of the superscript (need to check custom CSS code for the superscript) -- Update: Description of CSS classes for the 'customize CSS' text area -- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) -- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting -- Bugfix: Enable multiple WP_Post objects for the_post hook - -= 1.5.5 = -- Adding: Expert mode setting -- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) -- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes -- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) -- Bugfix: Activation, Deactivation and Uninstall hook class name -- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin -- Bugfix: Display the Reference container in the Footer correctly - -= 1.5.4 = -- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) -- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) -- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) -- Update: Receiving list of other Plugins from the Developer Team from an external server -- Update: Translations (EN and DE) -- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) -- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) -- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database - -= 1.5.3 = -- Adding: Developer's homepage to the 'other Plugins' list -- Update: Smoothy scroll to an anchor using Javascript -- Bugfix: Set the vertical align for each cell in the Reference container to TOP - -= 1.5.2 = -- Adding: Setting to enable/disable the mouse-over box -- Adding: Current WordPress Theme to the Diagnostics sub page -- Adding: ManFisher note in the "other Plugins" sub page -- Update: Removed unnecessary hidden inputs from the Settings page -- Update: Merged public CSS files to reduce the output and improve the performance -- Update: Translations (EN and DE) -- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting -- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) -- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' - -= 1.5.1 = -- Bugfix: Broken Settings link in the Plugin listing -- Bugfix: Translation overhaul for German - -= 1.5.0 = -- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" -- Adding: Sub Page to list all other Plugins of the Contributors -- Adding: Hyperlink to manfisher.eu in the "other plugins" page -- Update: Refactored the whole source code -- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" -- Bugfix: Line up Footnotes with multiple lines in the Reference container -- Bugfix: Load text domain -- Bugfix: Display the Footnotes button in the plain text editor of posts/pages - -= 1.4.0 = -- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) -- Update: Changed e-Mail support address to the WordPress support forum -- Update: Language EN and DE -- Adding: Tab for Plugin Diagnostics -- Adding: Donate link to the installed Plugin overview page -- Adding: Donate button to the "HowTo" tab - -= 1.3.4 = -- Bugfix: Settings access permission vor sub-sites -- Bugfix: Setting 'combine identical footnotes' working as it should - -= 1.3.3 = -- Update: Changed the Author name from a fictitious entity towards a real registered company -- Update: Changed the Author URI - -= 1.3.2 = -- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) -- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) -- Update: language EN and DE -- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference -- Adding: Setting to enter a user defined hyperlink symbol -- - -= 1.3.1 = -- Bugfix: Allow settings to be empty -- Bugfix: Removed space between the hyperlink and superscript in the footnotes index -- Adding: Setting to customize the text before and after the footnotes index in superscript - -= 1.3.0 = -- Bugfix: Changed tooltip class to be unique -- Bugfix: Changed superscript styling to not manipulate the line height -- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks -- Update: Reformatted code -- Adding: new settings tab for custom CSS settings - -= 1.2.5 = -- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) - -= 1.2.4 = -- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) -- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) -- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) - -= 1.2.3 = -- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) -- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) -- Bugfix: Removed Widget text formatting -- Bugfix: Load default settings value of setting doesn't exist yet (first usage) -- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content -- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) - -= 1.2.2 = -- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) -- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer -- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" -- Bugfix: Replace footnote short code -- Update: Combined buttons for the "collapse/expand" reference container - -= 1.2.1 = -- Bugfix: HowTo example will be displayed correctly if a user defined short code is set - -= 1.2.0 = -- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag -- Feature: Icon for the WYSIWYG-editor button -- Feature: Pre defined footnote short codes -- Experimental: User defined short code for defining footnotes -- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" -- Update: Moved footnotes 'love' settings to a separate container -- Update: Translation for new settings and for the Widget description -- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" - -= 1.1.1 = -- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) -- Update: Setting where the reference container appears on public pages can also be set to the widget area -- Adding: Link to the wordpress.org support page in the plugin main page -- Update: Changed plugin URL from GitHub to WordPress -- Bugfix: Uninstall function to really remove all settings done in the settings page -- Bugfix: Load default settings after plugin is installed -- Update: Translation for support link and new setting option -- Adding: Label to display the user the short code to not display the 'love me' slug - -= 1.1.0 = -- Update: Global styling for the public plugin name -- Update: Easier usage of the public plugin name in translations -- Update: New Layout for the settings page to group similar settings to get a better overview -- Update: Display settings submit button only if there is at least 1 editable setting in the current tab -- Adding: Setting where the reference container appears on public pages (needs some corrections!) -- Bugfix: Displays only one reference container in front of the footer on category pages - -= 1.0.6 = -- Bugfix: Uninstall function to delete all plugin settings -- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above -- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over -- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' - -= 1.0.5 = -- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. -- Update: Plugin description for public directories (WordPress.org and GitHub) -- Feature: the footnotes WordPress Plugin now has its very own CI - - Update: Styling - - Update: Settings to support the styling -- Adding: Inspirational Screenshots for further development -- Adding: Settings screenshot -- Update: i18n fine-tuning - -= 1.0.4 = -- Update: replacing function when footnote is a link (bugfix) -- Footnote hover box remains until cursor leaves footnote or hover box -- Links in the footnote hover box are click able -- Adding: setting to allow footnotes on Summarized Posts -- Adding: setting to tell the world you're using footnotes plugin -- Adding: setting for the counter style of the footnote index - - Arabic Numbers (1, 2, 3, 4, 5, ...) - - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) - - Latin Characters lower-case (a, b, c, d, e, ...) - - Latin Characters upper-case (A, B, C, D, E, ...) - - Roman Numerals (I, II, III, IV, V, ...) -- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it -- Update: translations for the new settings -- Switch back the version numbering scheme to have 3 digits - -= 1.0.3 = -- Adding: setting to use personal starting and ending tag for the footnotes -- Update: translations for the new setting -- Update: reading settings and fallback to default values (bugfix) - -= 1.0.2 = -- Adding: setting to collapse the reference container by default -- Adding: link behind the footnotes to automatically jump to the reference container -- Adding: function to easy output input fields for the settings page -- Update: translation for the new setting - -= 1.0.1 = -- Separated functions in different files for a better overview -- Adding: a version control to each file / class / function / variable -- Adding: layout for the settings menu, settings split in tabs and not a list-view -- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) -- Update: translations for EN and DE -- Changed version number from 3 digits to 2 digits - -= 1.0.0 = -- First development Version of the Plugin - -== Upgrade Notice == -to upgrade our plugin is simple. Just update the plugin within your WordPress installation. -To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future +=== footnotes === +Contributors: mark.cheret, lolzim, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, misfist, rumperuu, spaceling, vonpiernik, pewgeuges +Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing +Requires at least: 3.9 +Tested up to: 5.6.1 +Requires PHP: 5.6 +Stable Tag: 2.5.7 +License: GPLv3 or later +License URI: http://www.gnu.org/licenses/gpl-3.0.html + +== Description == + +Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +Cheers for the review, folks! + +https://www.youtube.com/watch?v=HzHaMAAJwbI + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. + += Main Features = +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + += Example Usage = +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + += Where to get footnotes? = +The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). + += Support = +Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). + +Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). + += Development = +Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). + +== Frequently Asked Questions == + += Is your Plugin a copy of footnotes x? = + +No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. + += Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = + +1. For anyone interested in converting from the FD Footnotes plugin: +Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 +2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! + +== Installation == +- Visit your WordPress Admin area +- Navigate to `Plugins\Add` +- Search for **footnotes** and find this Plugin among others +- Install the latest version of the **footnotes** Plugin from WordPress.org +- Activate the Plugin + +== Screenshots == +1. Find the footnotes plugin settings in the newly added "ManFisher" Menu +2. Settings for the *References Container* +3. Settings for **footnotes** styling +4. Settings for **footnotes** love +5. Other Settings +6. The HowTo section in the **footnotes** settings +7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? + +== Changelog == + += 2.5.7 = +- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. + += 2.5.6 = +- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. +- Bugfix: Alternative tooltips: shrink width to short content. +- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. + += 2.5.5 = +- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. +- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. +- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. +- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. +- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. +- Update: Dashboard: decrease font size and padding of the descriptions. + += 2.5.4 = +- 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. +- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. +- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. +- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. +- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. +- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. +- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. +- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. +- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. +- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. +- Bugfix: Editor button: Classic Editor text mode: correct label to singular. +- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. + += 2.5.3 = +- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. + += 2.5.2 = +- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. +- Bugfix: Localization: plugin language file name changes effective in version control system. + += 2.5.1 = +- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. +- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. +- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. +- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. +- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. +- Update: Readme/documentation: add new contributors in the file header’s Contributors field. +- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. + += 2.5.0 = +- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. +- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. +- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. +- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. +- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. + += 2.4.0 = +- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. +- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. +- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. +- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. +- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. +- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. +- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. +- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. + += 2.3.0 = +- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. +- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. +- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. +- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. +- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. +- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. +- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. +- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. +- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. + += 2.2.10 = +- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. +- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. +- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. + += 2.2.9 = +- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. +- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. +- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. +- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. + += 2.2.8 = +- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + += 2.2.7 = +- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + += 2.2.6 = +- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. +- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. + += 2.2.5 = +- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. +- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. +- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. +- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. +- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). +- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). +- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. + += 2.2.4 = +- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. +- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. + += 2.2.3 = +- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. + += 2.2.2 = +- Bugfix: Dashboard: Link element setting only under General settings > Reference container. +- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. +- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. + += 2.2.1 = +- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. + += 2.2.0 = +- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. +- Adding: Start/end short codes: more predefined options. +- Adding: Numbering styles: lowercase Roman numerals support. +- Update: Priority levels: update the notice in the dashboard Priority tab. +- Update: Dashboard: Tooltip settings: group into 3 thematic containers. +- Update: Dashboard: Main settings: group into 3 specific containers. +- Update: Dashboard: move link element option to the Referrers options. +- Update: Dashboard: move URL wrap option to the Reference container options. +- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. +- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. +- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. +- Bugfix: Localization: correct arguments for plugin textdomain load function. +- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. +- Adding: Footnotes mention in the footer: more options. + += 2.1.6 = +- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. +- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. +- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. +- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. +- Update: Dashboard: reorder tabs and update tab labels. +- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. +- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. +- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. + += 2.1.5 = +- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + += 2.1.4 = +- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. +- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. +- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. +- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. +- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). +- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. +- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. +- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. +- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Referrers: Styling: disable hover underline. +- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. +- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. +- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. +- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. +- Bugfix: Reference container: Label: delete overflow hidden rule. +- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. +- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. +- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. +- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. +- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. +- Update: Dashboard: Notices: use explicit italic style. +- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. +- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. +- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. + += 2.1.3 = +- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. +- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. +- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. +- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. +- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. +- Bugfix: Styling: raise Custom CSS priority to override settings. +- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. + += 2.1.2 = +- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. +- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. +- Update: Dashboard: WordPress documentation URLs of the hooks. +- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. + += 2.1.1 = +- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. +- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. +- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. +- Bugfix: Libraries: jQuery Tools: complete minification. +- Bugfix: Libraries: make script loads depend on tooltip implementation option. +- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. +- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. +- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. +- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. +- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. +- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. +- Bugfix: Reference container: Table rows: fix top and bottom padding. +- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. +- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. +- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. +- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. +- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. +- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. + += 2.1.0 = +- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. +- Bugfix: Referrers: disable bottom border for theme compatibility. +- Update: Accessibility: add 'speaker-mute' class to reference container. +- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. +- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + += 2.0.8 = +- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). + += 2.0.7 = +- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. +- Update: Set priority level back to 10 assuming it is unproblematic. +- Update: Added backwards compatible support for legacy arrow and index placeholders in template. +- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. + += 2.0.6 = +- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. +- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. +- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. +- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. +- Bugfix: Reference container: IDs: slightly increased left padding. +- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. +- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). +- Bugfix: Reference container: Collapse button fully clickable, not sign only. +- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. +- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). +- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). +- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. + += 2.0.5 = +- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. +- Bugfix: Reference container: unset width of text column to fix site issues. +- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. +- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. +- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). + += 2.0.4 = +- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. +- Update: GDPR: Add jQuery UI from WordPress instead of third party. +- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. +- Bugfix: Reference container: remove inconvenient left/right cellpadding. +- Bugfix: Tooltips: improve layout with inherited font size by lower line height. +- Bugfix: Tooltips: 'Continue reading' button: disable default underline. +- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. +- Bugfix: Dashboard: fix display of two headings containing the logo. + += 2.0.3 = +- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. +- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. +- Bugfix: Fragment IDs: Prepended post ID to footnote number. +- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. +- Bugfix: Print style: prevent a page break just after the reference container label. +- Bugfix: Print style: Hide reference collapse button. +- Update: Reference container: Headline: remove padding before reference container label. +- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. + += 2.0.2 = +- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. +- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. +- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. +- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. + += 2.0.1 = +- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. +- Update: Translations: revised fr_FR. + += 2.0.0 = +- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: +- Update: **symbol for backlinks** removed +- Update: hyperlink moved to the reference number +- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. +- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. +- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. +- Bugfix: footnote links script independent +- Bugfix: Get the “Continue reading” link to work in the mouse-over box +- Bugfix: Debug printed posts and pages +- Bugfix: Display of combined identical notes +- Update: Adjusted scrolling time and offset +- Bugfix: No borders around footnotes in the container +- Bugfix: Mouse-over box display timing +- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES + += 1.6.6 = +- Beginning of translation to French + += 1.6.5 = +- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. +- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. +- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text +- Bugfix: Dashboard: fix error on demo under the Preview tab. + += 1.6.4 = +- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. +- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + += 1.6.3 = +- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress + += 1.6.2 = +- Update: Changed the Preview tab +- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled + += 1.6.1 = +- Update: Translations +- Bugfix: Move to anchor + += 1.6.0 = +- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) +- Adding: Setting to customize the mouse-over box shadow +- Adding: Translation: United States +- Adding: Translation: Austria +- Adding: Translation: Spanish (many thanks to Pablo L.) +- Update: Translations (de_DE and en_GB) +- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) +- Update: ManFisher note styling +- Update: Tested with latest nightly build of WordPress 4.1 +- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed + += 1.5.7 = +- Adding: Setting to define the positioning of the mouse-over box +- Adding: Setting to define an offset for the mouse-over box (precise positioning) +- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) +- Bugfix: Rating calculation for the 'other plugins' list + += 1.5.6 = +- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. +- Adding: .pot file to enable Translations for everybody +- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) +- Update: Translation file names +- Update: Translation EN and DE +- Update: Styling of the superscript (need to check custom CSS code for the superscript) +- Update: Description of CSS classes for the 'customize CSS' text area +- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) +- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting +- Bugfix: Enable multiple WP_Post objects for the_post hook + += 1.5.5 = +- Adding: Expert mode setting +- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) +- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes +- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) +- Bugfix: Activation, Deactivation and Uninstall hook class name +- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin +- Bugfix: Display the Reference container in the Footer correctly + += 1.5.4 = +- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) +- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) +- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) +- Update: Receiving list of other Plugins from the Developer Team from an external server +- Update: Translations (EN and DE) +- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) +- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) +- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database + += 1.5.3 = +- Adding: Developer's homepage to the 'other Plugins' list +- Update: Smoothy scroll to an anchor using Javascript +- Bugfix: Set the vertical align for each cell in the Reference container to TOP + += 1.5.2 = +- Adding: Setting to enable/disable the mouse-over box +- Adding: Current WordPress Theme to the Diagnostics sub page +- Adding: ManFisher note in the "other Plugins" sub page +- Update: Removed unnecessary hidden inputs from the Settings page +- Update: Merged public CSS files to reduce the output and improve the performance +- Update: Translations (EN and DE) +- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting +- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) +- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' + += 1.5.1 = +- Bugfix: Broken Settings link in the Plugin listing +- Bugfix: Translation overhaul for German + += 1.5.0 = +- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" +- Adding: Sub Page to list all other Plugins of the Contributors +- Adding: Hyperlink to manfisher.eu in the "other plugins" page +- Update: Refactored the whole source code +- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" +- Bugfix: Line up Footnotes with multiple lines in the Reference container +- Bugfix: Load text domain +- Bugfix: Display the Footnotes button in the plain text editor of posts/pages + += 1.4.0 = +- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) +- Update: Changed e-Mail support address to the WordPress support forum +- Update: Language EN and DE +- Adding: Tab for Plugin Diagnostics +- Adding: Donate link to the installed Plugin overview page +- Adding: Donate button to the "HowTo" tab + += 1.3.4 = +- Bugfix: Settings access permission vor sub-sites +- Bugfix: Setting 'combine identical footnotes' working as it should + += 1.3.3 = +- Update: Changed the Author name from a fictitious entity towards a real registered company +- Update: Changed the Author URI + += 1.3.2 = +- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) +- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) +- Update: language EN and DE +- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference +- Adding: Setting to enter a user defined hyperlink symbol +- + += 1.3.1 = +- Bugfix: Allow settings to be empty +- Bugfix: Removed space between the hyperlink and superscript in the footnotes index +- Adding: Setting to customize the text before and after the footnotes index in superscript + += 1.3.0 = +- Bugfix: Changed tooltip class to be unique +- Bugfix: Changed superscript styling to not manipulate the line height +- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks +- Update: Reformatted code +- Adding: new settings tab for custom CSS settings + += 1.2.5 = +- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) + += 1.2.4 = +- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) +- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) +- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) + += 1.2.3 = +- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) +- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) +- Bugfix: Removed Widget text formatting +- Bugfix: Load default settings value of setting doesn't exist yet (first usage) +- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content +- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) + += 1.2.2 = +- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) +- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer +- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" +- Bugfix: Replace footnote short code +- Update: Combined buttons for the "collapse/expand" reference container + += 1.2.1 = +- Bugfix: HowTo example will be displayed correctly if a user defined short code is set + += 1.2.0 = +- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag +- Feature: Icon for the WYSIWYG-editor button +- Feature: Pre defined footnote short codes +- Experimental: User defined short code for defining footnotes +- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" +- Update: Moved footnotes 'love' settings to a separate container +- Update: Translation for new settings and for the Widget description +- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" + += 1.1.1 = +- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) +- Update: Setting where the reference container appears on public pages can also be set to the widget area +- Adding: Link to the wordpress.org support page in the plugin main page +- Update: Changed plugin URL from GitHub to WordPress +- Bugfix: Uninstall function to really remove all settings done in the settings page +- Bugfix: Load default settings after plugin is installed +- Update: Translation for support link and new setting option +- Adding: Label to display the user the short code to not display the 'love me' slug + += 1.1.0 = +- Update: Global styling for the public plugin name +- Update: Easier usage of the public plugin name in translations +- Update: New Layout for the settings page to group similar settings to get a better overview +- Update: Display settings submit button only if there is at least 1 editable setting in the current tab +- Adding: Setting where the reference container appears on public pages (needs some corrections!) +- Bugfix: Displays only one reference container in front of the footer on category pages + += 1.0.6 = +- Bugfix: Uninstall function to delete all plugin settings +- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above +- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over +- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' + += 1.0.5 = +- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. +- Update: Plugin description for public directories (WordPress.org and GitHub) +- Feature: the footnotes WordPress Plugin now has its very own CI + - Update: Styling + - Update: Settings to support the styling +- Adding: Inspirational Screenshots for further development +- Adding: Settings screenshot +- Update: i18n fine-tuning + += 1.0.4 = +- Update: replacing function when footnote is a link (bugfix) +- Footnote hover box remains until cursor leaves footnote or hover box +- Links in the footnote hover box are click able +- Adding: setting to allow footnotes on Summarized Posts +- Adding: setting to tell the world you're using footnotes plugin +- Adding: setting for the counter style of the footnote index + - Arabic Numbers (1, 2, 3, 4, 5, ...) + - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) + - Latin Characters lower-case (a, b, c, d, e, ...) + - Latin Characters upper-case (A, B, C, D, E, ...) + - Roman Numerals (I, II, III, IV, V, ...) +- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it +- Update: translations for the new settings +- Switch back the version numbering scheme to have 3 digits + += 1.0.3 = +- Adding: setting to use personal starting and ending tag for the footnotes +- Update: translations for the new setting +- Update: reading settings and fallback to default values (bugfix) + += 1.0.2 = +- Adding: setting to collapse the reference container by default +- Adding: link behind the footnotes to automatically jump to the reference container +- Adding: function to easy output input fields for the settings page +- Update: translation for the new setting + += 1.0.1 = +- Separated functions in different files for a better overview +- Adding: a version control to each file / class / function / variable +- Adding: layout for the settings menu, settings split in tabs and not a list-view +- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) +- Update: translations for EN and DE +- Changed version number from 3 digits to 2 digits + += 1.0.0 = +- First development Version of the Plugin + +== Upgrade Notice == +to upgrade our plugin is simple. Just update the plugin within your WordPress installation. +To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future diff --git a/templates/dashboard/customize-css-migration.html b/templates/dashboard/customize-css-migration.html index 5a8ef97..25ce519 100644 --- a/templates/dashboard/customize-css-migration.html +++ b/templates/dashboard/customize-css-migration.html @@ -1,18 +1,18 @@ -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-css]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - - - - - -
                                                                                                                                                                      [[label-css]][[css]]
                                                                                                                                                                      [[label-show-legacy]][[show-legacy]] [[notice-show-legacy]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-show-legacy]]

                                                                                                                                                                      -
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-css]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                      [[label-css]][[css]]
                                                                                                                                                                      [[label-show-legacy]][[show-legacy]] [[notice-show-legacy]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-show-legacy]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/customize-css-new.html b/templates/dashboard/customize-css-new.html index 4364e71..d6dff15 100644 --- a/templates/dashboard/customize-css-new.html +++ b/templates/dashboard/customize-css-new.html @@ -1,33 +1,33 @@ - - - - - - - -
                                                                                                                                                                      [[headline]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      .footnote_referrer = enclosing <span> -

                                                                                                                                                                      .footnote_referrer > a = optional <a> enclosing the <sup> -

                                                                                                                                                                      .footnote_plugin_tooltip_text = inner <sup>, not tooltip -

                                                                                                                                                                      -

                                                                                                                                                                      .footnote_tooltip = inner <span> -

                                                                                                                                                                      .footnote_tooltip_continue = nested <span> -

                                                                                                                                                                      -

                                                                                                                                                                      .footnotes_reference_container = enclosing <div> -

                                                                                                                                                                      .footnote_container_prepare = label <div> -

                                                                                                                                                                      .footnote_reference_container_label = <span> -

                                                                                                                                                                      .footnote_reference_container_collapse_button = sibling <span> -

                                                                                                                                                                      -

                                                                                                                                                                      .footnotes_table = <table> -

                                                                                                                                                                      .footnotes_plugin_reference_row = <tr> -

                                                                                                                                                                      .footnote_plugin_index_combi = first <td> if identical footnotes are combined -

                                                                                                                                                                      .footnote_plugin_index = first <td> if identical footnotes are not combined -

                                                                                                                                                                      .footnote_index = <a> or <span> in first <td> in 3-column table -

                                                                                                                                                                      .footnote_plugin_symbol = second <td> in 3-column table -

                                                                                                                                                                      .footnote_plugin_link = <a> or <span> if identical footnotes are not combined -

                                                                                                                                                                      .footnote_backlink = <a> or <span> if identical footnotes are combined, or in second <td> in 3-column table -

                                                                                                                                                                      .footnote_index_arrow = nested <span>, symbol only -

                                                                                                                                                                      .footnote_plugin_text = second <td>, or third <td> in 3-column table -

                                                                                                                                                                      -
                                                                                                                                                                      [[css]]
                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                      [[headline]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      .footnote_referrer = enclosing <span> +

                                                                                                                                                                      .footnote_referrer > a = optional <a> enclosing the <sup> +

                                                                                                                                                                      .footnote_plugin_tooltip_text = inner <sup>, not tooltip +

                                                                                                                                                                      +

                                                                                                                                                                      .footnote_tooltip = inner <span> +

                                                                                                                                                                      .footnote_tooltip_continue = nested <span> +

                                                                                                                                                                      +

                                                                                                                                                                      .footnotes_reference_container = enclosing <div> +

                                                                                                                                                                      .footnote_container_prepare = label <div> +

                                                                                                                                                                      .footnote_reference_container_label = <span> +

                                                                                                                                                                      .footnote_reference_container_collapse_button = sibling <span> +

                                                                                                                                                                      +

                                                                                                                                                                      .footnotes_table = <table> +

                                                                                                                                                                      .footnotes_plugin_reference_row = <tr> +

                                                                                                                                                                      .footnote_plugin_index_combi = first <td> if identical footnotes are combined +

                                                                                                                                                                      .footnote_plugin_index = first <td> if identical footnotes are not combined +

                                                                                                                                                                      .footnote_index = <a> or <span> in first <td> in 3-column table +

                                                                                                                                                                      .footnote_plugin_symbol = second <td> in 3-column table +

                                                                                                                                                                      .footnote_plugin_link = <a> or <span> if identical footnotes are not combined +

                                                                                                                                                                      .footnote_backlink = <a> or <span> if identical footnotes are combined, or in second <td> in 3-column table +

                                                                                                                                                                      .footnote_index_arrow = nested <span>, symbol only +

                                                                                                                                                                      .footnote_plugin_text = second <td>, or third <td> in 3-column table +

                                                                                                                                                                      +
                                                                                                                                                                      [[css]]
                                                                                                                                                                      diff --git a/templates/dashboard/customize-css.html b/templates/dashboard/customize-css.html index 6a5152f..ab4074b 100644 --- a/templates/dashboard/customize-css.html +++ b/templates/dashboard/customize-css.html @@ -1,11 +1,11 @@ -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-css]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - -
                                                                                                                                                                      [[label-css]][[css]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-css]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                      [[label-css]][[css]]
                                                                                                                                                                      diff --git a/templates/dashboard/customize-hyperlink-arrow.html b/templates/dashboard/customize-hyperlink-arrow.html index 0608266..297f2e5 100644 --- a/templates/dashboard/customize-hyperlink-arrow.html +++ b/templates/dashboard/customize-hyperlink-arrow.html @@ -1,15 +1,15 @@ - - - - - - - - -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-symbol]]

                                                                                                                                                                      -
                                                                                                                                                                      + + + + + + + + +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-symbol]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/customize-superscript.html b/templates/dashboard/customize-superscript.html index b6f5f02..295f972 100644 --- a/templates/dashboard/customize-superscript.html +++ b/templates/dashboard/customize-superscript.html @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-superscript]][[superscript]]
                                                                                                                                                                      [[label-normalize]][[normalize]] [[notice-normalize]]
                                                                                                                                                                      [[label-before]][[before]]
                                                                                                                                                                      [[label-after]][[after]]
                                                                                                                                                                      [[label-link]][[notice-link]]
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-superscript]][[superscript]]
                                                                                                                                                                      [[label-normalize]][[normalize]] [[notice-normalize]]
                                                                                                                                                                      [[label-before]][[before]]
                                                                                                                                                                      [[label-after]][[after]]
                                                                                                                                                                      [[label-link]][[notice-link]]
                                                                                                                                                                      diff --git a/templates/dashboard/diagnostics.html b/templates/dashboard/diagnostics.html index 1c70134..450d9e2 100644 --- a/templates/dashboard/diagnostics.html +++ b/templates/dashboard/diagnostics.html @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[plugins]] - -
                                                                                                                                                                      [[label-server]][[server]]
                                                                                                                                                                      [[label-php]][[php]]
                                                                                                                                                                      [[label-user-agent]][[user-agent]]
                                                                                                                                                                      [[label-max-execution-time]][[max-execution-time]]
                                                                                                                                                                      [[label-memory-limit]][[memory-limit]]
                                                                                                                                                                      [[label-php-extensions]][[php-extensions]]
                                                                                                                                                                      [[label-wordpress]][[wordpress]]
                                                                                                                                                                      [[label-theme]][[theme]]
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[plugins]] + +
                                                                                                                                                                      [[label-server]][[server]]
                                                                                                                                                                      [[label-php]][[php]]
                                                                                                                                                                      [[label-user-agent]][[user-agent]]
                                                                                                                                                                      [[label-max-execution-time]][[max-execution-time]]
                                                                                                                                                                      [[label-memory-limit]][[memory-limit]]
                                                                                                                                                                      [[label-php-extensions]][[php-extensions]]
                                                                                                                                                                      [[label-wordpress]][[wordpress]]
                                                                                                                                                                      [[label-theme]][[theme]]
                                                                                                                                                                      diff --git a/templates/dashboard/editor-button.html b/templates/dashboard/editor-button.html index ca69429..c12624d 100644 --- a/templates/dashboard/editor-button.html +++ b/templates/dashboard/editor-button.html @@ -1,62 +1,62 @@ - - + + diff --git a/templates/dashboard/expert-lookup.html b/templates/dashboard/expert-lookup.html index f499ef4..b3b3ab8 100644 --- a/templates/dashboard/expert-lookup.html +++ b/templates/dashboard/expert-lookup.html @@ -1,50 +1,50 @@ -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-1]]

                                                                                                                                                                      -

                                                                                                                                                                      [[description-2]]

                                                                                                                                                                      -

                                                                                                                                                                      [[description-3]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[head-hook]][[head-checkbox]][[head-numbox]][[head-url]]
                                                                                                                                                                      [[label-the-title]][[the-title]][[priority-the-title]][[url-the-title]]
                                                                                                                                                                      [[label-the-content]][[the-content]][[priority-the-content]][[url-the-content]]
                                                                                                                                                                      [[label-the-excerpt]][[the-excerpt]][[priority-the-excerpt]][[url-the-excerpt]]
                                                                                                                                                                      [[label-widget-title]][[widget-title]][[priority-widget-title]][[url-widget-title]]
                                                                                                                                                                      [[label-widget-text]][[widget-text]][[priority-widget-text]][[url-widget-text]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-4]]

                                                                                                                                                                      -
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-1]]

                                                                                                                                                                      +

                                                                                                                                                                      [[description-2]]

                                                                                                                                                                      +

                                                                                                                                                                      [[description-3]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[head-hook]][[head-checkbox]][[head-numbox]][[head-url]]
                                                                                                                                                                      [[label-the-title]][[the-title]][[priority-the-title]][[url-the-title]]
                                                                                                                                                                      [[label-the-content]][[the-content]][[priority-the-content]][[url-the-content]]
                                                                                                                                                                      [[label-the-excerpt]][[the-excerpt]][[priority-the-excerpt]][[url-the-excerpt]]
                                                                                                                                                                      [[label-widget-title]][[widget-title]][[priority-widget-title]][[url-widget-title]]
                                                                                                                                                                      [[label-widget-text]][[widget-text]][[priority-widget-text]][[url-widget-text]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-4]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/how-to-donate.html b/templates/dashboard/how-to-donate.html index 97c825b..74f737d 100644 --- a/templates/dashboard/how-to-donate.html +++ b/templates/dashboard/how-to-donate.html @@ -1,2 +1,2 @@ - \ No newline at end of file diff --git a/templates/dashboard/how-to-help.html b/templates/dashboard/how-to-help.html index ecb67a5..0250fc6 100644 --- a/templates/dashboard/how-to-help.html +++ b/templates/dashboard/how-to-help.html @@ -1,17 +1,17 @@ -
                                                                                                                                                                      - [[label-start]] [[start]] -
                                                                                                                                                                      - [[label-end]] [[end]] -
                                                                                                                                                                      - -
                                                                                                                                                                      - [[example-code]] -
                                                                                                                                                                      - [[example-string]] -
                                                                                                                                                                      - [[example]] -
                                                                                                                                                                      - -
                                                                                                                                                                      - [[information]] +
                                                                                                                                                                      + [[label-start]] [[start]] +
                                                                                                                                                                      + [[label-end]] [[end]] +
                                                                                                                                                                      + +
                                                                                                                                                                      + [[example-code]] +
                                                                                                                                                                      + [[example-string]] +
                                                                                                                                                                      + [[example]] +
                                                                                                                                                                      + +
                                                                                                                                                                      + [[information]]
                                                                                                                                                                      \ No newline at end of file diff --git a/templates/dashboard/manfisher.html b/templates/dashboard/manfisher.html index c1f88d0..1dc464b 100644 --- a/templates/dashboard/manfisher.html +++ b/templates/dashboard/manfisher.html @@ -1,11 +1,11 @@ -

                                                                                                                                                                      ManFisher

                                                                                                                                                                      - -
                                                                                                                                                                      -

                                                                                                                                                                      a note from the mastermind behind footnotes

                                                                                                                                                                      - -

                                                                                                                                                                      Ideology

                                                                                                                                                                      -

                                                                                                                                                                      You know WordPress is a great community effort and boatloads of people are involved and spending their spare time to freely (free as in money) contribute to WordPress as a platform or at the very core. Our aim as developers and those gravitating around developer's halos is to give back to the community with our own ideas which we think are great and well worth our whiles to put our own time into. For some of us, it would be a huge honour to serve the WordPress core developer team.

                                                                                                                                                                      - -

                                                                                                                                                                      the ManFisher menu

                                                                                                                                                                      -

                                                                                                                                                                      Will soon disappear as the company name changed and I believe it's overbearing to have that menu for such a simple function as footnotes

                                                                                                                                                                      +

                                                                                                                                                                      ManFisher

                                                                                                                                                                      + +
                                                                                                                                                                      +

                                                                                                                                                                      a note from the mastermind behind footnotes

                                                                                                                                                                      + +

                                                                                                                                                                      Ideology

                                                                                                                                                                      +

                                                                                                                                                                      You know WordPress is a great community effort and boatloads of people are involved and spending their spare time to freely (free as in money) contribute to WordPress as a platform or at the very core. Our aim as developers and those gravitating around developer's halos is to give back to the community with our own ideas which we think are great and well worth our whiles to put our own time into. For some of us, it would be a huge honour to serve the WordPress core developer team.

                                                                                                                                                                      + +

                                                                                                                                                                      the ManFisher menu

                                                                                                                                                                      +

                                                                                                                                                                      Will soon disappear as the company name changed and I believe it's overbearing to have that menu for such a simple function as footnotes

                                                                                                                                                                      \ No newline at end of file diff --git a/templates/dashboard/mouse-over-box-appearance.html b/templates/dashboard/mouse-over-box-appearance.html index 82aa401..3985b34 100644 --- a/templates/dashboard/mouse-over-box-appearance.html +++ b/templates/dashboard/mouse-over-box-appearance.html @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-font-size]][[font-size-enable]][[font-size-scalar]][[font-size-unit]] [[notice-font-size]]
                                                                                                                                                                      [[label-color]][[color]] [[notice-color]]
                                                                                                                                                                      [[label-background]][[background]] [[notice-background]]
                                                                                                                                                                      [[label-border-width]][[border-width]] [[notice-border-width]]
                                                                                                                                                                      [[label-border-color]][[border-color]] [[notice-border-color]]
                                                                                                                                                                      [[label-border-radius]][[border-radius]] [[notice-border-radius]]
                                                                                                                                                                      [[label-box-shadow-color]][[box-shadow-color]] [[notice-box-shadow-color]]
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-font-size]][[font-size-enable]][[font-size-scalar]][[font-size-unit]] [[notice-font-size]]
                                                                                                                                                                      [[label-color]][[color]] [[notice-color]]
                                                                                                                                                                      [[label-background]][[background]] [[notice-background]]
                                                                                                                                                                      [[label-border-width]][[border-width]] [[notice-border-width]]
                                                                                                                                                                      [[label-border-color]][[border-color]] [[notice-border-color]]
                                                                                                                                                                      [[label-border-radius]][[border-radius]] [[notice-border-radius]]
                                                                                                                                                                      [[label-box-shadow-color]][[box-shadow-color]] [[notice-box-shadow-color]]
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-dimensions.html b/templates/dashboard/mouse-over-box-dimensions.html index 3a14f80..d4f7be7 100644 --- a/templates/dashboard/mouse-over-box-dimensions.html +++ b/templates/dashboard/mouse-over-box-dimensions.html @@ -1,8 +1,8 @@ - - - - - - - -
                                                                                                                                                                      [[label-max-width]][[max-width]] [[width]] [[notice-max-width]]
                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                      [[label-max-width]][[max-width]] [[width]] [[notice-max-width]]
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-display.html b/templates/dashboard/mouse-over-box-display.html index c3968c2..dc42fc9 100644 --- a/templates/dashboard/mouse-over-box-display.html +++ b/templates/dashboard/mouse-over-box-display.html @@ -1,15 +1,15 @@ - - - - - - - - - - - -
                                                                                                                                                                      [[label-enable]][[enable]] [[notice-enable]]
                                                                                                                                                                      [[label-alternative]][[alternative]] [[notice-alternative]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-alternative]]

                                                                                                                                                                      -
                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                      [[label-enable]][[enable]] [[notice-enable]]
                                                                                                                                                                      [[label-alternative]][[alternative]] [[notice-alternative]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-alternative]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-position.html b/templates/dashboard/mouse-over-box-position.html index 705c55f..31769c9 100644 --- a/templates/dashboard/mouse-over-box-position.html +++ b/templates/dashboard/mouse-over-box-position.html @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-position]][[position]] [[position-alternative]] [[notice-position]]
                                                                                                                                                                      [[label-offset-x]][[offset-x]] [[offset-x-alternative]] [[notice-offset-x]]
                                                                                                                                                                      [[label-offset-y]][[offset-y]] [[offset-y-alternative]] [[notice-offset-y]]
                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-position]][[position]] [[position-alternative]] [[notice-position]]
                                                                                                                                                                      [[label-offset-x]][[offset-x]] [[offset-x-alternative]] [[notice-offset-x]]
                                                                                                                                                                      [[label-offset-y]][[offset-y]] [[offset-y-alternative]] [[notice-offset-y]]
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-text.html b/templates/dashboard/mouse-over-box-text.html index c09e133..5579edc 100644 --- a/templates/dashboard/mouse-over-box-text.html +++ b/templates/dashboard/mouse-over-box-text.html @@ -1,22 +1,22 @@ -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-delimiter]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-delimiter]][[delimiter]] [[notice-delimiter]]
                                                                                                                                                                      [[label-mirror]][[mirror]] [[notice-mirror]]
                                                                                                                                                                      [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-mirror]]

                                                                                                                                                                      -
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-delimiter]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-delimiter]][[delimiter]] [[notice-delimiter]]
                                                                                                                                                                      [[label-mirror]][[mirror]] [[notice-mirror]]
                                                                                                                                                                      [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-mirror]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-timing.html b/templates/dashboard/mouse-over-box-timing.html index ecbdd79..e58759e 100644 --- a/templates/dashboard/mouse-over-box-timing.html +++ b/templates/dashboard/mouse-over-box-timing.html @@ -1,20 +1,20 @@ - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-fade-in-delay]][[fade-in-delay]] [[notice-fade-in-delay]]
                                                                                                                                                                      [[label-fade-in-duration]][[fade-in-duration]] [[notice-fade-in-duration]]
                                                                                                                                                                      [[label-fade-out-delay]][[fade-out-delay]] [[notice-fade-out-delay]]
                                                                                                                                                                      [[label-fade-out-duration]][[fade-out-duration]] [[notice-fade-out-duration]]
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-fade-in-delay]][[fade-in-delay]] [[notice-fade-in-delay]]
                                                                                                                                                                      [[label-fade-in-duration]][[fade-in-duration]] [[notice-fade-in-duration]]
                                                                                                                                                                      [[label-fade-out-delay]][[fade-out-delay]] [[notice-fade-out-delay]]
                                                                                                                                                                      [[label-fade-out-duration]][[fade-out-duration]] [[notice-fade-out-duration]]
                                                                                                                                                                      diff --git a/templates/dashboard/mouse-over-box-truncation.html b/templates/dashboard/mouse-over-box-truncation.html index bea6ed4..283c9a9 100644 --- a/templates/dashboard/mouse-over-box-truncation.html +++ b/templates/dashboard/mouse-over-box-truncation.html @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-truncation]][[truncation]]
                                                                                                                                                                      [[label-max-length]][[max-length]] [[notice-max-length]]
                                                                                                                                                                      [[label-readon]][[readon]]
                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-truncation]][[truncation]]
                                                                                                                                                                      [[label-max-length]][[max-length]] [[notice-max-length]]
                                                                                                                                                                      [[label-readon]][[readon]]
                                                                                                                                                                      diff --git a/templates/dashboard/other-plugins.html b/templates/dashboard/other-plugins.html index 5e9e6df..91fc1e4 100644 --- a/templates/dashboard/other-plugins.html +++ b/templates/dashboard/other-plugins.html @@ -1,91 +1,91 @@ -
                                                                                                                                                                      -
                                                                                                                                                                      - - - - - -
                                                                                                                                                                      -

                                                                                                                                                                      -

                                                                                                                                                                      - -

                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - -
                                                                                                                                                                      -
                                                                                                                                                                      - [[last-updated-label]]: - -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - - - +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + +
                                                                                                                                                                      +

                                                                                                                                                                      +

                                                                                                                                                                      + +

                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + [[last-updated-label]]: + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + + + diff --git a/templates/dashboard/settings-excerpts.html b/templates/dashboard/settings-excerpts.html index e1a316c..13424b6 100644 --- a/templates/dashboard/settings-excerpts.html +++ b/templates/dashboard/settings-excerpts.html @@ -1,11 +1,11 @@ - - - - - - - -
                                                                                                                                                                      [[label-excerpts]][[excerpts]] [[notice-excerpts]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-excerpts]]

                                                                                                                                                                      -
                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                      [[label-excerpts]][[excerpts]] [[notice-excerpts]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-excerpts]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/settings-love.html b/templates/dashboard/settings-love.html index 51c4a1b..0b06e62 100644 --- a/templates/dashboard/settings-love.html +++ b/templates/dashboard/settings-love.html @@ -1,12 +1,12 @@ - - - - - - - - - - - -
                                                                                                                                                                      [[label-love]][[love]]
                                                                                                                                                                      [[label-no-love]][[no-love]]
                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                      [[label-love]][[love]]
                                                                                                                                                                      [[label-no-love]][[no-love]]
                                                                                                                                                                      diff --git a/templates/dashboard/settings-numbering.html b/templates/dashboard/settings-numbering.html index bd772d2..75f29c3 100644 --- a/templates/dashboard/settings-numbering.html +++ b/templates/dashboard/settings-numbering.html @@ -1,15 +1,15 @@ - - - - - - - - - - - -
                                                                                                                                                                      [[label-counter-style]][[counter-style]]
                                                                                                                                                                      [[label-identical]][[identical]] [[notice-identical]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-identical]]

                                                                                                                                                                      -
                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                      [[label-counter-style]][[counter-style]]
                                                                                                                                                                      [[label-identical]][[identical]] [[notice-identical]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-identical]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/settings-reference-container.html b/templates/dashboard/settings-reference-container.html index 5bc7553..0de6a3b 100644 --- a/templates/dashboard/settings-reference-container.html +++ b/templates/dashboard/settings-reference-container.html @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-name]][[name]]
                                                                                                                                                                      [[label-element]][[element]]
                                                                                                                                                                      [[label-border]][[border]]
                                                                                                                                                                      [[label-collapse]][[collapse]]
                                                                                                                                                                      [[label-script]][[script]] [[notice-script]]
                                                                                                                                                                      [[label-position]][[position]] [[notice-position]]
                                                                                                                                                                      [[label-shortcode]][[shortcode]] [[notice-shortcode]]
                                                                                                                                                                      [[label-startpage]][[startpage]]
                                                                                                                                                                      [[label-margin-top]][[margin-top]] [[notice-margin-top]]
                                                                                                                                                                      [[label-margin-bottom]][[margin-bottom]] [[notice-margin-bottom]]
                                                                                                                                                                      [[label-page-layout]][[page-layout]] [[notice-page-layout]]
                                                                                                                                                                      [[label-url-wrap]][[url-wrap]] [[notice-url-wrap]]
                                                                                                                                                                      [[label-symbol]][[symbol-enable]] [[notice-symbol]]
                                                                                                                                                                      [[label-switch]][[switch]]
                                                                                                                                                                      [[label-3column]][[3column]] [[notice-3column]]
                                                                                                                                                                      [[label-row-borders]][[row-borders]]
                                                                                                                                                                      [[label-separator]] - [[separator-enable]] - [[separator-options]] - [[separator-custom]] - [[notice-separator]] -
                                                                                                                                                                      [[label-terminator]] - [[terminator-enable]] - [[terminator-options]] - [[terminator-custom]] - [[notice-terminator]] -
                                                                                                                                                                      [[label-width]] - [[width-enable]] - [[width-scalar]] - [[width-unit]] - [[notice-width]] -
                                                                                                                                                                      [[label-max-width]] - [[max-width-enable]] - [[max-width-scalar]] - [[max-width-unit]] - [[notice-max-width]] -
                                                                                                                                                                      [[label-line-break]][[line-break]] - [[notice-line-break]] -
                                                                                                                                                                      [[label-link]][[link]] [[notice-link]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-link]]

                                                                                                                                                                      -
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-name]][[name]]
                                                                                                                                                                      [[label-element]][[element]]
                                                                                                                                                                      [[label-border]][[border]]
                                                                                                                                                                      [[label-collapse]][[collapse]]
                                                                                                                                                                      [[label-script]][[script]] [[notice-script]]
                                                                                                                                                                      [[label-position]][[position]] [[notice-position]]
                                                                                                                                                                      [[label-shortcode]][[shortcode]] [[notice-shortcode]]
                                                                                                                                                                      [[label-startpage]][[startpage]]
                                                                                                                                                                      [[label-margin-top]][[margin-top]] [[notice-margin-top]]
                                                                                                                                                                      [[label-margin-bottom]][[margin-bottom]] [[notice-margin-bottom]]
                                                                                                                                                                      [[label-page-layout]][[page-layout]] [[notice-page-layout]]
                                                                                                                                                                      [[label-url-wrap]][[url-wrap]] [[notice-url-wrap]]
                                                                                                                                                                      [[label-symbol]][[symbol-enable]] [[notice-symbol]]
                                                                                                                                                                      [[label-switch]][[switch]]
                                                                                                                                                                      [[label-3column]][[3column]] [[notice-3column]]
                                                                                                                                                                      [[label-row-borders]][[row-borders]]
                                                                                                                                                                      [[label-separator]] + [[separator-enable]] + [[separator-options]] + [[separator-custom]] + [[notice-separator]] +
                                                                                                                                                                      [[label-terminator]] + [[terminator-enable]] + [[terminator-options]] + [[terminator-custom]] + [[notice-terminator]] +
                                                                                                                                                                      [[label-width]] + [[width-enable]] + [[width-scalar]] + [[width-unit]] + [[notice-width]] +
                                                                                                                                                                      [[label-max-width]] + [[max-width-enable]] + [[max-width-scalar]] + [[max-width-unit]] + [[notice-max-width]] +
                                                                                                                                                                      [[label-line-break]][[line-break]] + [[notice-line-break]] +
                                                                                                                                                                      [[label-link]][[link]] [[notice-link]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-link]]

                                                                                                                                                                      +
                                                                                                                                                                      diff --git a/templates/dashboard/settings-scrolling.html b/templates/dashboard/settings-scrolling.html index 743bdcd..32c792d 100644 --- a/templates/dashboard/settings-scrolling.html +++ b/templates/dashboard/settings-scrolling.html @@ -1,36 +1,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                                                                                                                                      [[label-scroll-offset]][[scroll-offset]] [[notice-scroll-offset]]
                                                                                                                                                                      [[label-scroll-duration]][[scroll-duration]] [[notice-scroll-duration]]
                                                                                                                                                                      [[label-hard-links]][[hard-links]] [[notice-hard-links]]
                                                                                                                                                                      [[label-footnote]][[footnote]] [[notice-footnote]]
                                                                                                                                                                      [[label-referrer]][[referrer]] [[notice-referrer]]
                                                                                                                                                                      [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                      [[label-backlink-tooltips]][[backlink-tooltips]] [[notice-backlink-tooltips]]
                                                                                                                                                                      [[label-backlink-tooltip-text]][[backlink-tooltip-text]] [[notice-backlink-tooltip-text]]
                                                                                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                                                                                      [[label-scroll-offset]][[scroll-offset]] [[notice-scroll-offset]]
                                                                                                                                                                      [[label-scroll-duration]][[scroll-duration]] [[notice-scroll-duration]]
                                                                                                                                                                      [[label-hard-links]][[hard-links]] [[notice-hard-links]]
                                                                                                                                                                      [[label-footnote]][[footnote]] [[notice-footnote]]
                                                                                                                                                                      [[label-referrer]][[referrer]] [[notice-referrer]]
                                                                                                                                                                      [[label-separator]][[separator]] [[notice-separator]]
                                                                                                                                                                      [[label-backlink-tooltips]][[backlink-tooltips]] [[notice-backlink-tooltips]]
                                                                                                                                                                      [[label-backlink-tooltip-text]][[backlink-tooltip-text]] [[notice-backlink-tooltip-text]]
                                                                                                                                                                      diff --git a/templates/dashboard/settings-start-end.html b/templates/dashboard/settings-start-end.html index 633b8df..cf3744a 100644 --- a/templates/dashboard/settings-start-end.html +++ b/templates/dashboard/settings-start-end.html @@ -1,63 +1,63 @@ -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-escapement]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - - - - - -
                                                                                                                                                                      [[label-short-code-start]] - [[short-code-start]] - [[short-code-start-user]] -
                                                                                                                                                                      [[label-short-code-end]] - [[short-code-end]] - [[short-code-end-user]] -
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-parentheses]]

                                                                                                                                                                      -
                                                                                                                                                                      - - - - - - - -
                                                                                                                                                                      [[label-syntax]][[syntax]] [[notice-syntax]]
                                                                                                                                                                      -
                                                                                                                                                                      -

                                                                                                                                                                      [[description-syntax]]

                                                                                                                                                                      -
                                                                                                                                                                      - +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-escapement]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + + + + + +
                                                                                                                                                                      [[label-short-code-start]] + [[short-code-start]] + [[short-code-start-user]] +
                                                                                                                                                                      [[label-short-code-end]] + [[short-code-end]] + [[short-code-end-user]] +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-parentheses]]

                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                      [[label-syntax]][[syntax]] [[notice-syntax]]
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      [[description-syntax]]

                                                                                                                                                                      +
                                                                                                                                                                      + diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index 50c5c2b..cb400de 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -1,24 +1,24 @@ - -<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - ><[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_plugin_tooltip_text" - >[[before]][[index]][[after]][[anchor-element]] + +<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + ><[[sup-span]] + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_plugin_tooltip_text" + >[[before]][[index]][[after]][[anchor-element]] diff --git a/templates/public/footnote.html b/templates/public/footnote.html index 0f0b2d9..10b884c 100755 --- a/templates/public/footnote.html +++ b/templates/public/footnote.html @@ -1,20 +1,20 @@ - -<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - ><[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_plugin_tooltip_text" - >[[before]][[index]][[after]][[anchor-element]][[text]] + +<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + ><[[sup-span]] + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_plugin_tooltip_text" + >[[before]][[index]][[after]][[anchor-element]][[text]] diff --git a/templates/public/js-reference-container.html b/templates/public/js-reference-container.html index d1ec848..2fdc2b9 100644 --- a/templates/public/js-reference-container.html +++ b/templates/public/js-reference-container.html @@ -1,88 +1,88 @@ - -
                                                                                                                                                                      -
                                                                                                                                                                      <[[element]] - >[[name]][+]
                                                                                                                                                                      -
                                                                                                                                                                      - - - [[content]] - -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - + +
                                                                                                                                                                      +
                                                                                                                                                                      <[[element]] + >[[name]][+]
                                                                                                                                                                      +
                                                                                                                                                                      + + + [[content]] + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + diff --git a/templates/public/reference-container-body-3column.html b/templates/public/reference-container-body-3column.html index 2d5613f..1a750f7 100644 --- a/templates/public/reference-container-body-3column.html +++ b/templates/public/reference-container-body-3column.html @@ -1,29 +1,29 @@ - -
                                                                                                                                                                      <[[link-span]] - id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" - class="footnote_index" - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" - [[hard-link]] - >[[index]][[terminator]][[anchor-element]]<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" - class="footnote_backlink" - [[hard-link]] - >[[arrow]][[text]]
                                                                                                                                                                      <[[link-span]] + id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" + class="footnote_index" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" + [[hard-link]] + >[[index]][[terminator]][[anchor-element]]<[[link-span]] + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" + class="footnote_backlink" + [[hard-link]] + >[[arrow]][[text]]
                                                                                                                                                                      [[backlinks]][[text]]
                                                                                                                                                                      [[backlinks]][[text]]
                                                                                                                                                                      <[[link-span]] - class="footnote_plugin_link" - [[hard-link]] - >[[index]][[terminator]][[arrow]][[anchor-element]][[text]]
                                                                                                                                                                      <[[link-span]] + class="footnote_plugin_link" + [[hard-link]] + >[[index]][[terminator]][[arrow]][[anchor-element]][[text]]
                                                                                                                                                                      <[[link-span]] - class="footnote_plugin_link" - [[hard-link]] - >[[arrow]][[index]][[terminator]][[anchor-element]][[text]]
                                                                                                                                                                      <[[link-span]] + class="footnote_plugin_link" + [[hard-link]] + >[[arrow]][[index]][[terminator]][[anchor-element]][[text]]
                                                                                                                                                                      - - [[content]] - -
                                                                                                                                                                      -
                                                                                                                                                                      -
                                                                                                                                                                      - + +
                                                                                                                                                                      +
                                                                                                                                                                      <[[element]] + >[[name]][+]
                                                                                                                                                                      +
                                                                                                                                                                      + + + [[content]] + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + diff --git a/templates/public/tooltip.html b/templates/public/tooltip.html index eab35b8..deefba3 100644 --- a/templates/public/tooltip.html +++ b/templates/public/tooltip.html @@ -1,18 +1,18 @@ - - + + From dac7ffe3a6eaa69befc5572caec8b3fb31eea3bd Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Thu, 25 Feb 2021 19:17:00 +0000 Subject: [PATCH 081/144] Update code to comply with WP Coding Standards (#38) Co-authored-by: @pewgeuges --- .gitignore | 3 + README.md | 6 +- _tools/setup.sh | 4 + class/config.php | 29 +- class/convert.php | 242 ++- class/dashboard/init.php | 212 --- class/dashboard/layout.php | 552 ------ class/dashboard/subpage-diagnostics.php | 140 -- class/dashboard/subpage-main.php | 1182 ------------- class/hooks.php | 79 +- class/init.php | 264 +-- class/language.php | 38 +- class/layout/abstract-engine.php | 563 +++++++ class/layout/diagnostics.php | 149 ++ class/layout/init.php | 207 +++ class/layout/settings.php | 1261 ++++++++++++++ class/settings.php | 736 ++++---- class/task.php | 1779 +++++++++++--------- class/template.php | 190 +-- class/widgets/base.php | 49 +- class/widgets/reference-container.php | 56 +- class/wysiwyg.php | 77 +- composer.json | 11 + composer.lock | 196 +++ contrib/pre-commit | 61 + footnotes.php | 29 +- includes.php | 37 +- readme.txt | 4 +- templates/dashboard/other-plugins.html | 2 +- templates/public/footnote-alternative.html | 6 +- 30 files changed, 4277 insertions(+), 3887 deletions(-) create mode 100644 _tools/setup.sh delete mode 100644 class/dashboard/init.php delete mode 100644 class/dashboard/layout.php delete mode 100644 class/dashboard/subpage-diagnostics.php delete mode 100644 class/dashboard/subpage-main.php create mode 100644 class/layout/abstract-engine.php create mode 100644 class/layout/diagnostics.php create mode 100644 class/layout/init.php create mode 100644 class/layout/settings.php create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 contrib/pre-commit diff --git a/.gitignore b/.gitignore index 7fdc234..b6fe4af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .phpdoc/ +vendor/ + +*.bak diff --git a/README.md b/README.md index e0e67da..5cd8dae 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) + - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) 1. Create a new branch from `main` (`git checkout -b `) @@ -25,8 +26,9 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) 1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./*.php ./**/*.php` + - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) + - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` + - You may have to enable double-wildcards in your console first (`shopt -s globstar`) ## Updating Documentation diff --git a/_tools/setup.sh b/_tools/setup.sh new file mode 100644 index 0000000..fd4c786 --- /dev/null +++ b/_tools/setup.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cp contrib/pre-commit .git/hooks/pre-commit +chmod +x .git/hooks/pre-commit diff --git a/class/config.php b/class/config.php index 98a3245..8f02119 100644 --- a/class/config.php +++ b/class/config.php @@ -1,51 +1,44 @@ -foot
                                                                                                                                                                      '; /** * Public Plugin name for dashboard heading - * + * * After properly displaying in dashboard headings until WPv5.4, the above started - * in WPv5.5 being torn apart as if the headline was text-align:justify and not + * in WPv5.5 being torn apart as if the headline was text-align:justify and not * the last line. That ugly display bug badly affected the plugin’s communication. * The only working solution found so far is using position:fixed in one heading * that isn’t translated, and dropping the logo in another, translatable heading. @@ -58,7 +51,6 @@ class MCI_Footnotes_Config { /** * Html tag for the LOVE symbol. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ @@ -75,7 +67,6 @@ class MCI_Footnotes_Config { /** * Short code to DON'T display the 'LOVE ME' slug on certain pages. * - * @author Stefan Herndler * @since 1.5.0 * @var string */ diff --git a/class/convert.php b/class/convert.php index e1823ad..3adb313 100644 --- a/class/convert.php +++ b/class/convert.php @@ -3,20 +3,16 @@ * Includes the Convert Class. * * @filesource - * @author Stefan Herndler - * @since 1.5.0 12.09.14 10:56 - * - * Edited: + * @package footnotes + * @since 1.5.0 + * @date 12.09.14 10:56 + * * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 - * - * Last modified: 2020-12-12T1541+0100 */ - /** * Converts data types and Footnotes specific values. * - * @author Stefan Herndler * @since 1.5.0 */ class MCI_Footnotes_Convert { @@ -24,30 +20,29 @@ class MCI_Footnotes_Convert { /** * Converts a integer into the user-defined counter style for the footnotes. * - * @author Stefan Herndler * @since 1.5.0 - * @param int $p_int_Index Index to be converted. - * @param string $p_str_ConvertStyle Style of the new/converted Index. + * @param int $p_int_index Index to be converted. + * @param string $p_str_convert_style Style of the new/converted Index. * @return string Converted Index as string in the defined counter style. - * + * * Edited: * @since 2.2.0 lowercase Roman numerals supported */ - public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") { - switch ($p_str_ConvertStyle) { - case "romanic": - return self::toRomanic($p_int_Index, true); - case "roman_low": - return self::toRomanic($p_int_Index, false); - case "latin_high": - return self::toLatin($p_int_Index, true); - case "latin_low": - return self::toLatin($p_int_Index, false); - case "arabic_leading": - return self::toArabicLeading($p_int_Index); - case "arabic_plain": + public static function index( $p_int_index, $p_str_convert_style = 'arabic_plain' ) { + switch ( $p_str_convert_style ) { + case 'romanic': + return self::to_romanic( $p_int_index, true ); + case 'roman_low': + return self::to_romanic( $p_int_index, false ); + case 'latin_high': + return self::to_latin( $p_int_index, true ); + case 'latin_low': + return self::to_latin( $p_int_index, false ); + case 'arabic_leading': + return self::to_arabic_leading( $p_int_index ); + case 'arabic_plain': default: - return $p_int_Index; + return $p_int_index; } } @@ -55,175 +50,174 @@ class MCI_Footnotes_Convert { * Converts an integer into latin ascii characters, either lower or upper-case. * Function available from A to ZZ ( means 676 footnotes at 1 page possible). * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. - * @param bool $p_bool_UpperCase True to convert the value to upper case letter, otherwise to lower case. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case True to convert the value to upper case letter, otherwise to lower case. * @return string */ - private static function toLatin($p_int_Value, $p_bool_UpperCase) { - // output string - $l_str_Return = ""; - $l_int_Offset = 0; - // check if the value is higher then 26 = Z - while ($p_int_Value > 26) { - // increase offset and reduce counter - $l_int_Offset++; - $p_int_Value -= 26; + private static function to_latin( $p_int_value, $p_bool_upper_case ) { + // Output string. + $l_str_return = ''; + $l_int_offset = 0; + // Check if the value is higher then 26 = Z. + while ( $p_int_value > 26 ) { + // Increase offset and reduce counter. + $l_int_offset++; + $p_int_value -= 26; } - // if offset set (more then Z), then add a new letter in front - if ($l_int_Offset > 0) { - $l_str_Return = chr($l_int_Offset + 64); + // If offset set (more then Z), then add a new letter in front. + if ( $l_int_offset > 0 ) { + $l_str_return = chr( $l_int_offset + 64 ); } - // add the origin letter - $l_str_Return .= chr($p_int_Value + 64); - // return the latin character representing the integer - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Add the origin letter. + $l_str_return .= chr( $p_int_value + 64 ); + // Return the latin character representing the integer. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts an integer to a leading-0 integer. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. * @return string Value with a leading zero. */ - private static function toArabicLeading($p_int_Value) { - // add a leading 0 if number lower then 10 - if ($p_int_Value < 10) { - return "0" . $p_int_Value; + private static function to_arabic_leading( $p_int_value ) { + // Add a leading 0 if number lower then 10. + if ( $p_int_value < 10 ) { + return '0' . $p_int_value; } - return $p_int_Value; + return $p_int_value; } /** * Converts an integer to a romanic letter. * - * @author Stefan Herndler * @since 1.0-gamma - * @param int $p_int_Value Value/Index to be converted. + * @param int $p_int_value Value/Index to be converted. + * @param bool $p_bool_upper_case Whether to uppercase. * @return string - * + * * Edited: * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 */ - private static function toRomanic($p_int_Value, $p_bool_UpperCase) { - // table containing all necessary romanic letters - $l_arr_RomanicLetters = array( - 'M' => 1000, + private static function to_romanic( $p_int_value, $p_bool_upper_case ) { + // Table containing all necessary romanic letters. + $l_arr_romanic_letters = array( + 'M' => 1000, 'CM' => 900, - 'D' => 500, + 'D' => 500, 'CD' => 400, - 'C' => 100, + 'C' => 100, 'XC' => 90, - 'L' => 50, + 'L' => 50, 'XL' => 40, - 'X' => 10, + 'X' => 10, 'IX' => 9, - 'V' => 5, + 'V' => 5, 'IV' => 4, - 'I' => 1 + 'I' => 1, ); - // return value - $l_str_Return = ''; - // iterate through integer value until it is reduced to 0 - while ($p_int_Value > 0) { - foreach ($l_arr_RomanicLetters as $l_str_Romanic => $l_int_Arabic) { - if ($p_int_Value >= $l_int_Arabic) { - $p_int_Value -= $l_int_Arabic; - $l_str_Return .= $l_str_Romanic; + // Return value. + $l_str_return = ''; + // Iterate through integer value until it is reduced to 0. + while ( $p_int_value > 0 ) { + foreach ( $l_arr_romanic_letters as $l_str_romanic => $l_int_arabic ) { + if ( $p_int_value >= $l_int_arabic ) { + $p_int_value -= $l_int_arabic; + $l_str_return .= $l_str_romanic; break; } } } - // return romanic letters as string - if ($p_bool_UpperCase) { - return strtoupper($l_str_Return); + // Return romanic letters as string. + if ( $p_bool_upper_case ) { + return strtoupper( $l_str_return ); } - return strtolower($l_str_Return); + return strtolower( $l_str_return ); } /** * Converts a string depending on its value to a boolean. * - * @author Stefan Herndler * @since 1.0-beta - * @param string $p_str_Value String to be converted to boolean. + * @param string $p_str_value String to be converted to boolean. * @return bool Boolean representing the string. */ - public static function toBool($p_str_Value) { - // convert string to lower-case to make it easier - $p_str_Value = strtolower($p_str_Value); - // check if string seems to contain a "true" value - switch ($p_str_Value) { - case "checked": - case "yes": - case "true": - case "on": - case "1": + public static function to_bool( $p_str_value ) { + // Convert string to lower-case to make it easier. + $p_str_value = strtolower( $p_str_value ); + // Check if string seems to contain a "true" value. + switch ( $p_str_value ) { + case 'checked': + case 'yes': + case 'true': + case 'on': + case '1': return true; } - // nothing found that says "true", so we return false + // Nothing found that says "true", so we return false. return false; } /** * Get a html Array short code depending on Arrow-Array key index. * - * @author Stefan Herndler * @since 1.3.2 - * @param int $p_int_Index Index representing the Arrow. If empty all Arrows are specified. + * @param int $p_int_index Index representing the Arrow. If empty all Arrows are specified. * @return array|string Array of all Arrows if Index is empty otherwise html tag of a specific arrow. */ - public static function getArrow($p_int_Index = -1) { - // define all possible arrows - $l_arr_Arrows = array("↑", "↥", "↟", "↩", "↲", "↵", "⇑", "⇡", "⇧", "↑"); - // convert index to an integer - if (!is_int($p_int_Index)) { - $p_int_Index = intval($p_int_Index); + public static function get_arrow( $p_int_index = -1 ) { + // Define all possible arrows. + $l_arr_arrows = array( '↑', '↥', '↟', '↩', '↲', '↵', '⇑', '⇡', '⇧', '↑' ); + // Convert index to an integer. + if ( ! is_int( $p_int_index ) ) { + $p_int_index = intval( $p_int_index ); } - // return the whole arrow array - if ($p_int_Index < 0 || $p_int_Index > count($l_arr_Arrows)) { - return $l_arr_Arrows; + // Return the whole arrow array. + if ( $p_int_index < 0 || $p_int_index > count( $l_arr_arrows ) ) { + return $l_arr_arrows; } - // return a single arrow - return $l_arr_Arrows[$p_int_Index]; + // Return a single arrow. + return $l_arr_arrows[ $p_int_index ]; } + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_dump + // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r /** * Displays a Variable. * - * @author Stefan Herndler * @since 1.5.0 - * @param mixed $p_mixed_Value + * @param mixed $p_mixed_value The variable to display. + * @return void */ - public static function debug($p_mixed_Value) { - if (empty($p_mixed_Value)) { - var_dump($p_mixed_Value); + public static function debug( $p_mixed_value ) { + if ( empty( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_array($p_mixed_Value)) { - printf("
                                                                                                                                                                      ");
                                                                                                                                                                      -			print_r($p_mixed_Value);
                                                                                                                                                                      -			printf("
                                                                                                                                                                      "); + } elseif ( is_array( $p_mixed_value ) ) { + printf( '
                                                                                                                                                                      ' );
                                                                                                                                                                      +			print_r( $p_mixed_value );
                                                                                                                                                                      +			printf( '
                                                                                                                                                                      ' ); - } else if (is_object($p_mixed_Value)) { - printf("
                                                                                                                                                                      ");
                                                                                                                                                                      -			print_r($p_mixed_Value);
                                                                                                                                                                      -			printf("
                                                                                                                                                                      "); + } elseif ( is_object( $p_mixed_value ) ) { + printf( '
                                                                                                                                                                      ' );
                                                                                                                                                                      +			print_r( $p_mixed_value );
                                                                                                                                                                      +			printf( '
                                                                                                                                                                      ' ); - } else if (is_numeric($p_mixed_Value) || is_int($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_numeric( $p_mixed_value ) || is_int( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); - } else if (is_date($p_mixed_Value)) { - var_dump($p_mixed_Value); + } elseif ( is_date( $p_mixed_value ) ) { + var_dump( $p_mixed_value ); } else { - var_dump($p_mixed_Value); + var_dump( $p_mixed_value ); } - echo "
                                                                                                                                                                      "; + echo '
                                                                                                                                                                      '; } + // phpcs:disable } diff --git a/class/dashboard/init.php b/class/dashboard/init.php deleted file mode 100644 index b18e77c..0000000 --- a/class/dashboard/init.php +++ /dev/null @@ -1,212 +0,0 @@ -a_arr_SubPageClasses[$l_obj_Class->getPriority()] = $l_obj_Class; - } - } - ksort($this->a_arr_SubPageClasses); - - // register hooks/actions - add_action('admin_init', array($this, 'initializeSettings')); - add_action('admin_menu', array($this, 'registerMainMenu')); - // register AJAX callbacks for Plugin information - add_action("wp_ajax_nopriv_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - add_action("wp_ajax_footnotes_getPluginInfo", array($this, "getPluginMetaInformation")); - } - - /** - * Initializes all sub pages and registers the settings. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function initializeSettings() { - MCI_Footnotes_Settings::instance()->RegisterSettings(); - // iterate though each sub class of the layout engine and register their sections - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSections(); - } - } - - /** - * Registers the new main menu for the WordPress dashboard. - * Registers all sub menu pages for the new main menu. - * - * @author Stefan Herndler - * @since 1.5.0 - * @see http://codex.wordpress.org/Function_Reference/add_menu_page - */ - public function registerMainMenu() { - global $menu; - // iterate through each main menu - foreach($menu as $l_arr_MainMenu) { - // iterate through each main menu attribute - foreach($l_arr_MainMenu as $l_str_Attribute) { - // main menu already added, append sub pages and stop - if ($l_str_Attribute == self::C_STR_MAIN_MENU_SLUG) { - $this->registerSubPages(); - return; - } - } - } - - // add a new main menu page to the WordPress dashboard - add_menu_page( - self::C_STR_MAIN_MENU_TITLE, // page title - self::C_STR_MAIN_MENU_TITLE, // menu title - 'manage_options', // capability - self::C_STR_MAIN_MENU_SLUG, // menu slug - array($this, "displayOtherPlugins"), // function - plugins_url('footnotes/img/main-menu.png'), // icon url - null // position - ); - $this->registerSubPages(); - } - - /** - * Registers all SubPages for this Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function registerSubPages() { - // first registered sub menu page MUST NOT contain a unique slug suffix - // iterate though each sub class of the layout engine and register their sub page - /** @var MCI_Footnotes_LayoutEngine $l_obj_LayoutEngineSubClass */ - foreach($this->a_arr_SubPageClasses as $l_obj_LayoutEngineSubClass) { - $l_obj_LayoutEngineSubClass->registerSubPage(); - } - } - - /** - * Displays other Plugins from the developers. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayOtherPlugins() { - printf("

                                                                                                                                                                      "); - // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "manfisher"); - echo $l_obj_Template->getContent(); - - printf('visit Mark Cheret'); - printf("

                                                                                                                                                                      "); - - printf(''); - } - - /** - * AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function getPluginMetaInformation() { - // get plugin internal name from POST data - $l_str_PluginName = array_key_exists("plugin", $_POST) ? $_POST["plugin"] : null; - if (empty($l_str_PluginName)) { - echo json_encode(array("error" => "Plugin name invalid.")); - exit; - } - $l_str_Url = "https://api.wordpress.org/plugins/info/1.0/".$l_str_PluginName.".json"; - // call URL and collect data - $l_arr_Response = wp_remote_get($l_str_Url); - // check if response is valid - if (is_wp_error($l_arr_Response)) { - echo json_encode(array("error" => "Error receiving Plugin Information from WordPress.")); - exit; - } - if (!array_key_exists("body", $l_arr_Response)) { - echo json_encode(array("error" => "Error reading WordPress API response message.")); - exit; - } - // get the body of the response - $l_str_Response = $l_arr_Response["body"]; - // get plugin object - $l_arr_Plugin = json_decode($l_str_Response, true); - if (empty($l_arr_Plugin)) { - echo json_encode(array("error" => "Error reading Plugin meta information.
                                                                                                                                                                      URL: " . $l_str_Url . "
                                                                                                                                                                      Response: " . $l_str_Response)); - exit; - } - - $l_int_NumRatings = array_key_exists("num_ratings", $l_arr_Plugin) ? intval($l_arr_Plugin["num_ratings"]) : 0; - $l_int_Rating = array_key_exists("rating", $l_arr_Plugin) ? floatval($l_arr_Plugin["rating"]) : 0.0; - $l_int_Stars = round(5 * $l_int_Rating / 100.0, 1); - - // return Plugin information as JSON encoded string - echo json_encode( - array( - "error" => "", - "PluginDescription" => array_key_exists("short_description", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["short_description"]) : "Error reading Plugin information", - "PluginAuthor" => array_key_exists("author", $l_arr_Plugin) ? html_entity_decode($l_arr_Plugin["author"]) : "unknown", - "PluginRatingText" => $l_int_Stars . " " . __("rating based on", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . " " . $l_int_NumRatings . " " . __("ratings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "PluginRating1" => $l_int_Stars >= 0.5 ? "star-full" : "star-empty", - "PluginRating2" => $l_int_Stars >= 1.5 ? "star-full" : "star-empty", - "PluginRating3" => $l_int_Stars >= 2.5 ? "star-full" : "star-empty", - "PluginRating4" => $l_int_Stars >= 3.5 ? "star-full" : "star-empty", - "PluginRating5" => $l_int_Stars >= 4.5 ? "star-full" : "star-empty", - "PluginRating" => $l_int_NumRatings, - "PluginLastUpdated" => array_key_exists("last_updated", $l_arr_Plugin) ? $l_arr_Plugin["last_updated"] : "unknown", - "PluginDownloads" => array_key_exists("downloaded", $l_arr_Plugin) ? $l_arr_Plugin["downloaded"] : "---" - ) - ); - exit; - } -} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php deleted file mode 100644 index d16ad8b..0000000 --- a/class/dashboard/layout.php +++ /dev/null @@ -1,552 +0,0 @@ - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_ID, "title" => $p_str_Title, "submit" => $p_bool_hasSubmitButton, "container" => $p_int_SettingsContainerIndex); - } - - /** - * Returns an array describing a meta box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SectionID Parent Section ID. - * @param string $p_str_ID Unique ID suffix. - * @param string $p_str_Title Title for the meta box. - * @param string $p_str_CallbackFunctionName Class method name for callback. - * @return array meta box description to be able to append a meta box to the output. - */ - protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { - return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, - "callback" => $p_str_CallbackFunctionName - ); - } - - /** - * Registers a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSubPage() { - global $submenu; - // any sub menu for our main menu exists - if (array_key_exists(plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG), $submenu)) { - // iterate through all sub menu entries of the ManFisher main menu - foreach($submenu[plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG)] as $l_arr_SubMenu) { - if ($l_arr_SubMenu[2] == plugin_basename(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug())) { - // remove that sub menu and add it again to move it to the bottom - remove_submenu_page(MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG .$this->getSubPageSlug()); - } - } - } - - $this->a_str_SubPageHook = add_submenu_page( - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG, // parent slug - $this->getSubPageTitle(), // page title - $this->getSubPageTitle(), // menu title - 'manage_options', // capability - MCI_Footnotes_Layout_Init::C_STR_MAIN_MENU_SLUG . $this->getSubPageSlug(), // menu slug - array($this, 'displayContent') // function - ); - } - - /** - * Registers all sections for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function registerSections() { - // iterate through each section - foreach($this->getSections() as $l_arr_Section) { - // append tab to the tab-array - $this->a_arr_Sections[$l_arr_Section["id"]] = $l_arr_Section; - add_settings_section( - $l_arr_Section["id"], // unique id - "", //$l_arr_Section["title"], // title - array($this, 'Description'), // callback function for the description - $l_arr_Section["id"] // parent sub page slug - ); - $this->registerMetaBoxes($l_arr_Section["id"]); - } - } - - /** - * Registers all Meta boxes for a sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_ParentID Parent section unique id. - */ - private function registerMetaBoxes($p_str_ParentID) { - // iterate through each meta box - foreach($this->getMetaBoxes() as $l_arr_MetaBox) { - if ($l_arr_MetaBox["parent"] != $p_str_ParentID) { - continue; - } - add_meta_box( - $p_str_ParentID. "-" . $l_arr_MetaBox["id"], // unique id - $l_arr_MetaBox["title"], // meta box title - array($this, $l_arr_MetaBox["callback"]), // callback function to display (echo) the content - $p_str_ParentID, // post type = parent section id - 'main' // context - ); - } - } - - /** - * Append javascript and css files for specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - private function appendScripts() { - // enable meta boxes layout and close functionality - wp_enqueue_script('postbox'); - // add WordPress color picker layout - wp_enqueue_style('wp-color-picker'); - // add WordPress color picker function - wp_enqueue_script('wp-color-picker'); - - - /** - * Registers and enqueues the dashboard stylesheet. - * - * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. - * - * @since 2.5.5 - * @date 2021-02-14T1928+0100 - * - * @reporter @docteurfitness - * @link https://wordpress.org/support/topic/simply-speed-optimisation/ - * - * See the public stylesheet enqueuing: - * @see class/init.php - * - * added version # after changes started to settings.css from 2.1.2 on. - * automated update of version number for cache busting. - * No need to use '-styles' in the handle, as '-css' is appended automatically. - */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } else { - - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); - - } - - wp_enqueue_style('mci-footnotes-admin'); - } - - /** - * Displays the content of specific sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function displayContent() { - // register and enqueue scripts and styling - $this->appendScripts(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - // store settings - $l_bool_SettingsUpdated = false; - if (array_key_exists("save-settings", $_POST)) { - if ($_POST["save-settings"] == "save") { - unset($_POST["save-settings"]); - unset($_POST["submit"]); - $l_bool_SettingsUpdated = $this->saveSettings(); - } - } - - // display all sections and highlight the active section - echo '
                                                                                                                                                                      '; - echo '
                                                                                                                                                                      '; - - if ($l_bool_SettingsUpdated) { - echo sprintf('
                                                                                                                                                                      %s
                                                                                                                                                                      ', __("Settings saved", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)); - } - - // form to submit the active section - echo '
                                                                                                                                                                      '; - //settings_fields($l_arr_ActiveSection["container"]); - echo ''; - // outputs the settings field of the active section - do_settings_sections($l_arr_ActiveSection["id"]); - do_meta_boxes($l_arr_ActiveSection["id"], 'main', NULL); - - // add submit button to active section if defined - if ($l_arr_ActiveSection["submit"]) { - submit_button(); - } - // close the form to submit data - echo '
                                                                                                                                                                      '; - // close container for the settings page - echo '
                                                                                                                                                                      '; - // output special javascript for the expand/collapse function of the meta boxes - echo ''; - } - - /** - * Save all Plugin settings. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return bool - */ - private function saveSettings() { - $l_arr_newSettings = array(); - // get current section - reset($this->a_arr_Sections); - $l_str_ActiveSectionID = isset($_GET['t']) ? $_GET['t'] : key($this->a_arr_Sections); - $l_arr_ActiveSection = $this->a_arr_Sections[$l_str_ActiveSectionID]; - - // iterate through each value that has to be in the specific container - foreach(MCI_Footnotes_Settings::instance()->getDefaults($l_arr_ActiveSection["container"]) as $l_str_Key => $l_mixed_Value) { - // setting is available in the POST array, use it - if (array_key_exists($l_str_Key, $_POST)) { - $l_arr_newSettings[$l_str_Key] = $_POST[$l_str_Key]; - } else { - // setting is not defined in the POST array, define it to avoid the Default value - $l_arr_newSettings[$l_str_Key] = ""; - } - } - // update settings - return MCI_Footnotes_Settings::instance()->saveOptions($l_arr_ActiveSection["container"], $l_arr_newSettings); - } - - /** - * Output the Description of a section. May be overwritten in any section. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Description() { - // default no description will be displayed - } - - /** - * Loads specific setting and returns an array with the keys [id, name, value]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingKeyName Settings Array key name. - * @return array Contains Settings ID, Settings Name and Settings Value. - */ - protected function LoadSetting($p_str_SettingKeyName) { - // get current section - reset($this->a_arr_Sections); - $p_arr_Return = array(); - $p_arr_Return["id"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["name"] = sprintf('%s', $p_str_SettingKeyName); - $p_arr_Return["value"] = esc_attr(MCI_Footnotes_Settings::instance()->get($p_str_SettingKeyName)); - return $p_arr_Return; - } - - /** - * Returns a line break to start a new line. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addNewline() { - return '
                                                                                                                                                                      '; - } - - /** - * Returns a line break to have a space between two lines. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return string - */ - protected function addLineSpace() { - return '

                                                                                                                                                                      '; - } - - /** - * Returns a simple text inside html text. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_Text Message to be surrounded with simple html tag (span). - * @return string - */ - protected function addText($p_str_Text) { - return sprintf('%s', $p_str_Text); - } - - /** - * Returns the html tag for an input/select label. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. - * @param string $p_str_Caption Label caption. - * @return string - * - * Edited 2020-12-01T0159+0100.. - * @since 2.1.6 no colon - */ - protected function addLabel($p_str_SettingName, $p_str_Caption) { - if (empty($p_str_Caption)) { - return ""; - } - // remove the colon causing localization issues with French, - // and with languages not using punctuation at all, - // and with languages using other punctuation marks instead of colon, - // e.g. Greek using a raised dot. - // In French, colon is preceded by a space, forcibly non-breaking, - // and narrow per new school. - // Add colon to label strings for inclusion in localization. - // Colon after label is widely preferred best practice, mandatory per style guides. - // - return sprintf('', $p_str_SettingName, $p_str_Caption); - // ^ here deleted colon 2020-12-08T1546+0100 - } - - /** - * Returns the html tag for an input [type = text]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_str_MaxLength Maximum length of the input, default 999 characters. - * @param bool $p_bool_Readonly Set the input to be read only, default false. - * @param bool $p_bool_Hidden Set the input to be hidden, default false. - * @return string - */ - protected function addTextBox($p_str_SettingName, $p_str_MaxLength = 999, $p_bool_Readonly = false, $p_bool_Hidden = false) { - $l_str_Style = ""; - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - if ($p_bool_Hidden) { - $l_str_Style .= 'display:none;'; - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $p_str_MaxLength, - $l_str_Style, $l_arr_Data["value"], $p_bool_Readonly ? 'readonly="readonly"' : ''); - } - - /** - * Returns the html tag for an input [type = checkbox]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addCheckbox($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], - MCI_Footnotes_Convert::toBool($l_arr_Data["value"]) ? 'checked="checked"' : ''); - } - - /** - * Returns the html tag for a select box. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre select the current value. - * @param array $p_arr_Options Possible options to be selected. - * @return string - */ - protected function addSelectBox($p_str_SettingName, $p_arr_Options) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - $l_str_Options = ""; - - /* loop through all array keys */ - foreach ($p_arr_Options as $l_str_Value => $l_str_Caption) { - $l_str_Options .= sprintf('', - $l_str_Value, - $l_arr_Data["value"] == $l_str_Value ? "selected" : "", - $l_str_Caption); - } - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Options); - } - - /** - * Returns the html tag for a text area. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre fill the text area. - * @return string - */ - protected function addTextArea($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = text] with color selection class. - * - * @author Stefan Herndler - * @since 1.5.6 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @return string - */ - protected function addColorSelection($p_str_SettingName) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"]); - } - - /** - * Returns the html tag for an input [type = num]. - * - * @author Stefan Herndler - * @since 1.5.0 - * @param string $p_str_SettingName Name of the Settings key to pre load the input field. - * @param int $p_in_Min Minimum value. - * @param int $p_int_Max Maximum value. - * @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default) - * @return string - * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 - */ - protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) { - // collect data for given settings field - $l_arr_Data = $this->LoadSetting($p_str_SettingName); - - if ($p_bool_Deci) { - $l_str_Value = number_format(floatval($l_arr_Data["value"]), 1); - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max); - } else { - return sprintf('', - $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); - } - } - -} // end of class diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php deleted file mode 100644 index 33f327a..0000000 --- a/class/dashboard/subpage-diagnostics.php +++ /dev/null @@ -1,140 +0,0 @@ -addSection("diagnostics", __("Diagnostics", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false) - ); - } - - /** - * Returns an array of all registered meta boxes for each section of the sub page. - * - * @author Stefan Herndler - * @since 1.5.0 - * @return array - */ - protected function getMetaBoxes() { - return array( - $this->addMetaBox("diagnostics", "diagnostics", __("Displays information about the web server, PHP and WordPress", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Diagnostics") - ); - } - - /** - * Displays a diagnostics about the web server, php and WordPress. - * - * @author Stefan Herndler - * @since 1.5.0 - */ - public function Diagnostics() { - global $wp_version; - $l_str_PhpExtensions = ""; - // iterate through each PHP extension - foreach (get_loaded_extensions() as $l_int_Index => $l_str_Extension) { - if ($l_int_Index > 0) { - $l_str_PhpExtensions .= ' | '; - } - $l_str_PhpExtensions .= $l_str_Extension . ' ' . phpversion($l_str_Extension); - } - - /** @var WP_Theme $l_obj_CurrentTheme */ - $l_obj_CurrentTheme = wp_get_theme(); - - $l_str_WordPressPlugins = ""; - // iterate through each installed WordPress Plugin - foreach (get_plugins() as $l_arr_Plugin) { - $l_str_WordPressPlugins .= '
                                                                                                                                                                      ' . $l_arr_Plugin["Name"] . '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '
                                                                                                                                                                      ' . $l_arr_plugin['Name'] . '' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                      ' . $l_arr_Plugin["Name"] . '' . $l_arr_Plugin["Version"] . ' [' . $l_arr_Plugin["PluginURI"] . ']' . '
                                                                                                                                                                      ' . $l_arr_plugin['Name'] . '' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                      ' . $l_arr_plugin['Version'] . ' [' . $l_arr_plugin['PluginURI'] . ']' . '
                                                                                                                                                                      -.footnotes_plugin_reference_row = -.footnote_plugin_index_combi = first
                                                                                                                                                                      if identical footnotes are combined -.footnote_plugin_index = first if not -.footnote_index = or in first in 3-column table -.footnote_plugin_symbol = second in 3-column table -.footnote_plugin_link = or (identical footnotes not combined) -.footnote_backlink = or -.footnote_index_arrow = nested , symbol only -.footnote_plugin_text = second , or third in 3-column table -*/ - -.footnotes_reference_container { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -/* -label -*/ - -.footnote_container_prepare { - display: block !important; - padding-top: 24px !important; -} - -.footnote_container_prepare > p { - line-height: 1.3 !important; - margin-top: 1em !important; - margin-bottom: 0.25em !important; - padding: 0 !important; - font-weight: normal !important; - /* bottom border optional since 2.2.5 */ - display: block !important; - -webkit-margin-before: 0.83em !important; - -webkit-margin-after: 0.83em !important; - -webkit-margin-start: 0px !important; - -webkit-margin-end: 0px !important; - text-align: left !important; - vertical-align: middle; -} - -.footnote_container_prepare > p > span:first-child, - .footnote_container_prepare > p > span:nth-child(3) { - text-align: start !important; - font-size: 1.5em !important; -} - -/* -collapse button -fully clickable, not sign only -*/ - -.footnote_reference_container_collapse_button { - cursor: pointer; - padding: 0 0.5em; - font-size: 1.3em !important; - vertical-align: 2px; - text-decoration: none !important; -} - -h2 > .footnote_reference_container_collapse_button, -h3 > .footnote_reference_container_collapse_button, -h4 > .footnote_reference_container_collapse_button, -h5 > .footnote_reference_container_collapse_button, -h6 > .footnote_reference_container_collapse_button { - font-size: inherit !important; -} - -.footnote_container_prepare > p > span:last-child a, -.footnote_reference_container_collapse_button a { - text-decoration: none !important; -} - -/* -table -*/ - -.footnote-reference-container, -.footnotes_table { - width: 100%; - border: none; -} - -/* -footnotes - -@since 2.0.0 borderless table cells, thanks to @ragonesi bug report -@see -@since 2.0.1 enforce borderless text cells through !important property, thanks to @ragonesi bug report -@see -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi, -.footnote_plugin_symbol, -.footnote_plugin_text { - border: none !important; - text-align: left !important; - vertical-align: top !important; - padding: 5px 6px 10px 0 !important; -} - -.footnote_backlink, -.footnote_backlink:link, -.footnote_plugin_link, -.footnote_plugin_link:link, -.main-content .footnote_backlink, -.main-content .footnote_backlink:link, -.main-content .footnote_plugin_link, -.main-content .footnote_plugin_link:link { - text-decoration: none !important; - border-bottom: none !important; -} - -.footnote_backlink, -.footnote_plugin_link { - white-space: nowrap; -} - -.pointer, -.footnote_index, -.footnote_backlink { - cursor: pointer; -} - -/* -These rules when enabled cause the backlink to take an overline -when hovered in some themes, not in others: -.footnote_plugin_index:hover, -.footnote_plugin_index_combi:hover, -.footnote_plugin_index.pointer:hover, -.footnote_plugin_index_combi.pointer:hover, -*/ - -.footnote_backlink:hover, -.footnote_plugin_link:hover, -.footnote_plugin_text a:hover { - text-decoration: unset; - text-decoration: underline; /*deprioritized to ease customization*/ -} - -.footnote_plugin_text { - width: unset; /*unset width of text column to fix site issues*/ -} - -/* -These rules are just defaults preventing the table from filling the width. -They are not very effective by lack of table-layout: fixed; -since 2.1.4 settings are optionally available, with table-layout: fixed; - -By default, the backlink column is auto-expanding to fit widest. -Not using 'max-content' as that causes no-wrap and overflows. -These are overridden if settings are enabled. -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi { - max-width: 100px; - width: 2.5em; -} - -/* -Responsive -*/ - -@media only screen and (max-width: 768px) { - - .footnote_plugin_index, - .footnote_plugin_index_combi { - max-width: 80px; - } -} - - -/**************************************************************** -Footnotes printing style rules - -Printing a table, browsers tend to avoid page breaks inside, -but it takes a wrapper to avoid a page break before the table -just after the reference container headline. - -UI elements (expand/collapse button, backlink arrows) are hidden. - -Link color set to inherit, so referrers/numbers are not grayed out. - -@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report -@see - */ - -.footnotes_reference_container { - page-break-inside: avoid; -} - -@media print { - - .footnote_tooltip, - .footnote_reference_container_collapse_button, - .footnote_index_arrow { - display: none; - } - - .footnote_plugin_tooltip_text { - color: inherit; - } - - .footnote_plugin_index a, - .footnote_plugin_index_combi a { - color: inherit; - text-decoration: none !important; - } - - /* Edit button in WP2020 (added as a service) */ - div.post-meta-edit-link-wrapper { - display: none; - } -} - -/** - * MCI Footnotes logo - * - * The classes with 'heading' fixing display in dashboard - * have all their rules moved to settings.css so as to alleviate - * the common stylesheet. Still these rules are only used if the - * Footnotes ad link logo is present in the page footer per user - * dashboard setting. Making these rules conditional like those - * pertaining to tooltips, either jQuery or alternative, would - * double the number of united minified stylesheets shipped with - * the plugin. Hence these are present by default at the bottom. - * - * @see class/config.php - * @see css/settings.css - */ - -.footnotes_logo, -.footnotes_logo:hover { - text-decoration: none; - font-weight: normal; -} - -.footnotes_logo_part1 { - color: #2bb975; -} - -.footnotes_logo_part2 { - color: #545f5a; -} +/* + * .footnote_plugin_tooltip_text = inner + * .footnote_tooltip = inner + */ + +.footnote_referrer, +.footnote_referrer:link, +.footnote_referrer:hover, +.footnote_referrer > a, +.footnote_referrer > a:link, +.footnote_referrer > a:hover, +.footnote_plugin_tooltip_text, +.footnote_plugin_tooltip_text:hover, +.main-content .footnote_referrer, +.main-content .footnote_referrer:link, +.main-content .footnote_referrer:hover, +.main-content .footnote_referrer > a, +.main-content .footnote_referrer > a:link, +.main-content .footnote_referrer > a:hover, +.main-content .footnote_plugin_tooltip_text, +.main-content .footnote_plugin_tooltip_text:hover { + text-decoration: none !important; + border-bottom: none !important; + box-shadow: none !important; +} + +/** + * Footnote referrer (not “tooltip text”) + * + * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. + * + * @since 2.1.1 + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. + * + * @since 2.5.4 + * @reporter @wisenilesh + * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ + */ + +.footnote_plugin_tooltip_text { + line-height: 0; + position: relative !important; + cursor: pointer; +} + + +/***************************************************** +Footnote reference container + +Templates: +templates/public/reference-container.html +templates/public/reference-container-body.html +templates/public/reference-container-combi.html +templates/public/reference-container-switch.html +templates/public/reference-container-3column.html + +Optional responsive basic page layout support +stylesheets: +css/layout-reference-container.css +css/layout-main-content.css +css/layout-page-content.css + +Classes: +.footnotes_reference_container = enclosing
                                                                                                                                                                      +.footnote_container_prepare = label
                                                                                                                                                                      +.footnote_reference_container_label = +.footnote_reference_container_collapse_button = sibling +.footnote-reference-container = misleading and inconsistent; alias: +.footnotes_table = +.footnotes_plugin_reference_row = +.footnote_plugin_index_combi = first
                                                                                                                                                                      if identical footnotes are combined +.footnote_plugin_index = first if not +.footnote_index = or in first in 3-column table +.footnote_plugin_symbol = second in 3-column table +.footnote_plugin_link = or (identical footnotes not combined) +.footnote_backlink = or +.footnote_index_arrow = nested , symbol only +.footnote_plugin_text = second , or third in 3-column table +*/ + +.footnotes_reference_container { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/** + * Reference container label. + * + * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. + * + * @since 2.5.8 + * @reporter @arahmanshaalan + * @link https://wordpress.org/support/topic/right-to-left-text-problem/ + */ + +.footnote_container_prepare { + display: block !important; + padding-top: 24px !important; +} + +.footnote_container_prepare > p { + line-height: 1.3 !important; + margin-top: 1em !important; + margin-bottom: 0.25em !important; + padding: 0 !important; + font-weight: normal !important; + /* bottom border optional since 2.2.5 */ + display: block !important; + -webkit-margin-before: 0.83em !important; + -webkit-margin-after: 0.83em !important; + -webkit-margin-start: 0px !important; + -webkit-margin-end: 0px !important; + text-align: start !important; + vertical-align: middle; +} + +.footnote_container_prepare > p > span:first-child, + .footnote_container_prepare > p > span:nth-child(3) { + text-align: start !important; + font-size: 1.5em !important; +} + +/* +collapse button +fully clickable, not sign only +*/ + +.footnote_reference_container_collapse_button { + cursor: pointer; + padding: 0 0.5em; + font-size: 1.3em !important; + vertical-align: 2px; + text-decoration: none !important; +} + +h2 > .footnote_reference_container_collapse_button, +h3 > .footnote_reference_container_collapse_button, +h4 > .footnote_reference_container_collapse_button, +h5 > .footnote_reference_container_collapse_button, +h6 > .footnote_reference_container_collapse_button { + font-size: inherit !important; +} + +.footnote_container_prepare > p > span:last-child a, +.footnote_reference_container_collapse_button a { + text-decoration: none !important; +} + +/* +table +*/ + +.footnote-reference-container, +.footnotes_table { + width: 100%; + border: none; +} + +/** + * Footnotes list. + * + * - Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. + * + * @since 2.0.0 + * @reporter @ragonesi + * @link https://wordpress.org/support/topic/thin-box-around-notes-in-reference-container/ + * + * - Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. + * + * @since 2.0.1 + * @reporter @ragonesi + * @link https://wordpress.org/support/topic/box-around-c-references-container/ + * + * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. + * - Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. + * + * @since 2.5.8 + * @reporter @arahmanshaalan + * @link https://wordpress.org/support/topic/right-to-left-text-problem/ + */ + +.footnote_plugin_index, +.footnote_plugin_index_combi, +.footnote_plugin_symbol, +.footnote_plugin_text { + border: none !important; + text-align: start !important; + vertical-align: top !important; + padding: 5px 6px 10px 0 !important; +} + +html[dir="rtl"] .footnote_plugin_index, +html[dir="rtl"] .footnote_plugin_index_combi, +html[dir="rtl"] .footnote_plugin_symbol, +html[dir="rtl"] .footnote_plugin_text { + padding: 5px 0 10px 6px !important; +} + +.footnote_backlink, +.footnote_backlink:link, +.footnote_plugin_link, +.footnote_plugin_link:link, +.main-content .footnote_backlink, +.main-content .footnote_backlink:link, +.main-content .footnote_plugin_link, +.main-content .footnote_plugin_link:link { + text-decoration: none !important; + border-bottom: none !important; +} + +.footnote_backlink, +.footnote_plugin_link { + white-space: nowrap; +} + +.pointer, +.footnote_index, +.footnote_backlink { + cursor: pointer; +} + +/* +These rules when enabled cause the backlink to take an overline +when hovered in some themes, not in others: +.footnote_plugin_index:hover, +.footnote_plugin_index_combi:hover, +.footnote_plugin_index.pointer:hover, +.footnote_plugin_index_combi.pointer:hover, +*/ + +.footnote_backlink:hover, +.footnote_plugin_link:hover, +.footnote_plugin_text a:hover { + text-decoration: unset; + text-decoration: underline; /*deprioritized to ease customization*/ +} + +.footnote_plugin_text { + width: unset; /*unset width of text column to fix site issues*/ +} + +/* +These rules are just defaults preventing the table from filling the width. +They are not very effective by lack of table-layout: fixed; +since 2.1.4 settings are optionally available, with table-layout: fixed; + +By default, the backlink column is auto-expanding to fit widest. +Not using 'max-content' as that causes no-wrap and overflows. +These are overridden if settings are enabled. +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi { + max-width: 100px; + width: 2.5em; +} + +/* +Responsive +*/ + +@media only screen and (max-width: 768px) { + + .footnote_plugin_index, + .footnote_plugin_index_combi { + max-width: 80px; + } +} + + +/**************************************************************** +Footnotes printing style rules + +Printing a table, browsers tend to avoid page breaks inside, +but it takes a wrapper to avoid a page break before the table +just after the reference container headline. + +UI elements (expand/collapse button, backlink arrows) are hidden. + +Link color set to inherit, so referrers/numbers are not grayed out. + +@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report +@see + */ + +.footnotes_reference_container { + page-break-inside: avoid; +} + +@media print { + + .footnote_tooltip, + .footnote_reference_container_collapse_button, + .footnote_index_arrow { + display: none; + } + + .footnote_plugin_tooltip_text { + color: inherit; + } + + .footnote_plugin_index a, + .footnote_plugin_index_combi a { + color: inherit; + text-decoration: none !important; + } + + /* Edit button in WP2020 (added as a service) */ + div.post-meta-edit-link-wrapper { + display: none; + } +} + +/** + * MCI Footnotes logo + * + * The classes with 'heading' fixing display in dashboard + * have all their rules moved to settings.css so as to alleviate + * the common stylesheet. Still these rules are only used if the + * Footnotes ad link logo is present in the page footer per user + * dashboard setting. Making these rules conditional like those + * pertaining to tooltips, either jQuery or alternative, would + * double the number of united minified stylesheets shipped with + * the plugin. Hence these are present by default at the bottom. + * + * @see class/config.php + * @see css/settings.css + */ + +.footnotes_logo, +.footnotes_logo:hover { + text-decoration: none; + font-weight: normal; +} + +.footnotes_logo_part1 { + color: #2bb975; +} + +.footnotes_logo_part2 { + color: #545f5a; +} diff --git a/css/dev-tooltips-alternative.css b/css/dev-tooltips-alternative.css index d12e639..e22944a 100644 --- a/css/dev-tooltips-alternative.css +++ b/css/dev-tooltips-alternative.css @@ -1,63 +1,63 @@ -/*a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear} \ No newline at end of file diff --git a/css/footnotes-alttbrpl1.min.css b/css/footnotes-alttbrpl1.min.css index 61d752f..b158d14 100644 --- a/css/footnotes-alttbrpl1.min.css +++ b/css/footnotes-alttbrpl1.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-alttbrpl2.min.css b/css/footnotes-alttbrpl2.min.css index 3e4dfc8..e21fad0 100644 --- a/css/footnotes-alttbrpl2.min.css +++ b/css/footnotes-alttbrpl2.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-alttbrpl3.min.css b/css/footnotes-alttbrpl3.min.css index 1c5aa18..31209f6 100644 --- a/css/footnotes-alttbrpl3.min.css +++ b/css/footnotes-alttbrpl3.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-jqttbrpl0.min.css b/css/footnotes-jqttbrpl0.min.css index 2fa347d..f9e2ad9 100644 --- a/css/footnotes-jqttbrpl0.min.css +++ b/css/footnotes-jqttbrpl0.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important} \ No newline at end of file diff --git a/css/footnotes-jqttbrpl1.min.css b/css/footnotes-jqttbrpl1.min.css index 0636c19..83dec0f 100644 --- a/css/footnotes-jqttbrpl1.min.css +++ b/css/footnotes-jqttbrpl1.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-jqttbrpl2.min.css b/css/footnotes-jqttbrpl2.min.css index 2fa71f9..52d2c67 100644 --- a/css/footnotes-jqttbrpl2.min.css +++ b/css/footnotes-jqttbrpl2.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-jqttbrpl3.min.css b/css/footnotes-jqttbrpl3.min.css index 9a7ba55..fdbc16c 100644 --- a/css/footnotes-jqttbrpl3.min.css +++ b/css/footnotes-jqttbrpl3.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:start!important;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-nottbrpl0.min.css b/css/footnotes-nottbrpl0.min.css index d8ce22b..7da4e11 100644 --- a/css/footnotes-nottbrpl0.min.css +++ b/css/footnotes-nottbrpl0.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a} \ No newline at end of file diff --git a/css/footnotes-nottbrpl1.min.css b/css/footnotes-nottbrpl1.min.css index 50a9194..263a546 100644 --- a/css/footnotes-nottbrpl1.min.css +++ b/css/footnotes-nottbrpl1.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{margin:0 auto}@media (max-width:575px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{padding:0 10px}}@media (min-width:576px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:500px}}@media (min-width:768px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:600px}}@media (min-width:992px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:800px}}@media (min-width:1200px){.entry-content div.footnotes_reference_container,.entry-content>.footnotes_reference_container,main div.footnotes_reference_container{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-nottbrpl2.min.css b/css/footnotes-nottbrpl2.min.css index 528d229..1bce5ad 100644 --- a/css/footnotes-nottbrpl2.min.css +++ b/css/footnotes-nottbrpl2.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{margin:0 auto}@media (max-width:575px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{padding:0 10px}}@media (min-width:576px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:500px}}@media (min-width:768px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:600px}}@media (min-width:992px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:800px}}@media (min-width:1200px){.entry .entry-content,.entry-content,.page-content,main .entry .entry-content{max-width:960px}} \ No newline at end of file diff --git a/css/footnotes-nottbrpl3.min.css b/css/footnotes-nottbrpl3.min.css index a1eb33a..54d4832 100644 --- a/css/footnotes-nottbrpl3.min.css +++ b/css/footnotes-nottbrpl3.min.css @@ -1 +1 @@ -.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file +.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:start!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:start!important;vertical-align:top!important;padding:5px 6px 10px 0!important}html[dir=rtl] .footnote_plugin_index,html[dir=rtl] .footnote_plugin_index_combi,html[dir=rtl] .footnote_plugin_symbol,html[dir=rtl] .footnote_plugin_text{padding:5px 0 10px 6px!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}.main-content,.site-main,div.hentry,main{margin:0 auto}@media (max-width:575px){.main-content,.site-main,div.hentry,main{padding:0 10px}}@media (min-width:576px){.main-content,.site-main,div.hentry,main{max-width:500px}}@media (min-width:768px){.main-content,.site-main,div.hentry,main{max-width:600px}}@media (min-width:992px){.main-content,.site-main,div.hentry,main{max-width:800px}}@media (min-width:1200px){.main-content,.site-main,div.hentry,main{max-width:960px}} \ No newline at end of file diff --git a/css/settings.css b/css/settings.css old mode 100755 new mode 100644 index 83d2e04..c325065 --- a/css/settings.css +++ b/css/settings.css @@ -1,282 +1,282 @@ -/* -*/ -/*input[type=text], input[type=password], textarea, select*/ -#footnote_inputfield_readon_label, -#footnote_inputfield_references_label, -#footnote_inputfield_love { - padding-left: 8px !important; - padding-right: 8px !important; - width: 80% !important; -} - -#footnote_inputfield_reference_container_place { - width: 310px; -} - -#footnote_inputfield_counter_style, -#footnotes_inputfield_page_layout_support { - width: 505px; -} - -#footnote_inputfield_placeholder_start, -#footnote_inputfield_placeholder_end, -#footnote_inputfield_custom_mouse_over_box_excerpt_length { - width: 180px; -} -#footnote_inputfield_placeholder_start_user_defined, -#footnote_inputfield_placeholder_end_user_defined { - width: 320px; -} - -#footnote_inputfield_combine_identical, -#footnotes_inputfield_scroll_offset, -#footnotes_inputfield_scroll_duration, -#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, -#footnote_inputfield_custom_mouse_over_box_offset_x, -#footnote_inputfield_custom_mouse_over_box_offset_y, -#footnote_inputfield_custom_mouse_over_box_max_width, -#footnotes_inputfield_alternative_mouse_over_box_offset_x, -#footnotes_inputfield_alternative_mouse_over_box_offset_y, -#footnotes_inputfield_alternative_mouse_over_box_width, -#footnotes_inputfield_mouse_over_box_fade_in_delay, -#footnotes_inputfield_mouse_over_box_fade_in_duration, -#footnotes_inputfield_mouse_over_box_fade_out_delay, -#footnotes_inputfield_mouse_over_box_fade_out_duration, -#footnote_inputfield_custom_mouse_over_box_border_width, -#footnote_inputfield_custom_mouse_over_box_border_radius { - width: 80px; -} - -#footnote_inputfield_custom_hyperlink_symbol, -#footnotes_inputfield_backlinks_terminator_option, -#footnotes_inputfield_backlinks_separator_option { - width: 230px; -} - -#footnotes_inputfield_reference_container_top_margin, -#footnotes_inputfield_reference_container_bottom_margin, -#footnotes_inputfield_backlinks_column_width_scalar, -#footnotes_inputfield_backlinks_column_max_width_scalar, -#footnotes_inputfield_mouse_over_box_font_size_scalar { - width: 85px; -} - -#footnotes_inputfield_backlinks_column_width_unit, -#footnotes_inputfield_backlinks_column_max_width_unit, -#footnotes_inputfield_mouse_over_box_font_size_unit { - width: 140px; -} - -/************************************************************ -Headings and labels -*/ - -label { - display: inline-block; -} - -.postbox > h3 { - height: 32px !important; - line-height: 32px !important; -} - -.postbox > h3 > span { - padding: 0 10px; -} - -.postbox > .inside > table { - border: none !important; -} - -.postbox > .inside >table > tbody > tr > td:first-child { - width: 15% !important; - font-weight: bold !important; -} - -.footnote_placeholder_box_container { - text-align: center !important; -} - -span.footnote_highlight_placeholder { - font-weight: bold !important; - padding: 0 8px !important; -} - -.footnote_placeholder_box_example { - border: 2px solid #2bb975 !important; - border-radius: 4px !important; - padding: 16px 0 !important; - width: 50% !important; - display: block !important; - margin: 20px auto !important; - text-align: center !important; -} - -/************************************************************ -Special table layout - -Hooks and priority levels: -initialized from style attributes in templates -IE doesn’t support nth child, but these are not critical -*/ -.expert_lookup tr th:first-child, -.expert_lookup tr td:first-child { - width: 170px !important; -} -.expert_lookup tr th:nth-child(2), -.expert_lookup tr td:nth-child(2) { - width: 65px !important; -} -.expert_lookup tr th:nth-child(3), -.expert_lookup tr td:nth-child(3) { - width: 200px !important; -} -.expert_lookup tr td:nth-child(3) input { - width: 190px; -} -.expert_lookup tr th:last-child, -.expert_lookup tr td:last-child { - white-space: nowrap; -} - -/* -Custom CSS - -The number of CSS classes recommended for customization -significantly increased from 4 to 18 as of v2.4.0. - -Localized notices are dropped to ease translators’ task. -CSS classes are listed directly in the template -templates/dashboard/customize-css.html - -For better maintainability and readability of the source -list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: - - -The textarea has monospace font, but no other features -helping edit CSS, like tab support and syntactic colors. -*/ -#customize_css_new tr td:first-child { - width: 38% !important; - font-weight: normal !important; -} -.customize_css_new tr td:first-child span:first-child { - font-weight: bold !important; -} -.customize_css_new .list { - padding-top: 10px; -} -.customize_css_new .list p { - font-family: monospace; - padding: 0 10px; - text-indent: -10px; - margin: .5em 0; -} - -#footnote_inputfield_custom_css_new { - height: 500px; -} -#footnote_inputfield_custom_css, -#footnote_inputfield_custom_css_new { - width: 96%; - resize: both; - overflow: scroll; - font-family: monospace; -} - -/************************************************************ -Notices - -These spans were previously formatted using the em element. -But the intended semantics was not emphasis. -In locales using boldface to emphasize, the effect is the -exact opposite of the intention. - -So we must use spans with explicit italic font style. -Scripts not featuring italic fonts fall back to normal, -and that is just fine, as italic is only needed here for -scripts that do have italic, and failing to use it would -look weird. - -since 2.1.4 -*/ -.footnotes_notice { - font-style: italic; - display: inline-block; - text-align: end; -} - -/************************************************************ -Descriptions - -padded div above or below a settings table - -Use case: more extensive information not fitting into a brief -notice after the end of the settings box. -*/ -.footnotes_description { - padding: 0 4%; -} -.footnotes_description p { - font-size: 1.06em; - font-style: italic; -} +/* +*/ +/*input[type=text], input[type=password], textarea, select*/ +#footnote_inputfield_readon_label, +#footnote_inputfield_references_label, +#footnote_inputfield_love { + padding-left: 8px !important; + padding-right: 8px !important; + width: 80% !important; +} + +#footnote_inputfield_reference_container_place { + width: 310px; +} + +#footnote_inputfield_counter_style, +#footnotes_inputfield_page_layout_support { + width: 505px; +} + +#footnote_inputfield_placeholder_start, +#footnote_inputfield_placeholder_end, +#footnote_inputfield_custom_mouse_over_box_excerpt_length { + width: 180px; +} +#footnote_inputfield_placeholder_start_user_defined, +#footnote_inputfield_placeholder_end_user_defined { + width: 320px; +} + +#footnote_inputfield_combine_identical, +#footnotes_inputfield_scroll_offset, +#footnotes_inputfield_scroll_duration, +#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, +#footnote_inputfield_custom_mouse_over_box_offset_x, +#footnote_inputfield_custom_mouse_over_box_offset_y, +#footnote_inputfield_custom_mouse_over_box_max_width, +#footnotes_inputfield_alternative_mouse_over_box_offset_x, +#footnotes_inputfield_alternative_mouse_over_box_offset_y, +#footnotes_inputfield_alternative_mouse_over_box_width, +#footnotes_inputfield_mouse_over_box_fade_in_delay, +#footnotes_inputfield_mouse_over_box_fade_in_duration, +#footnotes_inputfield_mouse_over_box_fade_out_delay, +#footnotes_inputfield_mouse_over_box_fade_out_duration, +#footnote_inputfield_custom_mouse_over_box_border_width, +#footnote_inputfield_custom_mouse_over_box_border_radius { + width: 80px; +} + +#footnote_inputfield_custom_hyperlink_symbol, +#footnotes_inputfield_backlinks_terminator_option, +#footnotes_inputfield_backlinks_separator_option { + width: 230px; +} + +#footnotes_inputfield_reference_container_top_margin, +#footnotes_inputfield_reference_container_bottom_margin, +#footnotes_inputfield_backlinks_column_width_scalar, +#footnotes_inputfield_backlinks_column_max_width_scalar, +#footnotes_inputfield_mouse_over_box_font_size_scalar { + width: 85px; +} + +#footnotes_inputfield_backlinks_column_width_unit, +#footnotes_inputfield_backlinks_column_max_width_unit, +#footnotes_inputfield_mouse_over_box_font_size_unit { + width: 140px; +} + +/************************************************************ +Headings and labels +*/ + +label { + display: inline-block; +} + +.postbox > h3 { + height: 32px !important; + line-height: 32px !important; +} + +.postbox > h3 > span { + padding: 0 10px; +} + +.postbox > .inside > table { + border: none !important; +} + +.postbox > .inside >table > tbody > tr > td:first-child { + width: 15% !important; + font-weight: bold !important; +} + +.footnote_placeholder_box_container { + text-align: center !important; +} + +span.footnote_highlight_placeholder { + font-weight: bold !important; + padding: 0 8px !important; +} + +.footnote_placeholder_box_example { + border: 2px solid #2bb975 !important; + border-radius: 4px !important; + padding: 16px 0 !important; + width: 50% !important; + display: block !important; + margin: 20px auto !important; + text-align: center !important; +} + +/************************************************************ +Special table layout + +Hooks and priority levels: +initialized from style attributes in templates +IE doesn’t support nth child, but these are not critical +*/ +.expert_lookup tr th:first-child, +.expert_lookup tr td:first-child { + width: 170px !important; +} +.expert_lookup tr th:nth-child(2), +.expert_lookup tr td:nth-child(2) { + width: 65px !important; +} +.expert_lookup tr th:nth-child(3), +.expert_lookup tr td:nth-child(3) { + width: 200px !important; +} +.expert_lookup tr td:nth-child(3) input { + width: 190px; +} +.expert_lookup tr th:last-child, +.expert_lookup tr td:last-child { + white-space: nowrap; +} + +/* +Custom CSS + +The number of CSS classes recommended for customization +significantly increased from 4 to 18 as of v2.4.0. + +Localized notices are dropped to ease translators’ task. +CSS classes are listed directly in the template +templates/dashboard/customize-css.html + +For better maintainability and readability of the source +list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: + + +The textarea has monospace font, but no other features +helping edit CSS, like tab support and syntactic colors. +*/ +#customize_css_new tr td:first-child { + width: 38% !important; + font-weight: normal !important; +} +.customize_css_new tr td:first-child span:first-child { + font-weight: bold !important; +} +.customize_css_new .list { + padding-top: 10px; +} +.customize_css_new .list p { + font-family: monospace; + padding: 0 10px; + text-indent: -10px; + margin: .5em 0; +} + +#footnote_inputfield_custom_css_new { + height: 500px; +} +#footnote_inputfield_custom_css, +#footnote_inputfield_custom_css_new { + width: 96%; + resize: both; + overflow: scroll; + font-family: monospace; +} + +/************************************************************ +Notices + +These spans were previously formatted using the em element. +But the intended semantics was not emphasis. +In locales using boldface to emphasize, the effect is the +exact opposite of the intention. + +So we must use spans with explicit italic font style. +Scripts not featuring italic fonts fall back to normal, +and that is just fine, as italic is only needed here for +scripts that do have italic, and failing to use it would +look weird. + +since 2.1.4 +*/ +.footnotes_notice { + font-style: italic; + display: inline-block; + text-align: end; +} + +/************************************************************ +Descriptions + +padded div above or below a settings table + +Use case: more extensive information not fitting into a brief +notice after the end of the settings box. +*/ +.footnotes_description { + padding: 0 4%; +} +.footnotes_description p { + font-size: 1.06em; + font-style: italic; +} diff --git a/footnotes.php b/footnotes.php index 6595909..6c0ef6e 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,7 +4,7 @@ * Plugin URI: https://wordpress.org/plugins/footnotes/ * Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. * Author: Mark Cheret - * Version: 2.5.7 + * Version: 2.5.8 * Author URI: http://cheret.de/plugins/footnotes-2/ * Text Domain: footnotes * Domain Path: /languages @@ -19,9 +19,9 @@ * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-02-23T2304+0100 + * @lastmodified 2021-02-28T1345+0100 */ -define( 'C_STR_FOOTNOTES_VERSION', '2.5.6' ); +define( 'C_STR_FOOTNOTES_VERSION', '2.5.8' ); /* LICENSE NOTICE diff --git a/readme.txt b/readme.txt old mode 100755 new mode 100644 index 62e37d4..2ab1d48 --- a/readme.txt +++ b/readme.txt @@ -1,625 +1,629 @@ -=== footnotes === -Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges -Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing -Requires at least: 3.9 -Tested up to: 5.6.1 -Requires PHP: 5.6 -Stable Tag: 2.5.7 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html - -== Description == - -Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ -Cheers for the review, folks! - -https://www.youtube.com/watch?v=HzHaMAAJwbI - -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. - -= Main Features = -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. - -= Example Usage = -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -= Where to get footnotes? = -The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). - -= Support = -Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). - -Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). - -= Development = -Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). - -== Frequently Asked Questions == - -= Is your Plugin a copy of footnotes x? = - -No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. - -= Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = - -1. For anyone interested in converting from the FD Footnotes plugin: -Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 -2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! - -== Installation == -- Visit your WordPress Admin area -- Navigate to `Plugins\Add` -- Search for **footnotes** and find this Plugin among others -- Install the latest version of the **footnotes** Plugin from WordPress.org -- Activate the Plugin - -== Screenshots == -1. Find the footnotes plugin settings in the newly added "ManFisher" Menu -2. Settings for the *References Container* -3. Settings for **footnotes** styling -4. Settings for **footnotes** love -5. Other Settings -6. The HowTo section in the **footnotes** settings -7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? - -== Changelog == - -= 2.5.7 = -- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. - -= 2.5.6 = -- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. -- Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. - -= 2.5.5 = -- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. -- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. -- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. -- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. -- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. -- Update: Dashboard: decrease font size and padding of the descriptions. - -= 2.5.4 = -- 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. -- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. -- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. -- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. -- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. -- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. -- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. -- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. -- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. -- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. -- Bugfix: Editor button: Classic Editor text mode: correct label to singular. -- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. - -= 2.5.3 = -- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. - -= 2.5.2 = -- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. -- Bugfix: Localization: plugin language file name changes effective in version control system. - -= 2.5.1 = -- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. -- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. -- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. -- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. -- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. -- Update: Readme/documentation: add new contributors in the file header’s Contributors field. -- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. - -= 2.5.0 = -- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. -- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. -- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. -- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. -- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. - -= 2.4.0 = -- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. -- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. -- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. -- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. -- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. -- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. -- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. -- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. - -= 2.3.0 = -- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. -- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. -- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. -- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. -- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. -- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. -- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. -- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. -- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. - -= 2.2.10 = -- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. -- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. -- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. - -= 2.2.9 = -- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. -- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. -- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. -- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. - -= 2.2.8 = -- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - -= 2.2.7 = -- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - -= 2.2.6 = -- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. -- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - -= 2.2.5 = -- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. -- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. -- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. -- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. -- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). -- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). -- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. - -= 2.2.4 = -- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. -- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. - -= 2.2.3 = -- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. - -= 2.2.2 = -- Bugfix: Dashboard: Link element setting only under General settings > Reference container. -- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. -- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. - -= 2.2.1 = -- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. - -= 2.2.0 = -- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. -- Adding: Start/end short codes: more predefined options. -- Adding: Numbering styles: lowercase Roman numerals support. -- Update: Priority levels: update the notice in the dashboard Priority tab. -- Update: Dashboard: Tooltip settings: group into 3 thematic containers. -- Update: Dashboard: Main settings: group into 3 specific containers. -- Update: Dashboard: move link element option to the Referrers options. -- Update: Dashboard: move URL wrap option to the Reference container options. -- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. -- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. -- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. -- Bugfix: Localization: correct arguments for plugin textdomain load function. -- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. -- Adding: Footnotes mention in the footer: more options. - -= 2.1.6 = -- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. -- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. -- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. -- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. -- Update: Dashboard: reorder tabs and update tab labels. -- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. -- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. -- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. - -= 2.1.5 = -- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - -= 2.1.4 = -- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. -- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. -- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. -- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. -- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). -- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. -- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. -- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. -- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Referrers: Styling: disable hover underline. -- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. -- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. -- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. -- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. -- Bugfix: Reference container: Label: delete overflow hidden rule. -- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. -- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. -- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. -- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. -- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. -- Update: Dashboard: Notices: use explicit italic style. -- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. -- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. -- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. - -= 2.1.3 = -- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. -- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. -- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. -- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. -- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. -- Bugfix: Styling: raise Custom CSS priority to override settings. -- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. - -= 2.1.2 = -- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. -- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. -- Update: Dashboard: WordPress documentation URLs of the hooks. -- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. - -= 2.1.1 = -- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. -- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. -- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. -- Bugfix: Libraries: jQuery Tools: complete minification. -- Bugfix: Libraries: make script loads depend on tooltip implementation option. -- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. -- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. -- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. -- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. -- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. -- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. -- Bugfix: Reference container: Table rows: fix top and bottom padding. -- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. -- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. -- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. -- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. -- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. -- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. - -= 2.1.0 = -- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. -- Bugfix: Referrers: disable bottom border for theme compatibility. -- Update: Accessibility: add 'speaker-mute' class to reference container. -- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. -- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - -= 2.0.8 = -- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). - -= 2.0.7 = -- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. -- Update: Set priority level back to 10 assuming it is unproblematic. -- Update: Added backwards compatible support for legacy arrow and index placeholders in template. -- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. - -= 2.0.6 = -- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. -- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. -- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. -- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. -- Bugfix: Reference container: IDs: slightly increased left padding. -- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. -- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). -- Bugfix: Reference container: Collapse button fully clickable, not sign only. -- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. -- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). -- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). -- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). -- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. - -= 2.0.5 = -- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. -- Bugfix: Reference container: unset width of text column to fix site issues. -- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. -- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. -- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). - -= 2.0.4 = -- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. -- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. -- Bugfix: Reference container: remove inconvenient left/right cellpadding. -- Bugfix: Tooltips: improve layout with inherited font size by lower line height. -- Bugfix: Tooltips: 'Continue reading' button: disable default underline. -- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. -- Bugfix: Dashboard: fix display of two headings containing the logo. - -= 2.0.3 = -- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. -- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. -- Bugfix: Fragment IDs: Prepended post ID to footnote number. -- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. -- Bugfix: Print style: prevent a page break just after the reference container label. -- Bugfix: Print style: Hide reference collapse button. -- Update: Reference container: Headline: remove padding before reference container label. -- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. - -= 2.0.2 = -- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. -- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. -- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. -- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. - -= 2.0.1 = -- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. -- Update: Translations: revised fr_FR. - -= 2.0.0 = -- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: -- Update: **symbol for backlinks** removed -- Update: hyperlink moved to the reference number -- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. -- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. -- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. -- Bugfix: footnote links script independent -- Bugfix: Get the “Continue reading” link to work in the mouse-over box -- Bugfix: Debug printed posts and pages -- Bugfix: Display of combined identical notes -- Update: Adjusted scrolling time and offset -- Bugfix: No borders around footnotes in the container -- Bugfix: Mouse-over box display timing -- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES - -= 1.6.6 = -- Beginning of translation to French - -= 1.6.5 = -- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. -- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. -- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text -- Bugfix: Dashboard: fix error on demo under the Preview tab. - -= 1.6.4 = -- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. -- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - -= 1.6.3 = -- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress - -= 1.6.2 = -- Update: Changed the Preview tab -- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled - -= 1.6.1 = -- Update: Translations -- Bugfix: Move to anchor - -= 1.6.0 = -- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) -- Adding: Setting to customize the mouse-over box shadow -- Adding: Translation: United States -- Adding: Translation: Austria -- Adding: Translation: Spanish (many thanks to Pablo L.) -- Update: Translations (de_DE and en_GB) -- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) -- Update: ManFisher note styling -- Update: Tested with latest nightly build of WordPress 4.1 -- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed - -= 1.5.7 = -- Adding: Setting to define the positioning of the mouse-over box -- Adding: Setting to define an offset for the mouse-over box (precise positioning) -- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) -- Bugfix: Rating calculation for the 'other plugins' list - -= 1.5.6 = -- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. -- Adding: .pot file to enable Translations for everybody -- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) -- Update: Translation file names -- Update: Translation EN and DE -- Update: Styling of the superscript (need to check custom CSS code for the superscript) -- Update: Description of CSS classes for the 'customize CSS' text area -- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) -- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting -- Bugfix: Enable multiple WP_Post objects for the_post hook - -= 1.5.5 = -- Adding: Expert mode setting -- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) -- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes -- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) -- Bugfix: Activation, Deactivation and Uninstall hook class name -- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin -- Bugfix: Display the Reference container in the Footer correctly - -= 1.5.4 = -- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) -- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) -- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) -- Update: Receiving list of other Plugins from the Developer Team from an external server -- Update: Translations (EN and DE) -- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) -- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) -- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database - -= 1.5.3 = -- Adding: Developer's homepage to the 'other Plugins' list -- Update: Smoothy scroll to an anchor using Javascript -- Bugfix: Set the vertical align for each cell in the Reference container to TOP - -= 1.5.2 = -- Adding: Setting to enable/disable the mouse-over box -- Adding: Current WordPress Theme to the Diagnostics sub page -- Adding: ManFisher note in the "other Plugins" sub page -- Update: Removed unnecessary hidden inputs from the Settings page -- Update: Merged public CSS files to reduce the output and improve the performance -- Update: Translations (EN and DE) -- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting -- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) -- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' - -= 1.5.1 = -- Bugfix: Broken Settings link in the Plugin listing -- Bugfix: Translation overhaul for German - -= 1.5.0 = -- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" -- Adding: Sub Page to list all other Plugins of the Contributors -- Adding: Hyperlink to manfisher.eu in the "other plugins" page -- Update: Refactored the whole source code -- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" -- Bugfix: Line up Footnotes with multiple lines in the Reference container -- Bugfix: Load text domain -- Bugfix: Display the Footnotes button in the plain text editor of posts/pages - -= 1.4.0 = -- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) -- Update: Changed e-Mail support address to the WordPress support forum -- Update: Language EN and DE -- Adding: Tab for Plugin Diagnostics -- Adding: Donate link to the installed Plugin overview page -- Adding: Donate button to the "HowTo" tab - -= 1.3.4 = -- Bugfix: Settings access permission vor sub-sites -- Bugfix: Setting 'combine identical footnotes' working as it should - -= 1.3.3 = -- Update: Changed the Author name from a fictitious entity towards a real registered company -- Update: Changed the Author URI - -= 1.3.2 = -- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) -- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) -- Update: language EN and DE -- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference -- Adding: Setting to enter a user defined hyperlink symbol -- - -= 1.3.1 = -- Bugfix: Allow settings to be empty -- Bugfix: Removed space between the hyperlink and superscript in the footnotes index -- Adding: Setting to customize the text before and after the footnotes index in superscript - -= 1.3.0 = -- Bugfix: Changed tooltip class to be unique -- Bugfix: Changed superscript styling to not manipulate the line height -- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks -- Update: Reformatted code -- Adding: new settings tab for custom CSS settings - -= 1.2.5 = -- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) - -= 1.2.4 = -- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) -- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) -- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) - -= 1.2.3 = -- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) -- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) -- Bugfix: Removed Widget text formatting -- Bugfix: Load default settings value of setting doesn't exist yet (first usage) -- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content -- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) - -= 1.2.2 = -- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) -- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer -- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" -- Bugfix: Replace footnote short code -- Update: Combined buttons for the "collapse/expand" reference container - -= 1.2.1 = -- Bugfix: HowTo example will be displayed correctly if a user defined short code is set - -= 1.2.0 = -- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag -- Feature: Icon for the WYSIWYG-editor button -- Feature: Pre defined footnote short codes -- Experimental: User defined short code for defining footnotes -- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" -- Update: Moved footnotes 'love' settings to a separate container -- Update: Translation for new settings and for the Widget description -- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" - -= 1.1.1 = -- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) -- Update: Setting where the reference container appears on public pages can also be set to the widget area -- Adding: Link to the wordpress.org support page in the plugin main page -- Update: Changed plugin URL from GitHub to WordPress -- Bugfix: Uninstall function to really remove all settings done in the settings page -- Bugfix: Load default settings after plugin is installed -- Update: Translation for support link and new setting option -- Adding: Label to display the user the short code to not display the 'love me' slug - -= 1.1.0 = -- Update: Global styling for the public plugin name -- Update: Easier usage of the public plugin name in translations -- Update: New Layout for the settings page to group similar settings to get a better overview -- Update: Display settings submit button only if there is at least 1 editable setting in the current tab -- Adding: Setting where the reference container appears on public pages (needs some corrections!) -- Bugfix: Displays only one reference container in front of the footer on category pages - -= 1.0.6 = -- Bugfix: Uninstall function to delete all plugin settings -- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above -- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over -- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' - -= 1.0.5 = -- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. -- Update: Plugin description for public directories (WordPress.org and GitHub) -- Feature: the footnotes WordPress Plugin now has its very own CI - - Update: Styling - - Update: Settings to support the styling -- Adding: Inspirational Screenshots for further development -- Adding: Settings screenshot -- Update: i18n fine-tuning - -= 1.0.4 = -- Update: replacing function when footnote is a link (bugfix) -- Footnote hover box remains until cursor leaves footnote or hover box -- Links in the footnote hover box are click able -- Adding: setting to allow footnotes on Summarized Posts -- Adding: setting to tell the world you're using footnotes plugin -- Adding: setting for the counter style of the footnote index - - Arabic Numbers (1, 2, 3, 4, 5, ...) - - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) - - Latin Characters lower-case (a, b, c, d, e, ...) - - Latin Characters upper-case (A, B, C, D, E, ...) - - Roman Numerals (I, II, III, IV, V, ...) -- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it -- Update: translations for the new settings -- Switch back the version numbering scheme to have 3 digits - -= 1.0.3 = -- Adding: setting to use personal starting and ending tag for the footnotes -- Update: translations for the new setting -- Update: reading settings and fallback to default values (bugfix) - -= 1.0.2 = -- Adding: setting to collapse the reference container by default -- Adding: link behind the footnotes to automatically jump to the reference container -- Adding: function to easy output input fields for the settings page -- Update: translation for the new setting - -= 1.0.1 = -- Separated functions in different files for a better overview -- Adding: a version control to each file / class / function / variable -- Adding: layout for the settings menu, settings split in tabs and not a list-view -- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) -- Update: translations for EN and DE -- Changed version number from 3 digits to 2 digits - -= 1.0.0 = -- First development Version of the Plugin - -== Upgrade Notice == -to upgrade our plugin is simple. Just update the plugin within your WordPress installation. -To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future +=== footnotes === +Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges +Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing +Requires at least: 3.9 +Tested up to: 5.6.1 +Requires PHP: 5.6 +Stable Tag: 2.5.8 +License: GPLv3 or later +License URI: http://www.gnu.org/licenses/gpl-3.0.html + +== Description == + +Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +Cheers for the review, folks! + +https://www.youtube.com/watch?v=HzHaMAAJwbI + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. + += Main Features = +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + += Example Usage = +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + += Where to get footnotes? = +The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). + += Support = +Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). + +Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). + += Development = +Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). + +== Frequently Asked Questions == + += Is your Plugin a copy of footnotes x? = + +No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. + += Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = + +1. For anyone interested in converting from the FD Footnotes plugin: +Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 +2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! + +== Installation == +- Visit your WordPress Admin area +- Navigate to `Plugins\Add` +- Search for **footnotes** and find this Plugin among others +- Install the latest version of the **footnotes** Plugin from WordPress.org +- Activate the Plugin + +== Screenshots == +1. Find the footnotes plugin settings in the newly added "ManFisher" Menu +2. Settings for the *References Container* +3. Settings for **footnotes** styling +4. Settings for **footnotes** love +5. Other Settings +6. The HowTo section in the **footnotes** settings +7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? + +== Changelog == + += 2.5.8 = +- Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. +- Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. + += 2.5.7 = +- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. + += 2.5.6 = +- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. +- Bugfix: Alternative tooltips: shrink width to short content. +- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. + += 2.5.5 = +- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. +- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. +- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. +- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. +- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. +- Update: Dashboard: decrease font size and padding of the descriptions. + += 2.5.4 = +- 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. +- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. +- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. +- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. +- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. +- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. +- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. +- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. +- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. +- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. +- Bugfix: Editor button: Classic Editor text mode: correct label to singular. +- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. + += 2.5.3 = +- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. + += 2.5.2 = +- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. +- Bugfix: Localization: plugin language file name changes effective in version control system. + += 2.5.1 = +- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. +- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. +- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. +- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. +- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. +- Update: Readme/documentation: add new contributors in the file header’s Contributors field. +- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. + += 2.5.0 = +- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. +- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. +- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. +- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. +- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. + += 2.4.0 = +- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. +- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. +- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. +- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. +- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. +- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. +- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. +- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. + += 2.3.0 = +- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. +- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. +- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. +- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. +- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. +- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. +- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. +- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. +- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. + += 2.2.10 = +- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. +- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. +- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. + += 2.2.9 = +- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. +- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. +- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. +- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. + += 2.2.8 = +- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + += 2.2.7 = +- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + += 2.2.6 = +- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. +- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. + += 2.2.5 = +- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. +- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. +- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. +- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. +- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). +- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). +- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. + += 2.2.4 = +- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. +- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. + += 2.2.3 = +- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. + += 2.2.2 = +- Bugfix: Dashboard: Link element setting only under General settings > Reference container. +- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. +- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. + += 2.2.1 = +- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. + += 2.2.0 = +- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. +- Adding: Start/end short codes: more predefined options. +- Adding: Numbering styles: lowercase Roman numerals support. +- Update: Priority levels: update the notice in the dashboard Priority tab. +- Update: Dashboard: Tooltip settings: group into 3 thematic containers. +- Update: Dashboard: Main settings: group into 3 specific containers. +- Update: Dashboard: move link element option to the Referrers options. +- Update: Dashboard: move URL wrap option to the Reference container options. +- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. +- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. +- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. +- Bugfix: Localization: correct arguments for plugin textdomain load function. +- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. +- Adding: Footnotes mention in the footer: more options. + += 2.1.6 = +- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. +- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. +- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. +- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. +- Update: Dashboard: reorder tabs and update tab labels. +- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. +- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. +- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. + += 2.1.5 = +- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + += 2.1.4 = +- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. +- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. +- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. +- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. +- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). +- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. +- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. +- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. +- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Referrers: Styling: disable hover underline. +- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. +- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. +- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. +- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. +- Bugfix: Reference container: Label: delete overflow hidden rule. +- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. +- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. +- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. +- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. +- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. +- Update: Dashboard: Notices: use explicit italic style. +- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. +- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. +- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. + += 2.1.3 = +- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. +- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. +- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. +- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. +- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. +- Bugfix: Styling: raise Custom CSS priority to override settings. +- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. + += 2.1.2 = +- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. +- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. +- Update: Dashboard: WordPress documentation URLs of the hooks. +- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. + += 2.1.1 = +- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. +- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. +- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. +- Bugfix: Libraries: jQuery Tools: complete minification. +- Bugfix: Libraries: make script loads depend on tooltip implementation option. +- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. +- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. +- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. +- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. +- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. +- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. +- Bugfix: Reference container: Table rows: fix top and bottom padding. +- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. +- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. +- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. +- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. +- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. +- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. + += 2.1.0 = +- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. +- Bugfix: Referrers: disable bottom border for theme compatibility. +- Update: Accessibility: add 'speaker-mute' class to reference container. +- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. +- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + += 2.0.8 = +- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). + += 2.0.7 = +- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. +- Update: Set priority level back to 10 assuming it is unproblematic. +- Update: Added backwards compatible support for legacy arrow and index placeholders in template. +- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. + += 2.0.6 = +- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. +- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. +- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. +- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. +- Bugfix: Reference container: IDs: slightly increased left padding. +- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. +- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). +- Bugfix: Reference container: Collapse button fully clickable, not sign only. +- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. +- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). +- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). +- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. + += 2.0.5 = +- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. +- Bugfix: Reference container: unset width of text column to fix site issues. +- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. +- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. +- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). + += 2.0.4 = +- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. +- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. +- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. +- Bugfix: Reference container: remove inconvenient left/right cellpadding. +- Bugfix: Tooltips: improve layout with inherited font size by lower line height. +- Bugfix: Tooltips: 'Continue reading' button: disable default underline. +- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. +- Bugfix: Dashboard: fix display of two headings containing the logo. + += 2.0.3 = +- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. +- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. +- Bugfix: Fragment IDs: Prepended post ID to footnote number. +- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. +- Bugfix: Print style: prevent a page break just after the reference container label. +- Bugfix: Print style: Hide reference collapse button. +- Update: Reference container: Headline: remove padding before reference container label. +- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. + += 2.0.2 = +- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. +- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. +- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. +- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. + += 2.0.1 = +- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. +- Update: Translations: revised fr_FR. + += 2.0.0 = +- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: +- Update: **symbol for backlinks** removed +- Update: hyperlink moved to the reference number +- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. +- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. +- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. +- Bugfix: footnote links script independent +- Bugfix: Get the “Continue reading” link to work in the mouse-over box +- Bugfix: Debug printed posts and pages +- Bugfix: Display of combined identical notes +- Update: Adjusted scrolling time and offset +- Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. +- Bugfix: Mouse-over box display timing +- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES + += 1.6.6 = +- Beginning of translation to French + += 1.6.5 = +- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. +- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. +- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text +- Bugfix: Dashboard: fix error on demo under the Preview tab. + += 1.6.4 = +- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. +- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + += 1.6.3 = +- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress + += 1.6.2 = +- Update: Changed the Preview tab +- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled + += 1.6.1 = +- Update: Translations +- Bugfix: Move to anchor + += 1.6.0 = +- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) +- Adding: Setting to customize the mouse-over box shadow +- Adding: Translation: United States +- Adding: Translation: Austria +- Adding: Translation: Spanish (many thanks to Pablo L.) +- Update: Translations (de_DE and en_GB) +- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) +- Update: ManFisher note styling +- Update: Tested with latest nightly build of WordPress 4.1 +- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed + += 1.5.7 = +- Adding: Setting to define the positioning of the mouse-over box +- Adding: Setting to define an offset for the mouse-over box (precise positioning) +- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) +- Bugfix: Rating calculation for the 'other plugins' list + += 1.5.6 = +- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. +- Adding: .pot file to enable Translations for everybody +- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) +- Update: Translation file names +- Update: Translation EN and DE +- Update: Styling of the superscript (need to check custom CSS code for the superscript) +- Update: Description of CSS classes for the 'customize CSS' text area +- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) +- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting +- Bugfix: Enable multiple WP_Post objects for the_post hook + += 1.5.5 = +- Adding: Expert mode setting +- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) +- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes +- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) +- Bugfix: Activation, Deactivation and Uninstall hook class name +- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin +- Bugfix: Display the Reference container in the Footer correctly + += 1.5.4 = +- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) +- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) +- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) +- Update: Receiving list of other Plugins from the Developer Team from an external server +- Update: Translations (EN and DE) +- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) +- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) +- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database + += 1.5.3 = +- Adding: Developer's homepage to the 'other Plugins' list +- Update: Smoothy scroll to an anchor using Javascript +- Bugfix: Set the vertical align for each cell in the Reference container to TOP + += 1.5.2 = +- Adding: Setting to enable/disable the mouse-over box +- Adding: Current WordPress Theme to the Diagnostics sub page +- Adding: ManFisher note in the "other Plugins" sub page +- Update: Removed unnecessary hidden inputs from the Settings page +- Update: Merged public CSS files to reduce the output and improve the performance +- Update: Translations (EN and DE) +- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting +- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) +- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' + += 1.5.1 = +- Bugfix: Broken Settings link in the Plugin listing +- Bugfix: Translation overhaul for German + += 1.5.0 = +- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" +- Adding: Sub Page to list all other Plugins of the Contributors +- Adding: Hyperlink to manfisher.eu in the "other plugins" page +- Update: Refactored the whole source code +- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" +- Bugfix: Line up Footnotes with multiple lines in the Reference container +- Bugfix: Load text domain +- Bugfix: Display the Footnotes button in the plain text editor of posts/pages + += 1.4.0 = +- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) +- Update: Changed e-Mail support address to the WordPress support forum +- Update: Language EN and DE +- Adding: Tab for Plugin Diagnostics +- Adding: Donate link to the installed Plugin overview page +- Adding: Donate button to the "HowTo" tab + += 1.3.4 = +- Bugfix: Settings access permission vor sub-sites +- Bugfix: Setting 'combine identical footnotes' working as it should + += 1.3.3 = +- Update: Changed the Author name from a fictitious entity towards a real registered company +- Update: Changed the Author URI + += 1.3.2 = +- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) +- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) +- Update: language EN and DE +- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference +- Adding: Setting to enter a user defined hyperlink symbol +- + += 1.3.1 = +- Bugfix: Allow settings to be empty +- Bugfix: Removed space between the hyperlink and superscript in the footnotes index +- Adding: Setting to customize the text before and after the footnotes index in superscript + += 1.3.0 = +- Bugfix: Changed tooltip class to be unique +- Bugfix: Changed superscript styling to not manipulate the line height +- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks +- Update: Reformatted code +- Adding: new settings tab for custom CSS settings + += 1.2.5 = +- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) + += 1.2.4 = +- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) +- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) +- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) + += 1.2.3 = +- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) +- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) +- Bugfix: Removed Widget text formatting +- Bugfix: Load default settings value of setting doesn't exist yet (first usage) +- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content +- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) + += 1.2.2 = +- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) +- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer +- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" +- Bugfix: Replace footnote short code +- Update: Combined buttons for the "collapse/expand" reference container + += 1.2.1 = +- Bugfix: HowTo example will be displayed correctly if a user defined short code is set + += 1.2.0 = +- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag +- Feature: Icon for the WYSIWYG-editor button +- Feature: Pre defined footnote short codes +- Experimental: User defined short code for defining footnotes +- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" +- Update: Moved footnotes 'love' settings to a separate container +- Update: Translation for new settings and for the Widget description +- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" + += 1.1.1 = +- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) +- Update: Setting where the reference container appears on public pages can also be set to the widget area +- Adding: Link to the wordpress.org support page in the plugin main page +- Update: Changed plugin URL from GitHub to WordPress +- Bugfix: Uninstall function to really remove all settings done in the settings page +- Bugfix: Load default settings after plugin is installed +- Update: Translation for support link and new setting option +- Adding: Label to display the user the short code to not display the 'love me' slug + += 1.1.0 = +- Update: Global styling for the public plugin name +- Update: Easier usage of the public plugin name in translations +- Update: New Layout for the settings page to group similar settings to get a better overview +- Update: Display settings submit button only if there is at least 1 editable setting in the current tab +- Adding: Setting where the reference container appears on public pages (needs some corrections!) +- Bugfix: Displays only one reference container in front of the footer on category pages + += 1.0.6 = +- Bugfix: Uninstall function to delete all plugin settings +- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above +- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over +- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' + += 1.0.5 = +- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. +- Update: Plugin description for public directories (WordPress.org and GitHub) +- Feature: the footnotes WordPress Plugin now has its very own CI + - Update: Styling + - Update: Settings to support the styling +- Adding: Inspirational Screenshots for further development +- Adding: Settings screenshot +- Update: i18n fine-tuning + += 1.0.4 = +- Update: replacing function when footnote is a link (bugfix) +- Footnote hover box remains until cursor leaves footnote or hover box +- Links in the footnote hover box are click able +- Adding: setting to allow footnotes on Summarized Posts +- Adding: setting to tell the world you're using footnotes plugin +- Adding: setting for the counter style of the footnote index + - Arabic Numbers (1, 2, 3, 4, 5, ...) + - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) + - Latin Characters lower-case (a, b, c, d, e, ...) + - Latin Characters upper-case (A, B, C, D, E, ...) + - Roman Numerals (I, II, III, IV, V, ...) +- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it +- Update: translations for the new settings +- Switch back the version numbering scheme to have 3 digits + += 1.0.3 = +- Adding: setting to use personal starting and ending tag for the footnotes +- Update: translations for the new setting +- Update: reading settings and fallback to default values (bugfix) + += 1.0.2 = +- Adding: setting to collapse the reference container by default +- Adding: link behind the footnotes to automatically jump to the reference container +- Adding: function to easy output input fields for the settings page +- Update: translation for the new setting + += 1.0.1 = +- Separated functions in different files for a better overview +- Adding: a version control to each file / class / function / variable +- Adding: layout for the settings menu, settings split in tabs and not a list-view +- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) +- Update: translations for EN and DE +- Changed version number from 3 digits to 2 digits + += 1.0.0 = +- First development Version of the Plugin + +== Upgrade Notice == +to upgrade our plugin is simple. Just update the plugin within your WordPress installation. +To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future From f129f3a39212419ec77a1b4d93aa5f7bd8bb21b1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 28 Feb 2021 14:13:07 +0000 Subject: [PATCH 087/144] Renormalise line endings --- css/dev-common.css | 1064 ++++++++++++------------- css/dev-tooltips-alternative.css | 126 +-- css/dev-tooltips.css | 122 +-- css/settings.css | 564 +++++++------- readme.txt | 1258 +++++++++++++++--------------- 5 files changed, 1567 insertions(+), 1567 deletions(-) diff --git a/css/dev-common.css b/css/dev-common.css index 155d738..8bd2548 100644 --- a/css/dev-common.css +++ b/css/dev-common.css @@ -1,532 +1,532 @@ -/* - * .footnote_plugin_tooltip_text = inner - * .footnote_tooltip = inner - */ - -.footnote_referrer, -.footnote_referrer:link, -.footnote_referrer:hover, -.footnote_referrer > a, -.footnote_referrer > a:link, -.footnote_referrer > a:hover, -.footnote_plugin_tooltip_text, -.footnote_plugin_tooltip_text:hover, -.main-content .footnote_referrer, -.main-content .footnote_referrer:link, -.main-content .footnote_referrer:hover, -.main-content .footnote_referrer > a, -.main-content .footnote_referrer > a:link, -.main-content .footnote_referrer > a:hover, -.main-content .footnote_plugin_tooltip_text, -.main-content .footnote_plugin_tooltip_text:hover { - text-decoration: none !important; - border-bottom: none !important; - box-shadow: none !important; -} - -/** - * Footnote referrer (not “tooltip text”) - * - * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. - * - * @since 2.1.1 - * @reporter @cwbayer - * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ - * - * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. - * - * @since 2.5.4 - * @reporter @wisenilesh - * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ - */ - -.footnote_plugin_tooltip_text { - line-height: 0; - position: relative !important; - cursor: pointer; -} - - -/***************************************************** -Footnote reference container - -Templates: -templates/public/reference-container.html -templates/public/reference-container-body.html -templates/public/reference-container-combi.html -templates/public/reference-container-switch.html -templates/public/reference-container-3column.html - -Optional responsive basic page layout support -stylesheets: -css/layout-reference-container.css -css/layout-main-content.css -css/layout-page-content.css - -Classes: -.footnotes_reference_container = enclosing
                                                                                                                                                                      -.footnote_container_prepare = label
                                                                                                                                                                      -.footnote_reference_container_label = -.footnote_reference_container_collapse_button = sibling -.footnote-reference-container = misleading and inconsistent; alias: -.footnotes_table = -.footnotes_plugin_reference_row = -.footnote_plugin_index_combi = first
                                                                                                                                                                      if identical footnotes are combined -.footnote_plugin_index = first if not -.footnote_index = or in first in 3-column table -.footnote_plugin_symbol = second in 3-column table -.footnote_plugin_link = or (identical footnotes not combined) -.footnote_backlink = or -.footnote_index_arrow = nested , symbol only -.footnote_plugin_text = second , or third in 3-column table -*/ - -.footnotes_reference_container { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -/** - * Reference container label. - * - * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. - * - * @since 2.5.8 - * @reporter @arahmanshaalan - * @link https://wordpress.org/support/topic/right-to-left-text-problem/ - */ - -.footnote_container_prepare { - display: block !important; - padding-top: 24px !important; -} - -.footnote_container_prepare > p { - line-height: 1.3 !important; - margin-top: 1em !important; - margin-bottom: 0.25em !important; - padding: 0 !important; - font-weight: normal !important; - /* bottom border optional since 2.2.5 */ - display: block !important; - -webkit-margin-before: 0.83em !important; - -webkit-margin-after: 0.83em !important; - -webkit-margin-start: 0px !important; - -webkit-margin-end: 0px !important; - text-align: start !important; - vertical-align: middle; -} - -.footnote_container_prepare > p > span:first-child, - .footnote_container_prepare > p > span:nth-child(3) { - text-align: start !important; - font-size: 1.5em !important; -} - -/* -collapse button -fully clickable, not sign only -*/ - -.footnote_reference_container_collapse_button { - cursor: pointer; - padding: 0 0.5em; - font-size: 1.3em !important; - vertical-align: 2px; - text-decoration: none !important; -} - -h2 > .footnote_reference_container_collapse_button, -h3 > .footnote_reference_container_collapse_button, -h4 > .footnote_reference_container_collapse_button, -h5 > .footnote_reference_container_collapse_button, -h6 > .footnote_reference_container_collapse_button { - font-size: inherit !important; -} - -.footnote_container_prepare > p > span:last-child a, -.footnote_reference_container_collapse_button a { - text-decoration: none !important; -} - -/* -table -*/ - -.footnote-reference-container, -.footnotes_table { - width: 100%; - border: none; -} - -/** - * Footnotes list. - * - * - Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. - * - * @since 2.0.0 - * @reporter @ragonesi - * @link https://wordpress.org/support/topic/thin-box-around-notes-in-reference-container/ - * - * - Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. - * - * @since 2.0.1 - * @reporter @ragonesi - * @link https://wordpress.org/support/topic/box-around-c-references-container/ - * - * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. - * - Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. - * - * @since 2.5.8 - * @reporter @arahmanshaalan - * @link https://wordpress.org/support/topic/right-to-left-text-problem/ - */ - -.footnote_plugin_index, -.footnote_plugin_index_combi, -.footnote_plugin_symbol, -.footnote_plugin_text { - border: none !important; - text-align: start !important; - vertical-align: top !important; - padding: 5px 6px 10px 0 !important; -} - -html[dir="rtl"] .footnote_plugin_index, -html[dir="rtl"] .footnote_plugin_index_combi, -html[dir="rtl"] .footnote_plugin_symbol, -html[dir="rtl"] .footnote_plugin_text { - padding: 5px 0 10px 6px !important; -} - -.footnote_backlink, -.footnote_backlink:link, -.footnote_plugin_link, -.footnote_plugin_link:link, -.main-content .footnote_backlink, -.main-content .footnote_backlink:link, -.main-content .footnote_plugin_link, -.main-content .footnote_plugin_link:link { - text-decoration: none !important; - border-bottom: none !important; -} - -.footnote_backlink, -.footnote_plugin_link { - white-space: nowrap; -} - -.pointer, -.footnote_index, -.footnote_backlink { - cursor: pointer; -} - -/* -These rules when enabled cause the backlink to take an overline -when hovered in some themes, not in others: -.footnote_plugin_index:hover, -.footnote_plugin_index_combi:hover, -.footnote_plugin_index.pointer:hover, -.footnote_plugin_index_combi.pointer:hover, -*/ - -.footnote_backlink:hover, -.footnote_plugin_link:hover, -.footnote_plugin_text a:hover { - text-decoration: unset; - text-decoration: underline; /*deprioritized to ease customization*/ -} - -.footnote_plugin_text { - width: unset; /*unset width of text column to fix site issues*/ -} - -/* -These rules are just defaults preventing the table from filling the width. -They are not very effective by lack of table-layout: fixed; -since 2.1.4 settings are optionally available, with table-layout: fixed; - -By default, the backlink column is auto-expanding to fit widest. -Not using 'max-content' as that causes no-wrap and overflows. -These are overridden if settings are enabled. -*/ - -.footnote_plugin_index, -.footnote_plugin_index_combi { - max-width: 100px; - width: 2.5em; -} - -/* -Responsive -*/ - -@media only screen and (max-width: 768px) { - - .footnote_plugin_index, - .footnote_plugin_index_combi { - max-width: 80px; - } -} - - -/**************************************************************** -Footnotes printing style rules - -Printing a table, browsers tend to avoid page breaks inside, -but it takes a wrapper to avoid a page break before the table -just after the reference container headline. - -UI elements (expand/collapse button, backlink arrows) are hidden. - -Link color set to inherit, so referrers/numbers are not grayed out. - -@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report -@see - */ - -.footnotes_reference_container { - page-break-inside: avoid; -} - -@media print { - - .footnote_tooltip, - .footnote_reference_container_collapse_button, - .footnote_index_arrow { - display: none; - } - - .footnote_plugin_tooltip_text { - color: inherit; - } - - .footnote_plugin_index a, - .footnote_plugin_index_combi a { - color: inherit; - text-decoration: none !important; - } - - /* Edit button in WP2020 (added as a service) */ - div.post-meta-edit-link-wrapper { - display: none; - } -} - -/** - * MCI Footnotes logo - * - * The classes with 'heading' fixing display in dashboard - * have all their rules moved to settings.css so as to alleviate - * the common stylesheet. Still these rules are only used if the - * Footnotes ad link logo is present in the page footer per user - * dashboard setting. Making these rules conditional like those - * pertaining to tooltips, either jQuery or alternative, would - * double the number of united minified stylesheets shipped with - * the plugin. Hence these are present by default at the bottom. - * - * @see class/config.php - * @see css/settings.css - */ - -.footnotes_logo, -.footnotes_logo:hover { - text-decoration: none; - font-weight: normal; -} - -.footnotes_logo_part1 { - color: #2bb975; -} - -.footnotes_logo_part2 { - color: #545f5a; -} +/* + * .footnote_plugin_tooltip_text = inner + * .footnote_tooltip = inner + */ + +.footnote_referrer, +.footnote_referrer:link, +.footnote_referrer:hover, +.footnote_referrer > a, +.footnote_referrer > a:link, +.footnote_referrer > a:hover, +.footnote_plugin_tooltip_text, +.footnote_plugin_tooltip_text:hover, +.main-content .footnote_referrer, +.main-content .footnote_referrer:link, +.main-content .footnote_referrer:hover, +.main-content .footnote_referrer > a, +.main-content .footnote_referrer > a:link, +.main-content .footnote_referrer > a:hover, +.main-content .footnote_plugin_tooltip_text, +.main-content .footnote_plugin_tooltip_text:hover { + text-decoration: none !important; + border-bottom: none !important; + box-shadow: none !important; +} + +/** + * Footnote referrer (not “tooltip text”) + * + * - Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. + * + * @since 2.1.1 + * @reporter @cwbayer + * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + * + * - Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. + * + * @since 2.5.4 + * @reporter @wisenilesh + * @link https://wordpress.org/support/topic/footnotes-not-working-properly-inside-the-tables-of-tablepress-plugin/ + */ + +.footnote_plugin_tooltip_text { + line-height: 0; + position: relative !important; + cursor: pointer; +} + + +/***************************************************** +Footnote reference container + +Templates: +templates/public/reference-container.html +templates/public/reference-container-body.html +templates/public/reference-container-combi.html +templates/public/reference-container-switch.html +templates/public/reference-container-3column.html + +Optional responsive basic page layout support +stylesheets: +css/layout-reference-container.css +css/layout-main-content.css +css/layout-page-content.css + +Classes: +.footnotes_reference_container = enclosing
                                                                                                                                                                      +.footnote_container_prepare = label
                                                                                                                                                                      +.footnote_reference_container_label = +.footnote_reference_container_collapse_button = sibling +.footnote-reference-container = misleading and inconsistent; alias: +.footnotes_table = +.footnotes_plugin_reference_row = +.footnote_plugin_index_combi = first
                                                                                                                                                                      if identical footnotes are combined +.footnote_plugin_index = first if not +.footnote_index = or in first in 3-column table +.footnote_plugin_symbol = second in 3-column table +.footnote_plugin_link = or (identical footnotes not combined) +.footnote_backlink = or +.footnote_index_arrow = nested , symbol only +.footnote_plugin_text = second , or third in 3-column table +*/ + +.footnotes_reference_container { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/** + * Reference container label. + * + * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. + * + * @since 2.5.8 + * @reporter @arahmanshaalan + * @link https://wordpress.org/support/topic/right-to-left-text-problem/ + */ + +.footnote_container_prepare { + display: block !important; + padding-top: 24px !important; +} + +.footnote_container_prepare > p { + line-height: 1.3 !important; + margin-top: 1em !important; + margin-bottom: 0.25em !important; + padding: 0 !important; + font-weight: normal !important; + /* bottom border optional since 2.2.5 */ + display: block !important; + -webkit-margin-before: 0.83em !important; + -webkit-margin-after: 0.83em !important; + -webkit-margin-start: 0px !important; + -webkit-margin-end: 0px !important; + text-align: start !important; + vertical-align: middle; +} + +.footnote_container_prepare > p > span:first-child, + .footnote_container_prepare > p > span:nth-child(3) { + text-align: start !important; + font-size: 1.5em !important; +} + +/* +collapse button +fully clickable, not sign only +*/ + +.footnote_reference_container_collapse_button { + cursor: pointer; + padding: 0 0.5em; + font-size: 1.3em !important; + vertical-align: 2px; + text-decoration: none !important; +} + +h2 > .footnote_reference_container_collapse_button, +h3 > .footnote_reference_container_collapse_button, +h4 > .footnote_reference_container_collapse_button, +h5 > .footnote_reference_container_collapse_button, +h6 > .footnote_reference_container_collapse_button { + font-size: inherit !important; +} + +.footnote_container_prepare > p > span:last-child a, +.footnote_reference_container_collapse_button a { + text-decoration: none !important; +} + +/* +table +*/ + +.footnote-reference-container, +.footnotes_table { + width: 100%; + border: none; +} + +/** + * Footnotes list. + * + * - Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. + * + * @since 2.0.0 + * @reporter @ragonesi + * @link https://wordpress.org/support/topic/thin-box-around-notes-in-reference-container/ + * + * - Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. + * + * @since 2.0.1 + * @reporter @ragonesi + * @link https://wordpress.org/support/topic/box-around-c-references-container/ + * + * - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. + * - Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. + * + * @since 2.5.8 + * @reporter @arahmanshaalan + * @link https://wordpress.org/support/topic/right-to-left-text-problem/ + */ + +.footnote_plugin_index, +.footnote_plugin_index_combi, +.footnote_plugin_symbol, +.footnote_plugin_text { + border: none !important; + text-align: start !important; + vertical-align: top !important; + padding: 5px 6px 10px 0 !important; +} + +html[dir="rtl"] .footnote_plugin_index, +html[dir="rtl"] .footnote_plugin_index_combi, +html[dir="rtl"] .footnote_plugin_symbol, +html[dir="rtl"] .footnote_plugin_text { + padding: 5px 0 10px 6px !important; +} + +.footnote_backlink, +.footnote_backlink:link, +.footnote_plugin_link, +.footnote_plugin_link:link, +.main-content .footnote_backlink, +.main-content .footnote_backlink:link, +.main-content .footnote_plugin_link, +.main-content .footnote_plugin_link:link { + text-decoration: none !important; + border-bottom: none !important; +} + +.footnote_backlink, +.footnote_plugin_link { + white-space: nowrap; +} + +.pointer, +.footnote_index, +.footnote_backlink { + cursor: pointer; +} + +/* +These rules when enabled cause the backlink to take an overline +when hovered in some themes, not in others: +.footnote_plugin_index:hover, +.footnote_plugin_index_combi:hover, +.footnote_plugin_index.pointer:hover, +.footnote_plugin_index_combi.pointer:hover, +*/ + +.footnote_backlink:hover, +.footnote_plugin_link:hover, +.footnote_plugin_text a:hover { + text-decoration: unset; + text-decoration: underline; /*deprioritized to ease customization*/ +} + +.footnote_plugin_text { + width: unset; /*unset width of text column to fix site issues*/ +} + +/* +These rules are just defaults preventing the table from filling the width. +They are not very effective by lack of table-layout: fixed; +since 2.1.4 settings are optionally available, with table-layout: fixed; + +By default, the backlink column is auto-expanding to fit widest. +Not using 'max-content' as that causes no-wrap and overflows. +These are overridden if settings are enabled. +*/ + +.footnote_plugin_index, +.footnote_plugin_index_combi { + max-width: 100px; + width: 2.5em; +} + +/* +Responsive +*/ + +@media only screen and (max-width: 768px) { + + .footnote_plugin_index, + .footnote_plugin_index_combi { + max-width: 80px; + } +} + + +/**************************************************************** +Footnotes printing style rules + +Printing a table, browsers tend to avoid page breaks inside, +but it takes a wrapper to avoid a page break before the table +just after the reference container headline. + +UI elements (expand/collapse button, backlink arrows) are hidden. + +Link color set to inherit, so referrers/numbers are not grayed out. + +@since 2.0.0 Tooltips: fix bug displaying content inline when page is printed, thanks to @gernsheim bug report +@see + */ + +.footnotes_reference_container { + page-break-inside: avoid; +} + +@media print { + + .footnote_tooltip, + .footnote_reference_container_collapse_button, + .footnote_index_arrow { + display: none; + } + + .footnote_plugin_tooltip_text { + color: inherit; + } + + .footnote_plugin_index a, + .footnote_plugin_index_combi a { + color: inherit; + text-decoration: none !important; + } + + /* Edit button in WP2020 (added as a service) */ + div.post-meta-edit-link-wrapper { + display: none; + } +} + +/** + * MCI Footnotes logo + * + * The classes with 'heading' fixing display in dashboard + * have all their rules moved to settings.css so as to alleviate + * the common stylesheet. Still these rules are only used if the + * Footnotes ad link logo is present in the page footer per user + * dashboard setting. Making these rules conditional like those + * pertaining to tooltips, either jQuery or alternative, would + * double the number of united minified stylesheets shipped with + * the plugin. Hence these are present by default at the bottom. + * + * @see class/config.php + * @see css/settings.css + */ + +.footnotes_logo, +.footnotes_logo:hover { + text-decoration: none; + font-weight: normal; +} + +.footnotes_logo_part1 { + color: #2bb975; +} + +.footnotes_logo_part2 { + color: #545f5a; +} diff --git a/css/dev-tooltips-alternative.css b/css/dev-tooltips-alternative.css index e22944a..d12e639 100644 --- a/css/dev-tooltips-alternative.css +++ b/css/dev-tooltips-alternative.css @@ -1,63 +1,63 @@ -/* -*/ -/*input[type=text], input[type=password], textarea, select*/ -#footnote_inputfield_readon_label, -#footnote_inputfield_references_label, -#footnote_inputfield_love { - padding-left: 8px !important; - padding-right: 8px !important; - width: 80% !important; -} - -#footnote_inputfield_reference_container_place { - width: 310px; -} - -#footnote_inputfield_counter_style, -#footnotes_inputfield_page_layout_support { - width: 505px; -} - -#footnote_inputfield_placeholder_start, -#footnote_inputfield_placeholder_end, -#footnote_inputfield_custom_mouse_over_box_excerpt_length { - width: 180px; -} -#footnote_inputfield_placeholder_start_user_defined, -#footnote_inputfield_placeholder_end_user_defined { - width: 320px; -} - -#footnote_inputfield_combine_identical, -#footnotes_inputfield_scroll_offset, -#footnotes_inputfield_scroll_duration, -#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, -#footnote_inputfield_custom_mouse_over_box_offset_x, -#footnote_inputfield_custom_mouse_over_box_offset_y, -#footnote_inputfield_custom_mouse_over_box_max_width, -#footnotes_inputfield_alternative_mouse_over_box_offset_x, -#footnotes_inputfield_alternative_mouse_over_box_offset_y, -#footnotes_inputfield_alternative_mouse_over_box_width, -#footnotes_inputfield_mouse_over_box_fade_in_delay, -#footnotes_inputfield_mouse_over_box_fade_in_duration, -#footnotes_inputfield_mouse_over_box_fade_out_delay, -#footnotes_inputfield_mouse_over_box_fade_out_duration, -#footnote_inputfield_custom_mouse_over_box_border_width, -#footnote_inputfield_custom_mouse_over_box_border_radius { - width: 80px; -} - -#footnote_inputfield_custom_hyperlink_symbol, -#footnotes_inputfield_backlinks_terminator_option, -#footnotes_inputfield_backlinks_separator_option { - width: 230px; -} - -#footnotes_inputfield_reference_container_top_margin, -#footnotes_inputfield_reference_container_bottom_margin, -#footnotes_inputfield_backlinks_column_width_scalar, -#footnotes_inputfield_backlinks_column_max_width_scalar, -#footnotes_inputfield_mouse_over_box_font_size_scalar { - width: 85px; -} - -#footnotes_inputfield_backlinks_column_width_unit, -#footnotes_inputfield_backlinks_column_max_width_unit, -#footnotes_inputfield_mouse_over_box_font_size_unit { - width: 140px; -} - -/************************************************************ -Headings and labels -*/ - -label { - display: inline-block; -} - -.postbox > h3 { - height: 32px !important; - line-height: 32px !important; -} - -.postbox > h3 > span { - padding: 0 10px; -} - -.postbox > .inside > table { - border: none !important; -} - -.postbox > .inside >table > tbody > tr > td:first-child { - width: 15% !important; - font-weight: bold !important; -} - -.footnote_placeholder_box_container { - text-align: center !important; -} - -span.footnote_highlight_placeholder { - font-weight: bold !important; - padding: 0 8px !important; -} - -.footnote_placeholder_box_example { - border: 2px solid #2bb975 !important; - border-radius: 4px !important; - padding: 16px 0 !important; - width: 50% !important; - display: block !important; - margin: 20px auto !important; - text-align: center !important; -} - -/************************************************************ -Special table layout - -Hooks and priority levels: -initialized from style attributes in templates -IE doesn’t support nth child, but these are not critical -*/ -.expert_lookup tr th:first-child, -.expert_lookup tr td:first-child { - width: 170px !important; -} -.expert_lookup tr th:nth-child(2), -.expert_lookup tr td:nth-child(2) { - width: 65px !important; -} -.expert_lookup tr th:nth-child(3), -.expert_lookup tr td:nth-child(3) { - width: 200px !important; -} -.expert_lookup tr td:nth-child(3) input { - width: 190px; -} -.expert_lookup tr th:last-child, -.expert_lookup tr td:last-child { - white-space: nowrap; -} - -/* -Custom CSS - -The number of CSS classes recommended for customization -significantly increased from 4 to 18 as of v2.4.0. - -Localized notices are dropped to ease translators’ task. -CSS classes are listed directly in the template -templates/dashboard/customize-css.html - -For better maintainability and readability of the source -list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: - - -The textarea has monospace font, but no other features -helping edit CSS, like tab support and syntactic colors. -*/ -#customize_css_new tr td:first-child { - width: 38% !important; - font-weight: normal !important; -} -.customize_css_new tr td:first-child span:first-child { - font-weight: bold !important; -} -.customize_css_new .list { - padding-top: 10px; -} -.customize_css_new .list p { - font-family: monospace; - padding: 0 10px; - text-indent: -10px; - margin: .5em 0; -} - -#footnote_inputfield_custom_css_new { - height: 500px; -} -#footnote_inputfield_custom_css, -#footnote_inputfield_custom_css_new { - width: 96%; - resize: both; - overflow: scroll; - font-family: monospace; -} - -/************************************************************ -Notices - -These spans were previously formatted using the em element. -But the intended semantics was not emphasis. -In locales using boldface to emphasize, the effect is the -exact opposite of the intention. - -So we must use spans with explicit italic font style. -Scripts not featuring italic fonts fall back to normal, -and that is just fine, as italic is only needed here for -scripts that do have italic, and failing to use it would -look weird. - -since 2.1.4 -*/ -.footnotes_notice { - font-style: italic; - display: inline-block; - text-align: end; -} - -/************************************************************ -Descriptions - -padded div above or below a settings table - -Use case: more extensive information not fitting into a brief -notice after the end of the settings box. -*/ -.footnotes_description { - padding: 0 4%; -} -.footnotes_description p { - font-size: 1.06em; - font-style: italic; -} +/* +*/ +/*input[type=text], input[type=password], textarea, select*/ +#footnote_inputfield_readon_label, +#footnote_inputfield_references_label, +#footnote_inputfield_love { + padding-left: 8px !important; + padding-right: 8px !important; + width: 80% !important; +} + +#footnote_inputfield_reference_container_place { + width: 310px; +} + +#footnote_inputfield_counter_style, +#footnotes_inputfield_page_layout_support { + width: 505px; +} + +#footnote_inputfield_placeholder_start, +#footnote_inputfield_placeholder_end, +#footnote_inputfield_custom_mouse_over_box_excerpt_length { + width: 180px; +} +#footnote_inputfield_placeholder_start_user_defined, +#footnote_inputfield_placeholder_end_user_defined { + width: 320px; +} + +#footnote_inputfield_combine_identical, +#footnotes_inputfield_scroll_offset, +#footnotes_inputfield_scroll_duration, +#footnote_inputfield_custom_mouse_over_box_excerpt_enabled, +#footnote_inputfield_custom_mouse_over_box_offset_x, +#footnote_inputfield_custom_mouse_over_box_offset_y, +#footnote_inputfield_custom_mouse_over_box_max_width, +#footnotes_inputfield_alternative_mouse_over_box_offset_x, +#footnotes_inputfield_alternative_mouse_over_box_offset_y, +#footnotes_inputfield_alternative_mouse_over_box_width, +#footnotes_inputfield_mouse_over_box_fade_in_delay, +#footnotes_inputfield_mouse_over_box_fade_in_duration, +#footnotes_inputfield_mouse_over_box_fade_out_delay, +#footnotes_inputfield_mouse_over_box_fade_out_duration, +#footnote_inputfield_custom_mouse_over_box_border_width, +#footnote_inputfield_custom_mouse_over_box_border_radius { + width: 80px; +} + +#footnote_inputfield_custom_hyperlink_symbol, +#footnotes_inputfield_backlinks_terminator_option, +#footnotes_inputfield_backlinks_separator_option { + width: 230px; +} + +#footnotes_inputfield_reference_container_top_margin, +#footnotes_inputfield_reference_container_bottom_margin, +#footnotes_inputfield_backlinks_column_width_scalar, +#footnotes_inputfield_backlinks_column_max_width_scalar, +#footnotes_inputfield_mouse_over_box_font_size_scalar { + width: 85px; +} + +#footnotes_inputfield_backlinks_column_width_unit, +#footnotes_inputfield_backlinks_column_max_width_unit, +#footnotes_inputfield_mouse_over_box_font_size_unit { + width: 140px; +} + +/************************************************************ +Headings and labels +*/ + +label { + display: inline-block; +} + +.postbox > h3 { + height: 32px !important; + line-height: 32px !important; +} + +.postbox > h3 > span { + padding: 0 10px; +} + +.postbox > .inside > table { + border: none !important; +} + +.postbox > .inside >table > tbody > tr > td:first-child { + width: 15% !important; + font-weight: bold !important; +} + +.footnote_placeholder_box_container { + text-align: center !important; +} + +span.footnote_highlight_placeholder { + font-weight: bold !important; + padding: 0 8px !important; +} + +.footnote_placeholder_box_example { + border: 2px solid #2bb975 !important; + border-radius: 4px !important; + padding: 16px 0 !important; + width: 50% !important; + display: block !important; + margin: 20px auto !important; + text-align: center !important; +} + +/************************************************************ +Special table layout + +Hooks and priority levels: +initialized from style attributes in templates +IE doesn’t support nth child, but these are not critical +*/ +.expert_lookup tr th:first-child, +.expert_lookup tr td:first-child { + width: 170px !important; +} +.expert_lookup tr th:nth-child(2), +.expert_lookup tr td:nth-child(2) { + width: 65px !important; +} +.expert_lookup tr th:nth-child(3), +.expert_lookup tr td:nth-child(3) { + width: 200px !important; +} +.expert_lookup tr td:nth-child(3) input { + width: 190px; +} +.expert_lookup tr th:last-child, +.expert_lookup tr td:last-child { + white-space: nowrap; +} + +/* +Custom CSS + +The number of CSS classes recommended for customization +significantly increased from 4 to 18 as of v2.4.0. + +Localized notices are dropped to ease translators’ task. +CSS classes are listed directly in the template +templates/dashboard/customize-css.html + +For better maintainability and readability of the source +list, the

                                                                                                                                                                      end tags are omitted per HTML5 standard: + + +The textarea has monospace font, but no other features +helping edit CSS, like tab support and syntactic colors. +*/ +#customize_css_new tr td:first-child { + width: 38% !important; + font-weight: normal !important; +} +.customize_css_new tr td:first-child span:first-child { + font-weight: bold !important; +} +.customize_css_new .list { + padding-top: 10px; +} +.customize_css_new .list p { + font-family: monospace; + padding: 0 10px; + text-indent: -10px; + margin: .5em 0; +} + +#footnote_inputfield_custom_css_new { + height: 500px; +} +#footnote_inputfield_custom_css, +#footnote_inputfield_custom_css_new { + width: 96%; + resize: both; + overflow: scroll; + font-family: monospace; +} + +/************************************************************ +Notices + +These spans were previously formatted using the em element. +But the intended semantics was not emphasis. +In locales using boldface to emphasize, the effect is the +exact opposite of the intention. + +So we must use spans with explicit italic font style. +Scripts not featuring italic fonts fall back to normal, +and that is just fine, as italic is only needed here for +scripts that do have italic, and failing to use it would +look weird. + +since 2.1.4 +*/ +.footnotes_notice { + font-style: italic; + display: inline-block; + text-align: end; +} + +/************************************************************ +Descriptions + +padded div above or below a settings table + +Use case: more extensive information not fitting into a brief +notice after the end of the settings box. +*/ +.footnotes_description { + padding: 0 4%; +} +.footnotes_description p { + font-size: 1.06em; + font-style: italic; +} diff --git a/readme.txt b/readme.txt index 2ab1d48..e44f668 100644 --- a/readme.txt +++ b/readme.txt @@ -1,629 +1,629 @@ -=== footnotes === -Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges -Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing -Requires at least: 3.9 -Tested up to: 5.6.1 -Requires PHP: 5.6 -Stable Tag: 2.5.8 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html - -== Description == - -Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ -Cheers for the review, folks! - -https://www.youtube.com/watch?v=HzHaMAAJwbI - -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. - -= Main Features = -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. - -= Example Usage = -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -= Where to get footnotes? = -The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). - -= Support = -Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). - -Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). - -= Development = -Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). - -== Frequently Asked Questions == - -= Is your Plugin a copy of footnotes x? = - -No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. - -= Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = - -1. For anyone interested in converting from the FD Footnotes plugin: -Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 -2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! - -== Installation == -- Visit your WordPress Admin area -- Navigate to `Plugins\Add` -- Search for **footnotes** and find this Plugin among others -- Install the latest version of the **footnotes** Plugin from WordPress.org -- Activate the Plugin - -== Screenshots == -1. Find the footnotes plugin settings in the newly added "ManFisher" Menu -2. Settings for the *References Container* -3. Settings for **footnotes** styling -4. Settings for **footnotes** love -5. Other Settings -6. The HowTo section in the **footnotes** settings -7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? - -== Changelog == - -= 2.5.8 = -- Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. -- Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. - -= 2.5.7 = -- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. - -= 2.5.6 = -- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. -- Bugfix: Alternative tooltips: shrink width to short content. -- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. - -= 2.5.5 = -- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. -- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. -- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. -- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. -- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. -- Update: Dashboard: decrease font size and padding of the descriptions. - -= 2.5.4 = -- 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. -- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. -- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. -- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. -- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. -- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. -- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. -- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. -- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. -- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. -- Bugfix: Editor button: Classic Editor text mode: correct label to singular. -- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. - -= 2.5.3 = -- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. - -= 2.5.2 = -- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. -- Bugfix: Localization: plugin language file name changes effective in version control system. - -= 2.5.1 = -- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. -- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. -- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. -- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. -- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. -- Update: Readme/documentation: add new contributors in the file header’s Contributors field. -- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. - -= 2.5.0 = -- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. -- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. -- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. -- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. -- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. -- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. - -= 2.4.0 = -- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. -- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. -- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. -- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. -- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. -- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. -- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. -- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. - -= 2.3.0 = -- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. -- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. -- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. -- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. -- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. -- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. -- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. -- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. -- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. - -= 2.2.10 = -- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. -- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. -- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. - -= 2.2.9 = -- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. -- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. -- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. -- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. - -= 2.2.8 = -- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. - -= 2.2.7 = -- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. - -= 2.2.6 = -- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. -- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. - -= 2.2.5 = -- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. -- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. -- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. -- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. -- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). -- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). -- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. - -= 2.2.4 = -- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. -- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. - -= 2.2.3 = -- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. - -= 2.2.2 = -- Bugfix: Dashboard: Link element setting only under General settings > Reference container. -- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. -- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. - -= 2.2.1 = -- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. - -= 2.2.0 = -- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. -- Adding: Start/end short codes: more predefined options. -- Adding: Numbering styles: lowercase Roman numerals support. -- Update: Priority levels: update the notice in the dashboard Priority tab. -- Update: Dashboard: Tooltip settings: group into 3 thematic containers. -- Update: Dashboard: Main settings: group into 3 specific containers. -- Update: Dashboard: move link element option to the Referrers options. -- Update: Dashboard: move URL wrap option to the Reference container options. -- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. -- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. -- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. -- Bugfix: Localization: correct arguments for plugin textdomain load function. -- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. -- Adding: Footnotes mention in the footer: more options. - -= 2.1.6 = -- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. -- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. -- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. -- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. -- Update: Dashboard: reorder tabs and update tab labels. -- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. -- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. -- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. - -= 2.1.5 = -- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. - -= 2.1.4 = -- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. -- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. -- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. -- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. -- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). -- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. -- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. -- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. -- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. -- Bugfix: Referrers: Styling: disable hover underline. -- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. -- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. -- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. -- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. -- Bugfix: Reference container: Label: delete overflow hidden rule. -- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. -- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. -- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. -- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. -- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. -- Update: Dashboard: Notices: use explicit italic style. -- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. -- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. -- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. - -= 2.1.3 = -- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. -- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. -- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. -- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. -- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. -- Bugfix: Styling: raise Custom CSS priority to override settings. -- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. - -= 2.1.2 = -- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. -- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. -- Update: Dashboard: WordPress documentation URLs of the hooks. -- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. - -= 2.1.1 = -- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. -- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. -- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. -- Bugfix: Libraries: jQuery Tools: complete minification. -- Bugfix: Libraries: make script loads depend on tooltip implementation option. -- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. -- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. -- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. -- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. -- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. -- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. -- Bugfix: Reference container: Table rows: fix top and bottom padding. -- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. -- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. -- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. -- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. -- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. -- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. - -= 2.1.0 = -- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. -- Bugfix: Referrers: disable bottom border for theme compatibility. -- Update: Accessibility: add 'speaker-mute' class to reference container. -- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. -- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. - -= 2.0.8 = -- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). - -= 2.0.7 = -- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. -- Update: Set priority level back to 10 assuming it is unproblematic. -- Update: Added backwards compatible support for legacy arrow and index placeholders in template. -- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. - -= 2.0.6 = -- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. -- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. -- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. -- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. -- Bugfix: Reference container: IDs: slightly increased left padding. -- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. -- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). -- Bugfix: Reference container: Collapse button fully clickable, not sign only. -- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. -- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). -- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). -- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). -- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. - -= 2.0.5 = -- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. -- Bugfix: Reference container: unset width of text column to fix site issues. -- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. -- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. -- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). - -= 2.0.4 = -- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. -- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. -- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. -- Bugfix: Reference container: remove inconvenient left/right cellpadding. -- Bugfix: Tooltips: improve layout with inherited font size by lower line height. -- Bugfix: Tooltips: 'Continue reading' button: disable default underline. -- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. -- Bugfix: Dashboard: fix display of two headings containing the logo. - -= 2.0.3 = -- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. -- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. -- Bugfix: Fragment IDs: Prepended post ID to footnote number. -- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. -- Bugfix: Print style: prevent a page break just after the reference container label. -- Bugfix: Print style: Hide reference collapse button. -- Update: Reference container: Headline: remove padding before reference container label. -- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. - -= 2.0.2 = -- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. -- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. -- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. -- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. - -= 2.0.1 = -- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. -- Update: Translations: revised fr_FR. - -= 2.0.0 = -- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: -- Update: **symbol for backlinks** removed -- Update: hyperlink moved to the reference number -- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. -- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. -- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. -- Bugfix: footnote links script independent -- Bugfix: Get the “Continue reading” link to work in the mouse-over box -- Bugfix: Debug printed posts and pages -- Bugfix: Display of combined identical notes -- Update: Adjusted scrolling time and offset -- Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. -- Bugfix: Mouse-over box display timing -- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES - -= 1.6.6 = -- Beginning of translation to French - -= 1.6.5 = -- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. -- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. -- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text -- Bugfix: Dashboard: fix error on demo under the Preview tab. - -= 1.6.4 = -- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. -- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence - -= 1.6.3 = -- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress - -= 1.6.2 = -- Update: Changed the Preview tab -- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled - -= 1.6.1 = -- Update: Translations -- Bugfix: Move to anchor - -= 1.6.0 = -- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) -- Adding: Setting to customize the mouse-over box shadow -- Adding: Translation: United States -- Adding: Translation: Austria -- Adding: Translation: Spanish (many thanks to Pablo L.) -- Update: Translations (de_DE and en_GB) -- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) -- Update: ManFisher note styling -- Update: Tested with latest nightly build of WordPress 4.1 -- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed - -= 1.5.7 = -- Adding: Setting to define the positioning of the mouse-over box -- Adding: Setting to define an offset for the mouse-over box (precise positioning) -- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) -- Bugfix: Rating calculation for the 'other plugins' list - -= 1.5.6 = -- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. -- Adding: .pot file to enable Translations for everybody -- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) -- Update: Translation file names -- Update: Translation EN and DE -- Update: Styling of the superscript (need to check custom CSS code for the superscript) -- Update: Description of CSS classes for the 'customize CSS' text area -- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) -- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting -- Bugfix: Enable multiple WP_Post objects for the_post hook - -= 1.5.5 = -- Adding: Expert mode setting -- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) -- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes -- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) -- Bugfix: Activation, Deactivation and Uninstall hook class name -- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin -- Bugfix: Display the Reference container in the Footer correctly - -= 1.5.4 = -- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) -- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) -- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) -- Update: Receiving list of other Plugins from the Developer Team from an external server -- Update: Translations (EN and DE) -- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) -- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) -- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database - -= 1.5.3 = -- Adding: Developer's homepage to the 'other Plugins' list -- Update: Smoothy scroll to an anchor using Javascript -- Bugfix: Set the vertical align for each cell in the Reference container to TOP - -= 1.5.2 = -- Adding: Setting to enable/disable the mouse-over box -- Adding: Current WordPress Theme to the Diagnostics sub page -- Adding: ManFisher note in the "other Plugins" sub page -- Update: Removed unnecessary hidden inputs from the Settings page -- Update: Merged public CSS files to reduce the output and improve the performance -- Update: Translations (EN and DE) -- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting -- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) -- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' - -= 1.5.1 = -- Bugfix: Broken Settings link in the Plugin listing -- Bugfix: Translation overhaul for German - -= 1.5.0 = -- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" -- Adding: Sub Page to list all other Plugins of the Contributors -- Adding: Hyperlink to manfisher.eu in the "other plugins" page -- Update: Refactored the whole source code -- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" -- Bugfix: Line up Footnotes with multiple lines in the Reference container -- Bugfix: Load text domain -- Bugfix: Display the Footnotes button in the plain text editor of posts/pages - -= 1.4.0 = -- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) -- Update: Changed e-Mail support address to the WordPress support forum -- Update: Language EN and DE -- Adding: Tab for Plugin Diagnostics -- Adding: Donate link to the installed Plugin overview page -- Adding: Donate button to the "HowTo" tab - -= 1.3.4 = -- Bugfix: Settings access permission vor sub-sites -- Bugfix: Setting 'combine identical footnotes' working as it should - -= 1.3.3 = -- Update: Changed the Author name from a fictitious entity towards a real registered company -- Update: Changed the Author URI - -= 1.3.2 = -- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) -- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) -- Update: language EN and DE -- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference -- Adding: Setting to enter a user defined hyperlink symbol -- - -= 1.3.1 = -- Bugfix: Allow settings to be empty -- Bugfix: Removed space between the hyperlink and superscript in the footnotes index -- Adding: Setting to customize the text before and after the footnotes index in superscript - -= 1.3.0 = -- Bugfix: Changed tooltip class to be unique -- Bugfix: Changed superscript styling to not manipulate the line height -- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks -- Update: Reformatted code -- Adding: new settings tab for custom CSS settings - -= 1.2.5 = -- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) - -= 1.2.4 = -- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) -- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) -- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) - -= 1.2.3 = -- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) -- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) -- Bugfix: Removed Widget text formatting -- Bugfix: Load default settings value of setting doesn't exist yet (first usage) -- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content -- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) - -= 1.2.2 = -- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) -- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer -- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" -- Bugfix: Replace footnote short code -- Update: Combined buttons for the "collapse/expand" reference container - -= 1.2.1 = -- Bugfix: HowTo example will be displayed correctly if a user defined short code is set - -= 1.2.0 = -- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag -- Feature: Icon for the WYSIWYG-editor button -- Feature: Pre defined footnote short codes -- Experimental: User defined short code for defining footnotes -- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" -- Update: Moved footnotes 'love' settings to a separate container -- Update: Translation for new settings and for the Widget description -- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" - -= 1.1.1 = -- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) -- Update: Setting where the reference container appears on public pages can also be set to the widget area -- Adding: Link to the wordpress.org support page in the plugin main page -- Update: Changed plugin URL from GitHub to WordPress -- Bugfix: Uninstall function to really remove all settings done in the settings page -- Bugfix: Load default settings after plugin is installed -- Update: Translation for support link and new setting option -- Adding: Label to display the user the short code to not display the 'love me' slug - -= 1.1.0 = -- Update: Global styling for the public plugin name -- Update: Easier usage of the public plugin name in translations -- Update: New Layout for the settings page to group similar settings to get a better overview -- Update: Display settings submit button only if there is at least 1 editable setting in the current tab -- Adding: Setting where the reference container appears on public pages (needs some corrections!) -- Bugfix: Displays only one reference container in front of the footer on category pages - -= 1.0.6 = -- Bugfix: Uninstall function to delete all plugin settings -- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above -- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over -- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' - -= 1.0.5 = -- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. -- Update: Plugin description for public directories (WordPress.org and GitHub) -- Feature: the footnotes WordPress Plugin now has its very own CI - - Update: Styling - - Update: Settings to support the styling -- Adding: Inspirational Screenshots for further development -- Adding: Settings screenshot -- Update: i18n fine-tuning - -= 1.0.4 = -- Update: replacing function when footnote is a link (bugfix) -- Footnote hover box remains until cursor leaves footnote or hover box -- Links in the footnote hover box are click able -- Adding: setting to allow footnotes on Summarized Posts -- Adding: setting to tell the world you're using footnotes plugin -- Adding: setting for the counter style of the footnote index - - Arabic Numbers (1, 2, 3, 4, 5, ...) - - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) - - Latin Characters lower-case (a, b, c, d, e, ...) - - Latin Characters upper-case (A, B, C, D, E, ...) - - Roman Numerals (I, II, III, IV, V, ...) -- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it -- Update: translations for the new settings -- Switch back the version numbering scheme to have 3 digits - -= 1.0.3 = -- Adding: setting to use personal starting and ending tag for the footnotes -- Update: translations for the new setting -- Update: reading settings and fallback to default values (bugfix) - -= 1.0.2 = -- Adding: setting to collapse the reference container by default -- Adding: link behind the footnotes to automatically jump to the reference container -- Adding: function to easy output input fields for the settings page -- Update: translation for the new setting - -= 1.0.1 = -- Separated functions in different files for a better overview -- Adding: a version control to each file / class / function / variable -- Adding: layout for the settings menu, settings split in tabs and not a list-view -- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) -- Update: translations for EN and DE -- Changed version number from 3 digits to 2 digits - -= 1.0.0 = -- First development Version of the Plugin - -== Upgrade Notice == -to upgrade our plugin is simple. Just update the plugin within your WordPress installation. -To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future +=== footnotes === +Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges +Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing +Requires at least: 3.9 +Tested up to: 5.6.1 +Requires PHP: 5.6 +Stable Tag: 2.5.8 +License: GPLv3 or later +License URI: http://www.gnu.org/licenses/gpl-3.0.html + +== Description == + +Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +Cheers for the review, folks! + +https://www.youtube.com/watch?v=HzHaMAAJwbI + +**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. + += Main Features = +- Fully customizable **footnotes** start and end shortcodes; +- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; +- Responsive *Reference Container* at the end or positioned by shortcode; +- Display the **footnotes** *Reference Container* inside a Widget; +- Wide choice of numbering styles; +- Freely configurable and optional backlink symbol; +- Configure the **footnotes’** appearance by dashboard settings and Custom CSS style rules; +- Button in both the Visual and the Text editor to add shortcodes around selection. + += Example Usage = +These are a few examples of possible ways to delimit footnotes: + +1. Your awesome text((with an awesome footnote)) +2. Your awesome text[ref]with an awesome footnote[/ref] +3. Your awesome text``with an awesome footnote`` +4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` + += Where to get footnotes? = +The current version is available on the [WordPress.org plugins platform, Footnotes](https://wordpress.org/plugins/footnotes/). + += Support = +Please report feature requests, bugs and other support related questions in the [Footnotes section of WordPress Support Forum](https://wordpress.org/support/plugin/footnotes). + +Speak your mind, unload your burden, bring it up, and feel free to [post your rating and review!](https://wordpress.org/support/plugin/footnotes/reviews/). + += Development = +Development of the plugin is an open process. Latest code is available in the [plugin part of WordPress SVN repository, footnotes/](https://plugins.svn.wordpress.org/footnotes/). + +== Frequently Asked Questions == + += Is your Plugin a copy of footnotes x? = + +No, this Plugin has been written from scratch. Of course some inspirations on how to do or how to not do things were taken from other plugins. + += Your Plugin is awesome! How do I convert my footnotes if I used one of the other footnotes plugins out there? = + +1. For anyone interested in converting from the FD Footnotes plugin: +Visit this swift write-up from a **footnotes** user by the name of **Southwest**: http://wordpress.org/support/topic/how-to-make-this-footnote-style?replies=6#post-5946306 +2. From what we've researched, all other footnotes Plugins use open and close shortcodes, which can be left as is. In the **footnotes** settings menu, you can setup **footnotes** to use the existing (=previously used) shortcodes. Too easy? Yippy Ki-Yey! + +== Installation == +- Visit your WordPress Admin area +- Navigate to `Plugins\Add` +- Search for **footnotes** and find this Plugin among others +- Install the latest version of the **footnotes** Plugin from WordPress.org +- Activate the Plugin + +== Screenshots == +1. Find the footnotes plugin settings in the newly added "ManFisher" Menu +2. Settings for the *References Container* +3. Settings for **footnotes** styling +4. Settings for **footnotes** love +5. Other Settings +6. The HowTo section in the **footnotes** settings +7. Here you can see the **footnotes** Plugin at work. Isn't that plain beautiful? + +== Changelog == + += 2.5.8 = +- Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. +- Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. + += 2.5.7 = +- Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report. + += 2.5.6 = +- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports. +- Bugfix: Alternative tooltips: shrink width to short content. +- Update: Documentation: slightly revise or update the plugin’s welcome page on WordPress.org. + += 2.5.5 = +- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. +- Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. +- Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. +- Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. +- Update: Dashboard: add or edit descriptions to the tooltips and tooltip text delimiter settings and the backlink symbol configuration setting. +- Update: Dashboard: decrease font size and padding of the descriptions. + += 2.5.4 = +- 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. +- Bugfix: Tooltips: fix jQuery positioning bug moving tooltips out of view and affecting (TablePress tables in) some themes, thanks to @wisenilesh bug report. +- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report. +- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. +- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report. +- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report. +- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report. +- Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. +- Update: Tooltips: Excerpt delimiter: add configuration settings in the dashboard. +- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. +- Bugfix: Editor button: Classic Editor text mode: correct label to singular. +- Bugfix: Libraries: jQuery Tools: replace double equals sign discouraged in JavaScript with recommended triple equals sign. + += 2.5.3 = +- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. + += 2.5.2 = +- Update: Tooltips: Excerpt delimiter: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. +- Bugfix: Localization: plugin language file name changes effective in version control system. + += 2.5.1 = +- Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. +- Bugfix: Reference container: click on label expands but also collapses, thanks to @ahmadword bug report. +- Bugfix: Reference container: Label: cursor takes pointer shape, thanks to @ahmadword bug report. +- Bugfix: Dashboard: Custom CSS: mention validity of legacy while visible, thanks to @rkupadhya bug report. +- Bugfix: Dashboard: Custom CSS: make class list column formatting effective again. +- Update: Readme/documentation: add new contributors in the file header’s Contributors field. +- Update: Readme/documentation: update or fix URLs in Download, Support and Development sections. + += 2.5.0 = +- Adding: Templates: Enable template location stack, thanks to @misfist code contribution. +- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution. +- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report. +- Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report. +- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting. +- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor. + += 2.4.0 = +- Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. +- Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. +- Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report. +- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback. +- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. +- Bugfix: Footnote delimiters: Dashboard: remove new option involving HTML comment tags only usable in source mode. +- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border. +- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'. + += 2.3.0 = +- Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution. +- Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. +- Bugfix: Referrers and backlinks: more effectively remove unwanted underline by disabling box shadow used instead of bottom border, thanks to @klusik feedback. +- Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. +- Update: Dashboard: Priority level: rename tab as 'Scope and priority', to account for the new alternative depending on widget_text hook activation. +- Bugfix: Referrers and tooltips: correct scope of the line height fix to only affect the referrers, not the tooltip content. +- Bugfix: Referrers: extend clickable area to the full line height in sync with current pointer shape. +- Bugfix: Referrers: extend scope of the underline inhibition to be more comprehensive and consistent. +- Bugfix: Reference container: Basic responsive page layout: edits to one of the optional stylesheets. + += 2.2.10 = +- Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report. +- Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes. +- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs. + += 2.2.9 = +- Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report. +- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab. +- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names. +- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference. + += 2.2.8 = +- Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. + += 2.2.7 = +- Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. + += 2.2.6 = +- Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. +- Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. + += 2.2.5 = +- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio design contribution. +- Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. +- Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. +- Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. +- Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). +- Update: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips). +- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency. + += 2.2.4 = +- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”. +- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status. + += 2.2.3 = +- Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. + += 2.2.2 = +- Bugfix: Dashboard: Link element setting only under General settings > Reference container. +- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. +- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets. + += 2.2.1 = +- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure. + += 2.2.0 = +- Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. +- Adding: Start/end short codes: more predefined options. +- Adding: Numbering styles: lowercase Roman numerals support. +- Update: Priority levels: update the notice in the dashboard Priority tab. +- Update: Dashboard: Tooltip settings: group into 3 thematic containers. +- Update: Dashboard: Main settings: group into 3 specific containers. +- Update: Dashboard: move link element option to the Referrers options. +- Update: Dashboard: move URL wrap option to the Reference container options. +- Update: Dashboard: group both Custom CSS and priority level settings under the same tab. +- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'. +- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue. +- Bugfix: Localization: correct arguments for plugin textdomain load function. +- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark. +- Adding: Footnotes mention in the footer: more options. + += 2.1.6 = +- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. +- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report. +- Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report. +- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. +- Update: Dashboard: reorder tabs and update tab labels. +- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'. +- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels. +- Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. + += 2.1.5 = +- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. + += 2.1.4 = +- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. +- Bugfix: Scroll duration: make configurable to conform to website content and style requirements. +- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. +- Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. +- Bugfix: Reference container: fix layout by optionally enqueuing additional stylesheet (depends on theme). +- Bugfix: Reference container: fix layout issues by moving backlink column width to settings. +- Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. +- Bugfix: Tooltips: Read-on button: Label: prevent line breaks. +- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution. +- Bugfix: Referrers: Styling: disable hover underline. +- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. +- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. +- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization. +- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators. +- Bugfix: Reference container: Label: delete overflow hidden rule. +- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left. +- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices. +- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording. +- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top. +- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric. +- Update: Dashboard: Notices: use explicit italic style. +- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box, thanks to @nikelaos bug report. +- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard. +- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels. + += 2.1.3 = +- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets. +- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report. +- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy. +- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report. +- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on. +- Bugfix: Styling: raise Custom CSS priority to override settings. +- Bugfix: Styling: Tooltips: raise settings priority to override theme stylesheets. + += 2.1.2 = +- Bugfix: Reference container: Backlinks: no underline on hover cell when combining identicals is on. +- Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. +- Update: Dashboard: WordPress documentation URLs of the hooks. +- Update: Dashboard: feature description for the hooks priority level settings, thanks to @nikelaos bug report. + += 2.1.1 = +- Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. +- Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. +- Update: Libraries: jQuery Tools: redact (comment out) all 6 instances of deprecated function jQuery.browser(), thanks to @bjrnet21 @cconser @vyassuresh @spaceling @widecast @olivlyon @maxident bug reports. +- Bugfix: Libraries: jQuery Tools: complete minification. +- Bugfix: Libraries: make script loads depend on tooltip implementation option. +- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips. +- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. +- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback. +- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility. +- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. +- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. +- Bugfix: Reference container: Table rows: fix top and bottom padding. +- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report. +- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report. +- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. +- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button. +- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report. +- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks. + += 2.1.0 = +- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. +- Bugfix: Referrers: disable bottom border for theme compatibility. +- Update: Accessibility: add 'speaker-mute' class to reference container. +- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles. +- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. + += 2.0.8 = +- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). + += 2.0.7 = +- BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. +- Update: Set priority level back to 10 assuming it is unproblematic. +- Update: Added backwards compatible support for legacy arrow and index placeholders in template. +- Update: Settings defaults adjusted for better and more up-to-date tooltip layout. + += 2.0.6 = +- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution. +- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility. +- Bugfix: Reference container: fix line breaking behavior in footnote number clusters. +- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts. +- Bugfix: Reference container: IDs: slightly increased left padding. +- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US. +- Bugfix: Typesetting: discard the dot after footnote numbers as not localizable (should be optional). +- Bugfix: Reference container: Collapse button fully clickable, not sign only. +- Bugfix: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus. +- Update: Tooltips: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before). +- Update: Tooltips: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before). +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). +- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability. + += 2.0.5 = +- Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. +- Bugfix: Reference container: unset width of text column to fix site issues. +- Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. +- Bugfix: Tooltips: Restore cursor shape 'pointer' over Read-on button after hard link removal. +- Bugfix: Settings stylesheet: unenqueue to fix input boxes on public pages (enqueued for 2.0.4). + += 2.0.4 = +- Update: Restore arrow settings to customize or disable the now prepended arrow symbol. +- Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. +- Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. +- Bugfix: Reference container: remove inconvenient left/right cellpadding. +- Bugfix: Tooltips: improve layout with inherited font size by lower line height. +- Bugfix: Tooltips: 'Continue reading' button: disable default underline. +- Bugfix: Translations: review all locales (en, de, es, fr), synced ref line # with edited code. +- Bugfix: Dashboard: fix display of two headings containing the logo. + += 2.0.3 = +- Bugfix: Reference container: Self-adjusting width of ID column but hidden overflow. +- Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to bug report. +- Bugfix: Fragment IDs: Prepended post ID to footnote number. +- Bugfix: External stylesheets cache busting: add plugin version number argument in enqueuing function call. +- Bugfix: Print style: prevent a page break just after the reference container label. +- Bugfix: Print style: Hide reference collapse button. +- Update: Reference container: Headline: remove padding before reference container label. +- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of setting. + += 2.0.2 = +- Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report. +- Bugfix: Dashboard: Custom CSS: Available selectors: fix display of the last item. +- Bugfix: Referrers and backlinks: restore default link color on screen, set color to inherit in print. +- Bugfix: Referrers: disable text decoration underline by default, enable underline on hover. + += 2.0.1 = +- Bugfix: Reference container: enforce borderless table cells, thanks to @ragonesi bug report. +- Update: Translations: revised fr_FR. + += 2.0.0 = +- Major contributions taken from WordPress user pewgeuges, all details here https://github.com/media-competence-institute/footnotes/blob/master/README.md: +- Update: **symbol for backlinks** removed +- Update: hyperlink moved to the reference number +- Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett @twellve_million bug reports, thanks to @vonpiernik code contribution. +- Update: Libraries: jQuery Tools: add condition whether deprecated function jQuery.browser() exists, thanks to @vonpiernik code contribution. +- Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. +- Bugfix: footnote links script independent +- Bugfix: Get the “Continue reading” link to work in the mouse-over box +- Bugfix: Debug printed posts and pages +- Bugfix: Display of combined identical notes +- Update: Adjusted scrolling time and offset +- Bugfix: Reference container: no borders around footnotes, thanks to @ragonesi bug report. +- Bugfix: Mouse-over box display timing +- Update: Translations: revised de_AT, de_DE, en_GB, en_US, es_ES + += 1.6.6 = +- Beginning of translation to French + += 1.6.5 = +- Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. +- Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. +- Update: The CSS has been modified in order to show the tooltip numbers a little less higher than text +- Bugfix: Dashboard: fix error on demo under the Preview tab. + += 1.6.4 = +- Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. +- Bugfix: Fixed occasional bug where footnote ordering could be out of sequence + += 1.6.3 = +- Bugfix: We were provided a fix by a user named toma. footnotes now works in sub-folder installations of WordPress + += 1.6.2 = +- Update: Changed the Preview tab +- Bugfix: Html tags has been removed in the Reference container when the excerpt mode is enabled + += 1.6.1 = +- Update: Translations +- Bugfix: Move to anchor + += 1.6.0 = +- **IMPORTANT**: Improved performance. You need to Activate the Plugin again. (Settings won't change!) +- Adding: Setting to customize the mouse-over box shadow +- Adding: Translation: United States +- Adding: Translation: Austria +- Adding: Translation: Spanish (many thanks to Pablo L.) +- Update: Translations (de_DE and en_GB) +- Update: Changed Plugins init file name to improve performance (Re-activation of the Plugin is required) +- Update: ManFisher note styling +- Update: Tested with latest nightly build of WordPress 4.1 +- Bugfix: Avoid multiple IDs for footnotes when multiple reference containers are displayed + += 1.5.7 = +- Adding: Setting to define the positioning of the mouse-over box +- Adding: Setting to define an offset for the mouse-over box (precise positioning) +- Bugfix: Target element to move down to the reference container is the footnote index instead of the arrow (possibility to hide the arrow) +- Bugfix: Rating calculation for the 'other plugins' list + += 1.5.6 = +- **IMPORTANT**: We have changed the html tag for the superscript. Please check and update your custom CSS. +- Adding: .pot file to enable Translations for everybody +- Adding: Settings to customize the mouse-over box (color, background color, border, max. width) +- Update: Translation file names +- Update: Translation EN and DE +- Update: Styling of the superscript (need to check custom CSS code for the superscript) +- Update: Description of CSS classes for the 'customize CSS' text area +- Bugfix: Removed 'a' tag around the superscript for Footnotes inside the content to avoid page reloads (empty href attribute) +- Bugfix: Avoid Settings fallback to its default value after submit an empty value for a setting +- Bugfix: Enable multiple WP_Post objects for the_post hook + += 1.5.5 = +- Adding: Expert mode setting +- Adding: Activation and Deactivation of WordPress hooks to look for Footnotes (expert mode) +- Adding: WordPress hooks: 'the_title' and 'widget_title' (default: disabled) to search for Footnote short codes +- Bugfix: Default value for the WordPress hook the_post to be disabled (adds Footnotes twice to the Reference container) +- Bugfix: Activation, Deactivation and Uninstall hook class name +- Bugfix: Add submenu pages only once for each ManFisher WordPress Plugin +- Bugfix: Display the Reference container in the Footer correctly + += 1.5.4 = +- Adding: Setting to enable an excerpt of the Footnotes mouse-over box text (default: disabled) +- Adding: Setting to define the maximum length of the excerpt displayed in the mouse-over box (default: 150 characters) +- Update: Detail information about other Plugins from ManFisher (rating, downloads, last updated, Author name/url) +- Update: Receiving list of other Plugins from the Developer Team from an external server +- Update: Translations (EN and DE) +- Bugfix: Removed hard coded position of the 'ManFisher' main menu page (avoid errors with other Plugins) +- Bugfix: Changed function name (includes.php) to be unique (avoid errors with other Plugins) +- Bugfix: Try to replace each appearance of Footnotes in the current Post object loaded from the WordPress database + += 1.5.3 = +- Adding: Developer's homepage to the 'other Plugins' list +- Update: Smoothy scroll to an anchor using Javascript +- Bugfix: Set the vertical align for each cell in the Reference container to TOP + += 1.5.2 = +- Adding: Setting to enable/disable the mouse-over box +- Adding: Current WordPress Theme to the Diagnostics sub page +- Adding: ManFisher note in the "other Plugins" sub page +- Update: Removed unnecessary hidden inputs from the Settings page +- Update: Merged public CSS files to reduce the output and improve the performance +- Update: Translations (EN and DE) +- Bugfix: Removed the 'trim' function to allow whitespaces at the beginning and end of each setting +- Bugfix: Convert the footnotes short code to HTML special chars when adding them into the page/post editor (visual and text) +- Bugfix: Detailed error messages if other Plugins can't be loaded. Also added empty strings as default values to avoid 'undefined' + += 1.5.1 = +- Bugfix: Broken Settings link in the Plugin listing +- Bugfix: Translation overhaul for German + += 1.5.0 = +- Adding: Grouped the Plugin Settings into a new Menu Page called "ManFisher Plugins" +- Adding: Sub Page to list all other Plugins of the Contributors +- Adding: Hyperlink to manfisher.eu in the "other plugins" page +- Update: Refactored the whole source code +- Update: Moved the Diagnostics Sections to into a new Sub Page called "Diagnostics" +- Bugfix: Line up Footnotes with multiple lines in the Reference container +- Bugfix: Load text domain +- Bugfix: Display the Footnotes button in the plain text editor of posts/pages + += 1.4.0 = +- Feature: WPML Config XML file for easy multi language string translation (WPML String Translation Support File) +- Update: Changed e-Mail support address to the WordPress support forum +- Update: Language EN and DE +- Adding: Tab for Plugin Diagnostics +- Adding: Donate link to the installed Plugin overview page +- Adding: Donate button to the "HowTo" tab + += 1.3.4 = +- Bugfix: Settings access permission vor sub-sites +- Bugfix: Setting 'combine identical footnotes' working as it should + += 1.3.3 = +- Update: Changed the Author name from a fictitious entity towards a real registered company +- Update: Changed the Author URI + += 1.3.2 = +- Bugfix: More security recognizing Footnotes on public pages (e.g. ignoring empty Footnote short codes) +- Bugfix: Clear old Footnotes before lookup new public page (only if no reference container displayed before) +- Update: language EN and DE +- Adding: Setting to customize the hyperlink symbol in der reference container for each footnote reference +- Adding: Setting to enter a user defined hyperlink symbol +- + += 1.3.1 = +- Bugfix: Allow settings to be empty +- Bugfix: Removed space between the hyperlink and superscript in the footnotes index +- Adding: Setting to customize the text before and after the footnotes index in superscript + += 1.3.0 = +- Bugfix: Changed tooltip class to be unique +- Bugfix: Changed superscript styling to not manipulate the line height +- Bugfix: Changed styling of the footnotes text in the reference container to avoid line breaks +- Update: Reformatted code +- Adding: new settings tab for custom CSS settings + += 1.2.5 = +- Bugfix: New styling of the mouse-over box to stay in screen (thanks to Jori, France and Manuel345, undisclosed location) + += 1.2.4 = +- Bugfix: CSS stylesheets will only be added in FootNotes settings page, nowhere else (thanks to Piet Bos, China) +- Bugfix: Styling of the reference container when the footnote text was too long (thanks to Willem Braak, undisclosed location) +- Bugfix: Added a Link to the footnote text in the reference container back to the footnote index in the page content (thanks to Willem Braak, undisclosed location) + += 1.2.3 = +- Bugfix: Removed 'Warning output' of Plugins activation and deactivation function (thanks to Piet Bos, China) +- Bugfix: Added missing meta boxes parameter on Settings page (thanks to Piet Bos, China) +- Bugfix: Removed Widget text formatting +- Bugfix: Load default settings value of setting doesn't exist yet (first usage) +- Bugfix: Replacement of footnotes tag on public pages with html special characters in the content +- Feature: Footnotes tag color is set to the default link color depending on the current Theme (thanks to Daniel Formo, Norway) + += 1.2.2 = +- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) +- Update: The admin can decide which "I love footnotes" text (or not text) will be displayed in the footer +- Adding: Buttons next to the reference label to expand/collapse the reference container if set to "collapse by default" +- Bugfix: Replace footnote short code +- Update: Combined buttons for the "collapse/expand" reference container + += 1.2.1 = +- Bugfix: HowTo example will be displayed correctly if a user defined short code is set + += 1.2.0 = +- Feature: New button in the WYSIWYG editor and in the plain text editor to easily implement the footnotes tag +- Feature: Icon for the WYSIWYG-editor button +- Feature: Pre defined footnote short codes +- Experimental: User defined short code for defining footnotes +- Experimental: Plugin Widget to define where the reference container should appear when set to "widget area" +- Update: Moved footnotes 'love' settings to a separate container +- Update: Translation for new settings and for the Widget description +- Bugfix: Setting for the position of the "reference container" works for the options "footer", "end of post" and "widget area" + += 1.1.1 = +- Feature: Short code to not display the 'love me' slug on specific pages ( short code = [[no footnotes: love]] ) +- Update: Setting where the reference container appears on public pages can also be set to the widget area +- Adding: Link to the wordpress.org support page in the plugin main page +- Update: Changed plugin URL from GitHub to WordPress +- Bugfix: Uninstall function to really remove all settings done in the settings page +- Bugfix: Load default settings after plugin is installed +- Update: Translation for support link and new setting option +- Adding: Label to display the user the short code to not display the 'love me' slug + += 1.1.0 = +- Update: Global styling for the public plugin name +- Update: Easier usage of the public plugin name in translations +- Update: New Layout for the settings page to group similar settings to get a better overview +- Update: Display settings submit button only if there is at least 1 editable setting in the current tab +- Adding: Setting where the reference container appears on public pages (needs some corrections!) +- Bugfix: Displays only one reference container in front of the footer on category pages + += 1.0.6 = +- Bugfix: Uninstall function to delete all plugin settings +- Bugfix: Counter style internal name in the reference container to correctly link to the right footnote on the page above +- Bugfix: Footnote hover box styling to not wrap the footnote text on mouse over +- Update: 'footnotes love' text in the page footer if the admin accepts it and set its default value to 'no' + += 1.0.5 = +- The Plugin has been submitted to wordpress.org for review and (hopefully) publication. +- Update: Plugin description for public directories (WordPress.org and GitHub) +- Feature: the footnotes WordPress Plugin now has its very own CI + - Update: Styling + - Update: Settings to support the styling +- Adding: Inspirational Screenshots for further development +- Adding: Settings screenshot +- Update: i18n fine-tuning + += 1.0.4 = +- Update: replacing function when footnote is a link (bugfix) +- Footnote hover box remains until cursor leaves footnote or hover box +- Links in the footnote hover box are click able +- Adding: setting to allow footnotes on Summarized Posts +- Adding: setting to tell the world you're using footnotes plugin +- Adding: setting for the counter style of the footnote index + - Arabic Numbers (1, 2, 3, 4, 5, ...) + - Arabic Numbers leading 0 (01, 02, 03, 04, 05, ...) + - Latin Characters lower-case (a, b, c, d, e, ...) + - Latin Characters upper-case (A, B, C, D, E, ...) + - Roman Numerals (I, II, III, IV, V, ...) +- Adding: a link to the WordPress plugin in the footer if the WP-admin accepts it +- Update: translations for the new settings +- Switch back the version numbering scheme to have 3 digits + += 1.0.3 = +- Adding: setting to use personal starting and ending tag for the footnotes +- Update: translations for the new setting +- Update: reading settings and fallback to default values (bugfix) + += 1.0.2 = +- Adding: setting to collapse the reference container by default +- Adding: link behind the footnotes to automatically jump to the reference container +- Adding: function to easy output input fields for the settings page +- Update: translation for the new setting + += 1.0.1 = +- Separated functions in different files for a better overview +- Adding: a version control to each file / class / function / variable +- Adding: layout for the settings menu, settings split in tabs and not a list-view +- Update: Replacing footnotes in widget texts will show the reference container at the end of the page (bugfix) +- Update: translations for EN and DE +- Changed version number from 3 digits to 2 digits + += 1.0.0 = +- First development Version of the Plugin + +== Upgrade Notice == +to upgrade our plugin is simple. Just update the plugin within your WordPress installation. +To cross-upgrade from other footnotes plugins, there will be a migration assistant in the future From ef6dd57310831e5a032370ce16244b2e59239bb4 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 2 Mar 2021 21:47:09 +0000 Subject: [PATCH 088/144] Update version number to 2.5.10 (#54) * Update version number to 2.5.10 (current stable tag) See [here](https://github.com/markcheret/footnotes/pull/54#discussion_r585895136) for discussion; **stable tags only to be used until releases are automated** --- footnotes.php | 4 ++-- readme.txt | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/footnotes.php b/footnotes.php index 6c0ef6e..3fff795 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,7 +4,7 @@ * Plugin URI: https://wordpress.org/plugins/footnotes/ * Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. * Author: Mark Cheret - * Version: 2.5.8 + * Version: 2.5.10 * Author URI: http://cheret.de/plugins/footnotes-2/ * Text Domain: footnotes * Domain Path: /languages @@ -21,7 +21,7 @@ * @var str * @lastmodified 2021-02-28T1345+0100 */ -define( 'C_STR_FOOTNOTES_VERSION', '2.5.8' ); +define( 'C_STR_FOOTNOTES_VERSION', '2.5.10' ); /* LICENSE NOTICE diff --git a/readme.txt b/readme.txt index e44f668..73d907a 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 -Stable Tag: 2.5.8 +Stable Tag: 2.5.10 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -77,6 +77,16 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.5.10 = +- Bugfix: Revert to 2.5.8. OUR APOLOGIES, PLEASE, FOR THE 2.5.9d1 PLUGIN 'Stable Tag' MISHAP. + += 2.5.9 = +- Bugfix: Dashboard: unescape quotation marks in Custom CSS text area and input boxes, thanks to @rumperuu code contribution. +- Update: Codebase: compliance to WordPress coding standards, thanks to @rumperuu code contribution. +- Adding: Documentation: additional readme in markdown format for use with GitHub, thanks to @rumperuu code contribution. +- Adding: Documentation: help and support for individual contributors through Contributing Guidelines, thanks to @rumperuu code contribution. +- Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution. + = 2.5.8 = - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. - Bugfix: Layout: support right-to-left writing direction by enabling mirrored paddings on HTML dir="rtl" pages, thanks to @arahmanshaalan bug report. From 6b9e602d07b10945ab872e4ce9bfa1d4e62ba0b1 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 4 Mar 2021 08:46:19 +0100 Subject: [PATCH 089/144] Sync filenames with SVN repo (#57) Returns to the original file names for the `class/dashboard/` directory (for now at least) --- class/convert.php | 2 +- class/{layout => dashboard}/init.php | 0 .../abstract-engine.php => dashboard/layout.php} | 0 .../subpage-diagnostics.php} | 0 .../settings.php => dashboard/subpage-main.php} | 0 footnotes.php | 6 +++--- includes.php | 2 +- readme.txt | 10 +++++----- 8 files changed, 10 insertions(+), 10 deletions(-) rename class/{layout => dashboard}/init.php (100%) rename class/{layout/abstract-engine.php => dashboard/layout.php} (100%) rename class/{layout/diagnostics.php => dashboard/subpage-diagnostics.php} (100%) rename class/{layout/settings.php => dashboard/subpage-main.php} (100%) diff --git a/class/convert.php b/class/convert.php index 3adb313..c994d7a 100644 --- a/class/convert.php +++ b/class/convert.php @@ -1,4 +1,4 @@ - Date: Fri, 5 Mar 2021 04:30:50 +0100 Subject: [PATCH 090/144] Adapt after the 2.5.9d1 accident. --- class/dashboard/layout.php | 4 +- class/init.php | 12 ++--- footnotes.php | 94 ++++++++++++++++++++++++++++++-------- readme.txt | 13 ++++-- 4 files changed, 92 insertions(+), 31 deletions(-) diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 4908403..6e48570 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -213,11 +213,11 @@ abstract class MCI_Footnotes_Layout_Engine { */ if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_PACKAGE_VERSION ); } else { - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_PACKAGE_VERSION ); } diff --git a/class/init.php b/class/init.php index 45cd4ec..94daec1 100644 --- a/class/init.php +++ b/class/init.php @@ -306,7 +306,7 @@ class MCI_Footnotes { * Plugin version number is needed for busting browser caches after each plugin update. * @since 2.1.4 automate passing version number for cache busting. * @date 2020-11-30T0646+0100 - * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. + * The constant C_STR_PACKAGE_VERSION is defined at start of footnotes.php. * * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. @@ -350,7 +350,7 @@ class MCI_Footnotes { MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), - C_STR_FOOTNOTES_VERSION, + C_STR_PACKAGE_VERSION, 'all' ); @@ -364,9 +364,9 @@ class MCI_Footnotes { * * This optional layout fix is useful by lack of layout support. */ - wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); - wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_PACKAGE_VERSION ); + wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_PACKAGE_VERSION ); + wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_PACKAGE_VERSION ); $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); if ( 'none' !== $l_str_page_layout_option ) { @@ -376,7 +376,7 @@ class MCI_Footnotes { MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' ), array(), - C_STR_FOOTNOTES_VERSION, + C_STR_PACKAGE_VERSION, 'all' ); } diff --git a/footnotes.php b/footnotes.php index 047d538..1e37566 100755 --- a/footnotes.php +++ b/footnotes.php @@ -14,31 +14,87 @@ */ /** - * Version number for stylesheet cache busting. + * Package Version number for stylesheet cache busting. * + * Please keep this constant in sync with the Version in the header above, + * and also in sync with the Package Version in the header of the readme. + * DO NOT SYNC THE STABLE TAG VALUE WITH THE PACKAGE VERSION VALUE. * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-03-04T0526+0100 + * @lastmodified 2021-03-05T0427+0100 */ -define( 'C_STR_FOOTNOTES_VERSION', '2.5.11d1' ); +define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); -/* - LICENSE NOTICE - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License, version 3, as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +/** + * Package Version vs Stable Tag version. + * + * WordPress plugin readmes are usually lacking the version number of the package. + * In Footnotes, this has been included after the stable tag had been mistaken for + * the package version, given that state-of-the-art readmes have that information. + * + * - Adding: Documentation: Readme: 'Package Version' field for information, after the 'Stable Tag' field parsed for release information. + * + * @since 2.5.11 + * @see readme.txt + * @link https://meta.trac.wordpress.org/ticket/5645#comment:5 + * + * - Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. + * + * @version 2.5.10 (reversion to @version 2.5.8) + * @date 2021-03-01 11:09:29 +0000 + * @revision 2483464 + * @link https://plugins.trac.wordpress.org/changeset/2483464/footnotes/trunk + * + * @reporter @little-shiva + * @link https://wordpress.org/support/topic/footnotes-broke-two-of-my-client-sites/ + * + * @reporter @watershare + * @link https://wordpress.org/support/topic/latest-update-broke-my-site-19/ + * + * @reporter @adjayabdg + * @link https://wordpress.org/support/topic/latest-update-broke-my-site-19/#post-14115531 + * + * @reporter @staho + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/ + * + * @reporter @frav8 + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115614 + * + * @reporter @voregnev + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115632 + * + * @reporter @dsl225 + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115820 + * + * @reporter @alexclassroom + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115860 + * + * @reporter @a223123131 + * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115906 + * @link https://wordpress.org/support/topic/update-breaks-layout-3/ + * @link https://wordpress.org/support/topic/bugs-in-every-2nd-update/#post-14116804 + * + * @reporter @codldmac + * @link https://wordpress.org/support/topic/crashed-my-site-104/ + * + * The accidental release of 2.5.9d1 was due to 3 factors: + * + * 1. The codebase got overhauled for the sake of WordPress Coding Standards compliance, + * one requirement of which is that files be named after the name of the class in them; + * 2. The renamed folder was not added to Subversion version control due to an unexpected + * unfamiliarity with the system and its command line interface; + * 3. The Stable Tag field in the Readme header was used for the package version because + * the related field is lacking, and the use of file headers for release configuration + * is uncommon. + * + * @link https://wordpress.org/support/topic/2-5-10-reverts-2-5-9d1-and-apologies/ + * @link https://wordpress.org/support/topic/2-5-10-reverts-2-5-9d1-and-apologies/#post-14119440 + * @link https://github.com/markcheret/footnotes/issues/55 + * @link https://meta.trac.wordpress.org/ticket/5645 + * @link https://wordpress.org/plugins/readme.txt + * @link https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/ + */ /** * Plugin’s main PHP file. diff --git a/readme.txt b/readme.txt index 795e457..64d0d82 100644 --- a/readme.txt +++ b/readme.txt @@ -5,8 +5,9 @@ Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 Stable Tag: 2.5.10 +Package Version: 2.5.11d1 License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html +License URI: https://www.gnu.org/licenses/gpl-3.0.html == Description == @@ -19,7 +20,7 @@ https://www.youtube.com/watch?v=HzHaMAAJwbI **footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. = Main Features = -- Fully customizable **footnotes** start and end shortcodes; +- Fully customizable **footnote** start and end shortcodes; - Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; - Responsive *Reference Container* at the end or positioned by shortcode; - Display the **footnotes** *Reference Container* inside a Widget; @@ -78,14 +79,18 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == = 2.5.11 = +- Adding: Documentation: Readme: 'Package Version' field for information, after the 'Stable Tag' field parsed for release information. - Bugfix: Dashboard: unescape quotation marks in Custom CSS text area and input boxes, thanks to @rumperuu code contribution. - Update: Codebase: compliance to WordPress Coding Standards, thanks to @rumperuu code contribution. - Adding: Documentation: additional readme in markdown format for use with GitHub, thanks to @rumperuu code contribution. -- Adding: Documentation: help and support for individual contributors through Contributing Guidelines, thanks to @rumperuu code contribution. +- Adding: Documentation: help and support for contributors through Contributing Guidelines, thanks to @rumperuu code contribution. - Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution. = 2.5.10 = -- Bugfix: Revert to 2.5.8. OUR APOLOGIES, PLEASE, FOR THE 2.5.9d1 PLUGIN 'Stable Tag' MISHAP. +- Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. + += 2.5.9d1 = +- Update: Codebase: accident. OUR APOLOGIES, PLEASE, FOR THE 2.5.9d1 PLUGIN 'Stable Tag' MISHAP. = 2.5.8 = - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. From f63dfde076d7bf87e040056d1a23c45803537bd8 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Fri, 5 Mar 2021 08:44:15 +0100 Subject: [PATCH 091/144] Corrections to changelog. --- development/customized-documentation-schema.txt | 8 +++++--- footnotes.php | 4 +++- readme.txt | 12 ++++++------ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/development/customized-documentation-schema.txt b/development/customized-documentation-schema.txt index dbb72e9..7ce343a 100644 --- a/development/customized-documentation-schema.txt +++ b/development/customized-documentation-schema.txt @@ -1,5 +1,5 @@ customized-documentation-schema.txt -@lastmodified 2021-02-15T2022+0100 +@lastmodified 2021-03-05T0501+0100 Plugin Footnotes for WordPress, v2.5.4 and later @@ -255,10 +255,12 @@ MISSING TAGS: @modified @publisher @reporter +@revision +@timestamp @user -▲ Config (original, missing and added tags), example of VS Code +▲ Config (original, missing and added tags), example of VS Code. /usr/share/code/resources/app/extensions/php/syntaxes/php.tmLanguage.json original: @@ -274,4 +276,4 @@ PHPStan: |extends|implements|template custom: -|accountable|bib|biblio|callback|commit|committer|contributor|courtesy|date|datetime|lastmodified|modified|publisher|reporter|user +|accountable|bib|biblio|callback|commit|committer|contributor|courtesy|date|datetime|lastmodified|modified|publisher|reporter|revision|timestamp|user diff --git a/footnotes.php b/footnotes.php index 1e37566..86a2216 100755 --- a/footnotes.php +++ b/footnotes.php @@ -19,10 +19,11 @@ * Please keep this constant in sync with the Version in the header above, * and also in sync with the Package Version in the header of the readme. * DO NOT SYNC THE STABLE TAG VALUE WITH THE PACKAGE VERSION VALUE. + * @see full docblock below. * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-03-05T0427+0100 + * @lastmodified 2021-03-05T0457+0100 */ define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); @@ -36,6 +37,7 @@ define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); * - Adding: Documentation: Readme: 'Package Version' field for information, after the 'Stable Tag' field parsed for release information. * * @since 2.5.11 + * @see C_STR_PACKAGE_VERSION * @see readme.txt * @link https://meta.trac.wordpress.org/ticket/5645#comment:5 * diff --git a/readme.txt b/readme.txt index 64d0d82..cfa9849 100644 --- a/readme.txt +++ b/readme.txt @@ -79,18 +79,18 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == = 2.5.11 = -- Adding: Documentation: Readme: 'Package Version' field for information, after the 'Stable Tag' field parsed for release information. -- Bugfix: Dashboard: unescape quotation marks in Custom CSS text area and input boxes, thanks to @rumperuu code contribution. -- Update: Codebase: compliance to WordPress Coding Standards, thanks to @rumperuu code contribution. +- Adding: Documentation: Readme: Header: 'Package Version' field for information, after the 'Stable Tag' field (parsed for release configuration), to prevent further misuse. +- Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution during the codebase conformance overhaul. +- Update: Codebase: make all PHP code comply to WordPress Coding Standards requirements, thanks to @rumperuu code contribution and refactoring. - Adding: Documentation: additional readme in markdown format for use with GitHub, thanks to @rumperuu code contribution. -- Adding: Documentation: help and support for contributors through Contributing Guidelines, thanks to @rumperuu code contribution. +- Adding: Documentation: help and support for contributors by the means of Contributing Guidelines, thanks to @rumperuu code contribution. - Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution. = 2.5.10 = -- Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. +- Bugfix: Codebase: revert to 2.5.8 with apologies (below), thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. = 2.5.9d1 = -- Update: Codebase: accident. OUR APOLOGIES, PLEASE, FOR THE 2.5.9d1 PLUGIN 'Stable Tag' MISHAP. +- Update: Codebase: accidental release of trunk/, tagged when 2.5.10 was released 3½ h later. OUR APOLOGIES, PLEASE, FOR THE 2.5.9d1 PLUGIN 'Stable Tag' MISHAP. = 2.5.8 = - Bugfix: Layout: support right-to-left writing direction by replacing remaining CSS values 'left' with 'start', thanks to @arahmanshaalan bug report. From 6ff77dc74d764697ed48f414ed370096d1327f97 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Fri, 5 Mar 2021 08:58:48 +0100 Subject: [PATCH 092/144] =?UTF-8?q?Also=20added=20@=E2=80=8Crevision=20and?= =?UTF-8?q?=20@=E2=80=8Ctimestamp=20PHPDOC=20tags=20@=E2=80=8Crevision=20a?= =?UTF-8?q?nd=20@=E2=80=8Ctimestamp=20used=20for=20SVN=20refs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Full enumeration of added custom PHPDOC tags: @‌accountable, @‌bib, @‌biblio, @‌callback, @‌commit, @‌committer, @‌contributor, @‌courtesy, @‌date, @‌datetime, @‌lastmodified, @‌modified, @‌publisher, @‌reporter, @‌revision, @‌timestamp, @‌user.Some tags like @‌reporter and @‌contributor are more used than others. --- footnotes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/footnotes.php b/footnotes.php index 86a2216..d601ec1 100755 --- a/footnotes.php +++ b/footnotes.php @@ -44,8 +44,8 @@ define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); * - Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. * * @version 2.5.10 (reversion to @version 2.5.8) - * @date 2021-03-01 11:09:29 +0000 * @revision 2483464 + * @timestamp 2021-03-01 11:09:29 +0000 * @link https://plugins.trac.wordpress.org/changeset/2483464/footnotes/trunk * * @reporter @little-shiva From 0e6c5a8f87c83a238d5376d4064476d2b5dac02f Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Mon, 8 Mar 2021 10:10:32 +0100 Subject: [PATCH 093/144] Readme header upgrade. --- footnotes.php | 19 ++++++++++--------- readme.txt | 12 ++++++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/footnotes.php b/footnotes.php index d601ec1..b7ab5f2 100755 --- a/footnotes.php +++ b/footnotes.php @@ -23,24 +23,25 @@ * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-03-05T0457+0100 + * @lastmodified 2021-03-08T1008+0100 */ define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); /** - * Package Version vs Stable Tag version. + * Version numbers in a WordPress plugin readme.txt header. + * + * - Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. + * - Adding: Documentation: Readme.txt: informative 'Tagged Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. + * - Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. + * + * @since 2.5.11 + * @see readme.txt + * @link https://meta.trac.wordpress.org/ticket/5652 * * WordPress plugin readmes are usually lacking the version number of the package. * In Footnotes, this has been included after the stable tag had been mistaken for * the package version, given that state-of-the-art readmes have that information. * - * - Adding: Documentation: Readme: 'Package Version' field for information, after the 'Stable Tag' field parsed for release information. - * - * @since 2.5.11 - * @see C_STR_PACKAGE_VERSION - * @see readme.txt - * @link https://meta.trac.wordpress.org/ticket/5645#comment:5 - * * - Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. * * @version 2.5.10 (reversion to @version 2.5.8) diff --git a/readme.txt b/readme.txt index cfa9849..1ec1bce 100644 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,10 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.6.1 Requires PHP: 5.6 -Stable Tag: 2.5.10 Package Version: 2.5.11d1 +Tagged Version: 2.5.10 +Stable Tag: 2.5.10 +CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION. License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -79,11 +81,13 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == = 2.5.11 = -- Adding: Documentation: Readme: Header: 'Package Version' field for information, after the 'Stable Tag' field (parsed for release configuration), to prevent further misuse. +- Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. +- Adding: Documentation: Readme.txt: informative 'Tagged Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. +- Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. - Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution during the codebase conformance overhaul. - Update: Codebase: make all PHP code comply to WordPress Coding Standards requirements, thanks to @rumperuu code contribution and refactoring. -- Adding: Documentation: additional readme in markdown format for use with GitHub, thanks to @rumperuu code contribution. -- Adding: Documentation: help and support for contributors by the means of Contributing Guidelines, thanks to @rumperuu code contribution. +- Adding: Documentation: additional readme in markdown format 'README.md' for use with GitHub, thanks to @rumperuu code contribution. +- Adding: Documentation: help and support for contributors by the means of Contributing Guidelines 'CONTRIBUTING.md', thanks to @rumperuu code contribution. - Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution. = 2.5.10 = From b6f6ff76f372e23602d3efc853cdd31f6558758e Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 11 Mar 2021 06:26:34 +0100 Subject: [PATCH 094/144] Version number related fixes before pull request. --- footnotes.php | 53 +++++++++++++++++++++++++++++++-------------------- readme.txt | 2 +- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/footnotes.php b/footnotes.php index b7ab5f2..869c62a 100755 --- a/footnotes.php +++ b/footnotes.php @@ -19,78 +19,89 @@ * Please keep this constant in sync with the Version in the header above, * and also in sync with the Package Version in the header of the readme. * DO NOT SYNC THE STABLE TAG VALUE WITH THE PACKAGE VERSION VALUE. - * @see full docblock below. + * * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-03-08T1008+0100 + * @lastmodified 2021-03-11T0623+0100 */ define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); /** * Version numbers in a WordPress plugin readme.txt header. - * + * * - Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. * - Adding: Documentation: Readme.txt: informative 'Tagged Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. * - Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. - * + * * @since 2.5.11 * @see readme.txt * @link https://meta.trac.wordpress.org/ticket/5652 - * + * + * Package Version Actual version string. + * May identify a development version. + * A 'd' series is suffixed to incremented bugfix version. + * + * Tagged Version Refers to the latest tag. + * Typically the best available version. + * May not be released, due to release frequency concerns. + * + * Stable Tag Parsed in trunk/ for release configuration. + * Must not be greater than the Version in MAIN.php header. + * * WordPress plugin readmes are usually lacking the version number of the package. * In Footnotes, this has been included after the stable tag had been mistaken for * the package version, given that state-of-the-art readmes have that information. - * + * * - Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. - * + * * @version 2.5.10 (reversion to @version 2.5.8) * @revision 2483464 * @timestamp 2021-03-01 11:09:29 +0000 * @link https://plugins.trac.wordpress.org/changeset/2483464/footnotes/trunk - * + * * @reporter @little-shiva * @link https://wordpress.org/support/topic/footnotes-broke-two-of-my-client-sites/ - * + * * @reporter @watershare * @link https://wordpress.org/support/topic/latest-update-broke-my-site-19/ - * + * * @reporter @adjayabdg * @link https://wordpress.org/support/topic/latest-update-broke-my-site-19/#post-14115531 - * + * * @reporter @staho * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/ - * + * * @reporter @frav8 * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115614 - * + * * @reporter @voregnev * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115632 - * + * * @reporter @dsl225 * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115820 - * + * * @reporter @alexclassroom * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115860 - * + * * @reporter @a223123131 * @link https://wordpress.org/support/topic/version-2-5-9d1-breaks-wp-down/#post-14115906 * @link https://wordpress.org/support/topic/update-breaks-layout-3/ * @link https://wordpress.org/support/topic/bugs-in-every-2nd-update/#post-14116804 - * + * * @reporter @codldmac * @link https://wordpress.org/support/topic/crashed-my-site-104/ - * + * * The accidental release of 2.5.9d1 was due to 3 factors: - * + * * 1. The codebase got overhauled for the sake of WordPress Coding Standards compliance, * one requirement of which is that files be named after the name of the class in them; * 2. The renamed folder was not added to Subversion version control due to an unexpected * unfamiliarity with the system and its command line interface; * 3. The Stable Tag field in the Readme header was used for the package version because - * the related field is lacking, and the use of file headers for release configuration + * the related field is lacking, and the use of file headers for release configuration * is uncommon. - * + * * @link https://wordpress.org/support/topic/2-5-10-reverts-2-5-9d1-and-apologies/ * @link https://wordpress.org/support/topic/2-5-10-reverts-2-5-9d1-and-apologies/#post-14119440 * @link https://github.com/markcheret/footnotes/issues/55 diff --git a/readme.txt b/readme.txt index 1ec1bce..3a968b0 100644 --- a/readme.txt +++ b/readme.txt @@ -223,7 +223,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.2.0 = - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report. -- Adding: Start/end short codes: more predefined options. +- Adding: Dashboard: Footnote delimiters: more predefined options. - Adding: Numbering styles: lowercase Roman numerals support. - Update: Priority levels: update the notice in the dashboard Priority tab. - Update: Dashboard: Tooltip settings: group into 3 thematic containers. From 5c9e611837f29569ef12d9cb45a2fc423c3918b4 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Fri, 12 Mar 2021 09:48:47 +0000 Subject: [PATCH 095/144] Update supported WP version to 5.7 (#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update supported WP version to 5.7 * Update package version * Add Package Version in MAIN.php * Change version number labels. * Obfuscate 'Version' string in label. The way these headers are parsed, best is to make sure that the string 'Version' doesn’t occur in another field label. Co-authored-by: pewgeuges <73141620+pewgeuges@users.noreply.github.com> --- footnotes.php | 27 +++++++++++++++------------ readme.txt | 8 ++++---- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/footnotes.php b/footnotes.php index 869c62a..2e9634b 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,7 +4,9 @@ * Plugin URI: https://wordpress.org/plugins/footnotes/ * Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. * Author: Mark Cheret - * Version: 2.5.11d1 + * Package V.: 2.5.11d2 + * Version: 2.5.10 + * CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION. * Author URI: http://cheret.de/plugins/footnotes-2/ * Text Domain: footnotes * Domain Path: /languages @@ -16,38 +18,39 @@ /** * Package Version number for stylesheet cache busting. * - * Please keep this constant in sync with the Version in the header above, - * and also in sync with the Package Version in the header of the readme. - * DO NOT SYNC THE STABLE TAG VALUE WITH THE PACKAGE VERSION VALUE. + * Please keep this constant in sync with the Package Version in the header above + * and in the header of the readme, but not necessarily with the other Version. * * @since 2.1.4 * @since 2.5.3 (Hungarian) * @var str - * @lastmodified 2021-03-11T0623+0100 + * @lastmodified 2021-03-11T2202+0100 */ -define( 'C_STR_PACKAGE_VERSION', '2.5.11d1' ); +define( 'C_STR_PACKAGE_VERSION', '2.5.11d2' ); /** - * Version numbers in a WordPress plugin readme.txt header. + * Version numbers in WordPress plugin readme.txt and main PHP headers. * * - Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. - * - Adding: Documentation: Readme.txt: informative 'Tagged Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. + * - Adding: Documentation: Readme.txt: informative 'Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. * - Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. * * @since 2.5.11 * @see readme.txt * @link https://meta.trac.wordpress.org/ticket/5652 * - * Package Version Actual version string. + * Package Version Actual version string, informative only. * May identify a development version. * A 'd' series is suffixed to incremented bugfix version. + * Used for style sheet cache busting. * - * Tagged Version Refers to the latest tag. + * Version Parsed in the main PHP file header for update configuration. + * Refers to the latest tag. * Typically the best available version. * May not be released, due to release frequency concerns. * - * Stable Tag Parsed in trunk/ for release configuration. - * Must not be greater than the Version in MAIN.php header. + * Stable Tag Parsed in the readme.txt in trunk/ for release configuration. + * May be smaller than Version, avoiding too frequent releases. * * WordPress plugin readmes are usually lacking the version number of the package. * In Footnotes, this has been included after the stable tag had been mistaken for diff --git a/readme.txt b/readme.txt index 3a968b0..9872614 100644 --- a/readme.txt +++ b/readme.txt @@ -2,10 +2,10 @@ Contributors: mark.cheret, lolzim, rumperuu, aricura, misfist, ericakfranz, dartiss, docteurfitness, felipelavinz, martinneumannat, matkus2, meglio, spaceling, vonpiernik, pewgeuges Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing Requires at least: 3.9 -Tested up to: 5.6.1 +Tested up to: 5.7 Requires PHP: 5.6 -Package Version: 2.5.11d1 -Tagged Version: 2.5.10 +Package Version: 2.5.11d2 +Version: 2.5.10 Stable Tag: 2.5.10 CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION. License: GPLv3 or later @@ -82,7 +82,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.5.11 = - Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. -- Adding: Documentation: Readme.txt: informative 'Tagged Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. +- Adding: Documentation: Readme.txt: informative 'Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. - Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. - Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution during the codebase conformance overhaul. - Update: Codebase: make all PHP code comply to WordPress Coding Standards requirements, thanks to @rumperuu code contribution and refactoring. From e8d6dbe13d81b5c9fbb0cfaa49cbce3907dfc43b Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Fri, 12 Mar 2021 17:53:49 +0000 Subject: [PATCH 096/144] Automatically generate new releases (#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adapt after the 2.5.9d1 accident. * Corrections to changelog. * Also added @‌revision and @‌timestamp PHPDOC tags @‌revision and @‌timestamp used for SVN refs. Full enumeration of added custom PHPDOC tags: @‌accountable, @‌bib, @‌biblio, @‌callback, @‌commit, @‌committer, @‌contributor, @‌courtesy, @‌date, @‌datetime, @‌lastmodified, @‌modified, @‌publisher, @‌reporter, @‌revision, @‌timestamp, @‌user.Some tags like @‌reporter and @‌contributor are more used than others. * Readme header upgrade. * Create deploy-to-wordpress.org.yml * Add distignore * Comment out `build` command, replace npm with composer * Remove placeholder comments * Add build commands * Fix typo * Fix version number bug * Make zip without top-level directory * Append tag name to plugin zip * Clean up a bit * Rename workflow config * Fix upload paths * Append tag name to artifact * Fix paths * Revert path fix * Try again * Add wplm-config.xml to buildfiles * Fix indentation * Rename development/csscat.sh to css/csscat.sh * Rename development/customized-documentation-schema.txt to customized-documentation-schema.txt * Rename development/customized-template-stack.txt to customized-template-stack.txt * Version number related fixes before pull request. * Move csscat script to tools dir * Rename csscat * Refactor script * Update customized-documentation-schema.txt * Replace empty lines in help output * Escape empty lines. * Delete 3 items from `.distignore` As mentioned, CONTRIBUTING.md and README.md should be included in distributions. - As an invitation to the Community. - As a tangible proof of goodwill after the 2.5.9d1 accident. Also SECURITY.md so Footnotes users see that we’re concerned, and can reach out without transiting via GitHub. * Include CONTRIBUTING.md README.md SECURITY.md * Update sync w/ 5.7 tested. * Update * Update composerfiles Co-authored-by: pewgeuges <73141620+pewgeuges@users.noreply.github.com> --- .distignore | 31 +++++++ .github/workflows/release-handler.yml | 46 +++++++++++ .gitignore | 1 + README.md | 12 +++ _tools/build-stylesheets.sh | 82 +++++++++++++++++++ _tools/build.sh | 9 ++ _tools/setup.sh | 0 composer.json | 12 +-- composer.lock | 2 +- ...txt => customized-documentation-schema.txt | 0 ...stack.txt => customized-template-stack.txt | 0 development/csscat.sh | 68 --------------- 12 files changed, 189 insertions(+), 74 deletions(-) create mode 100644 .distignore create mode 100644 .github/workflows/release-handler.yml create mode 100755 _tools/build-stylesheets.sh create mode 100755 _tools/build.sh mode change 100644 => 100755 _tools/setup.sh rename development/customized-documentation-schema.txt => customized-documentation-schema.txt (100%) rename development/customized-template-stack.txt => customized-template-stack.txt (100%) delete mode 100755 development/csscat.sh diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..30128dd --- /dev/null +++ b/.distignore @@ -0,0 +1,31 @@ +# A set of files you probably don't want in your WordPress.org distribution +.distignore +.editorconfig +.git +.gitignore +.gitlab-ci.yml +.travis.yml +.DS_Store +Thumbs.db +behat.yml +bin +circle.yml +composer.json +composer.lock +Gruntfile.js +package.json +phpunit.xml +phpunit.xml.dist +multisite.xml +multisite.xml.dist +phpcs.ruleset.xml +LICENSE +wp-cli.local.yml +tests +vendor +node_modules +*.sql +*.tar.gz +*.zip +authors.txt +composer.* diff --git a/.github/workflows/release-handler.yml b/.github/workflows/release-handler.yml new file mode 100644 index 0000000..6ccd91d --- /dev/null +++ b/.github/workflows/release-handler.yml @@ -0,0 +1,46 @@ +name: Release Handler + +# Action runs when a new release is published. +on: + release: + types: [published] + +jobs: + release-new: + name: Issue new release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build Plugin + run: | + composer install --no-dev --optimize-autoloader + composer run build + + - name: Create release archive + uses: montudor/action-zip@v0.1.0 + with: + args: zip -X -r dist/footnotes-${{ github.event.release.tag_name }}.zip dist + + - name: Upload archive as artifact + uses: actions/upload-artifact@v2 + with: + name: footnotes-${{ github.event.release.tag_name }} + path: dist/footnotes-${{ github.event.release.tag_name }}.zip + + - name: Upload archive to release + uses: JasonEtco/upload-to-release@master + with: + args: dist/footnotes-${{ github.event.release.tag_name }}.zip application/zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + #- name: Deploy release to Wordpress.org + # uses: 10up/action-wordpress-plugin-deploy@stable + # with: + # generate-zip: true + # env: + # SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + # SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} diff --git a/.gitignore b/.gitignore index de46eb3..494168f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .phpdoc/ vendor/ +dist/ *.bak authors.txt diff --git a/README.md b/README.md index f55c285..e24b6ac 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,18 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` - You may have to enable double-wildcards in your console first (`shopt -s globstar`) +## Building + +1. Run `_tools/build-stylesheets.sh -c` to concatenate stylesheets +1. Manually minify the output files in `css/tmp/`, saving them as `.min.css` files + - The intention is to replace this with automated minification, meaning that + all of these steps can be rolled into a single `build` command. +1. Run `_tools/build-stylesheets.sh -d` to deploy the minified files to `dist/` + - **this will delete any existing `dist/` folder** +1. Run `composer run build` to move over the remaining files to `dist/` + - Currently, the files to include in a distribution are hard-coded in `_tools/build.sh` + - The intention is to replace this with a proper parsing of the `.distignore` file + ## Updating Documentation 1. Install [phpDocumentor](https://phpdoc.org/) diff --git a/_tools/build-stylesheets.sh b/_tools/build-stylesheets.sh new file mode 100755 index 0000000..146db4e --- /dev/null +++ b/_tools/build-stylesheets.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +# Concatenates, minifies (TODO) and deploys stylesheets for distribution. +# +# 12 unified stylesheets are concatenated out of these files: +# - `dev-common.css` +# - `dev-tooltips.css` +# - `dev-tooltips-alternative.css` +# - `dev-layout-reference-container.css` +# - `dev-layout-entry-content.css` +# - `dev-layout-main-content.css` + +echo "Running $(dirname "$0")/build-stylesheets.sh" + +if [[ $1 == "-c" ]]; then + + echo "Concatenating files and placing in \`css/tmp/\`." + mkdir -p ./css/tmp + cat ./css/dev-common.css > ./css/tmp/footnotes-nottbrpl0.css + cat ./css/dev-{common,layout-reference-container}.css > ./css/tmp/footnotes-nottbrpl1.css + cat ./css/dev-{common,layout-entry-content}.css > ./css/tmp/footnotes-nottbrpl2.css + cat ./css/dev-{common,layout-main-content}.css > ./css/tmp/footnotes-nottbrpl3.css + cat ./css/dev-{common,tooltips}.css > ./css/tmp/footnotes-jqttbrpl0.css + cat ./css/dev-{common,tooltips,layout-reference-container}.css > ./css/tmp/footnotes-jqttbrpl1.css + cat ./css/dev-{common,tooltips,layout-entry-content}.css > ./css/tmp/footnotes-jqttbrpl2.css + cat ./css/dev-{common,tooltips,layout-main-content}.css > ./css/tmp/footnotes-jqttbrpl3.css + cat ./css/dev-{common,tooltips,tooltips-alternative}.css > ./css/tmp/footnotes-alttbrpl0.css + cat ./css/dev-{common,tooltips,tooltips-alternative,layout-reference-container}.css > ./css/tmp/footnotes-alttbrpl1.css + cat ./css/dev-{common,tooltips,tooltips-alternative,layout-entry-content}.css > ./css/tmp/footnotes-alttbrpl2.css + cat ./css/dev-{common,tooltips,tooltips-alternative,layout-main-content}.css > ./css/tmp/footnotes-alttbrpl3.css + cat ./css/settings.css > ./css/tmp/settings.css + echo "Done." + +elif [[ $1 == "-m" ]]; then + + # TODO: this should automatically minifiy all files, outputting into `.min.css` + # files and deleting the original concatenated `.css` files in `css/tmp/`. + # Once that's done, we can change the `rm -r` command in the deploy step to + # `rmdir`, which will throw us an error if we have any minified files that + # haven't been moved over to `dist/css/` for whatever reason. As it currently + # stands, we have no error checking in place. + echo "Minifying files (TODO)..." + mkdir -p ./dist/css + for f in ./css/tmp/*.css; do + filename=$(basename $f .css) + echo $filename + # TODO: automated minification + echo $filename Done + done + echo "Done." + +elif [[ $1 == "-d" ]]; then + + echo "Deploying minified files to \`dist/css/\`..." + rm -r ./dist + mkdir -p ./dist/css + for f in ./css/tmp/*.min.css; do + filename=$(basename $f .css) + echo Moving $filename + mv $f ./dist/css + echo $filename Moved + done + echo "Deleting temporary files..." + rm -r ./css/tmp + echo "Done." + +else + + echo -e "Concatenates, minifies (TODO) and deploys stylesheets for distribution.\n" + echo -e "12 unified style sheets are concatenated out of these files:\n" + echo "\`dev-common.css\`" + echo "\`dev-tooltips.css\`" + echo "\`dev-tooltips-alternative.css\`" + echo "\`dev-layout-reference-container.css\`" + echo "\`dev-layout-entry-content.css\`" + echo -e "\`dev-layout-main-content.css\`\n" + echo "Command: \`-c\`: Concatenate \`dev-*\` CSS files into temporary directory." + echo "Command: \`-m\`: Minify files (TODO)." + echo "Command: \`-d\`: Deploy minified files to \`dist/css/\` and remove temporary files." + echo "No command, \"--help\", or anything else: Output this help section." + +fi diff --git a/_tools/build.sh b/_tools/build.sh new file mode 100755 index 0000000..13a7def --- /dev/null +++ b/_tools/build.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Moves everything except the stylesheets over to `dist/` + +cp -r -t dist class/ js/ img/ languages/ templates/ +cp -t dist features.txt license.txt readme.txt footnotes.php includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md +# TODO: once automatic minification is implemented, this should handle that. +# For now, we shall have to assume that this command is being run on a repo. with +# minimised stylesheet files already in `dist/css/`. diff --git a/_tools/setup.sh b/_tools/setup.sh old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json index 85ecd48..27eab43 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,13 @@ { + "name": "markcheret/footnotes", + "description": "footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.", + "license": "GPL-3.0-or-later", + "scripts": { + "build": "./_tools/build.sh", + "post-install-cmd": "./_tools/setup.sh" + }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "wp-coding-standards/wpcs": "^2.3" - }, - "scripts": { - "post-install-cmd": [ - "bash _tools/setup.sh" - ] } } diff --git a/composer.lock b/composer.lock index 9e0ee7c..ceae236 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a147d50695956de52f7cbf827b47830", + "content-hash": "0d4821c9dd1b0f00e1204cc22488f77f", "packages": [], "packages-dev": [ { diff --git a/development/customized-documentation-schema.txt b/customized-documentation-schema.txt similarity index 100% rename from development/customized-documentation-schema.txt rename to customized-documentation-schema.txt diff --git a/development/customized-template-stack.txt b/customized-template-stack.txt similarity index 100% rename from development/customized-template-stack.txt rename to customized-template-stack.txt diff --git a/development/csscat.sh b/development/csscat.sh deleted file mode 100755 index 1d5c453..0000000 --- a/development/csscat.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# 2021-02-15T1839+0100 -# Last modified: 2021-02-16T0155+0100 -# csscat.sh -# Concatenates CSS files; deletes the concatenations after they’ve been minified. -# -# 12 unified style sheets are concatenated out of these files: -# dev-common.css -# dev-tooltips.css -# dev-tooltips-alternative.css -# dev-layout-reference-container.css -# dev-layout-entry-content.css -# dev-layout-main-content.css -# -echo "Running $(dirname "$0")/csscat.sh" -if [[ $1 == "c" ]]; then -echo "Concatenate in csscat/ for minification:" -cd ../css -mkdir csscat -cat dev-common.css > csscat/footnotes-nottbrpl0.css -cat dev-common.css dev-layout-reference-container.css > csscat/footnotes-nottbrpl1.css -cat dev-common.css dev-layout-entry-content.css > csscat/footnotes-nottbrpl2.css -cat dev-common.css dev-layout-main-content.css > csscat/footnotes-nottbrpl3.css -cat dev-common.css dev-tooltips.css > csscat/footnotes-jqttbrpl0.css -cat dev-common.css dev-tooltips.css dev-layout-reference-container.css > csscat/footnotes-jqttbrpl1.css -cat dev-common.css dev-tooltips.css dev-layout-entry-content.css > csscat/footnotes-jqttbrpl2.css -cat dev-common.css dev-tooltips.css dev-layout-main-content.css > csscat/footnotes-jqttbrpl3.css -cat dev-common.css dev-tooltips.css dev-tooltips-alternative.css > csscat/footnotes-alttbrpl0.css -cat dev-common.css dev-tooltips.css dev-tooltips-alternative.css dev-layout-reference-container.css > csscat/footnotes-alttbrpl1.css -cat dev-common.css dev-tooltips.css dev-tooltips-alternative.css dev-layout-entry-content.css > csscat/footnotes-alttbrpl2.css -cat dev-common.css dev-tooltips.css dev-tooltips-alternative.css dev-layout-main-content.css > csscat/footnotes-alttbrpl3.css -echo "Done." -elif [[ $1 == "d" ]]; then -echo "Move minified to css/ and delete concatenations and their temp dir:" -cd ../css/csscat -mv footnotes-nottbrpl0.min.css .. -mv footnotes-nottbrpl1.min.css .. -mv footnotes-nottbrpl2.min.css .. -mv footnotes-nottbrpl3.min.css .. -mv footnotes-jqttbrpl0.min.css .. -mv footnotes-jqttbrpl1.min.css .. -mv footnotes-jqttbrpl2.min.css .. -mv footnotes-jqttbrpl3.min.css .. -mv footnotes-alttbrpl0.min.css .. -mv footnotes-alttbrpl1.min.css .. -mv footnotes-alttbrpl2.min.css .. -mv footnotes-alttbrpl3.min.css .. -cd .. -rm -r csscat -echo "Done." -else -echo "Concatenates CSS files; deletes the concatenations after they’ve been minified." -echo "" -echo "12 unified style sheets are concatenated out of these files:" -echo "" -echo "dev-common.css" -echo "" -echo "dev-tooltips.css" -echo "dev-tooltips-alternative.css" -echo "" -echo "dev-layout-reference-container.css" -echo "dev-layout-entry-content.css" -echo "dev-layout-main-content.css" -echo "" -echo "Command: c: Concatenate temporary files waiting for minification." -echo "Command: d: Move the minified files to css/, delete the temporary." -echo "No command, \"--help\", or anything else: Output this help section." -fi From 0a83796cdc96ac4ada39dfa02933937cfc0c1441 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Mon, 15 Mar 2021 08:11:12 +0100 Subject: [PATCH 097/144] Update author URIs (#63) * Update author URIs from `cheret.de` to `cheret.org`. * Update missed version number in `wysiwyg.js` from 2.1.6 to 2.5.10. Co-authored-by: pewgeuges <73141620+pewgeuges@users.noreply.github.com> --- class/dashboard/init.php | 2 +- footnotes.php | 2 +- js/wysiwyg-editor.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/class/dashboard/init.php b/class/dashboard/init.php index 31e5b24..c3f505e 100644 --- a/class/dashboard/init.php +++ b/class/dashboard/init.php @@ -135,7 +135,7 @@ class MCI_Footnotes_Layout_Init { echo $l_obj_template->get_content(); // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped - printf( 'visit Mark Cheret' ); + printf( 'visit Mark Cheret' ); printf( '

                                                                                                                                                                      ' ); printf( '' ); diff --git a/footnotes.php b/footnotes.php index 2e9634b..78a49e6 100755 --- a/footnotes.php +++ b/footnotes.php @@ -7,7 +7,7 @@ * Package V.: 2.5.11d2 * Version: 2.5.10 * CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION. - * Author URI: http://cheret.de/plugins/footnotes-2/ + * Author URI: https://cheret.org/footnotes/ * Text Domain: footnotes * Domain Path: /languages * diff --git a/js/wysiwyg-editor.js b/js/wysiwyg-editor.js index 0e24e36..8eff23f 100644 --- a/js/wysiwyg-editor.js +++ b/js/wysiwyg-editor.js @@ -67,9 +67,9 @@ return { longname : 'Inserts the Footnotes short code.', author : 'Mark Cheret', - authorurl : 'https://cheret.de', + authorurl : 'https://cheret.org/footnotes/', infourl : 'https://wordpress.org/plugins/footnotes/', - version : "2.1.6" + version : "2.5.10" }; } }); From 0a34e96450a909c103991020603376b44e665bf2 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 17 Mar 2021 17:46:21 +0000 Subject: [PATCH 098/144] Add release helper script (#64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds a release helper script, amongst other workflow improvements. See `README.md` for instructions, and `_tools/release.sh` for the script itself. This script: 1. sanity-checks the various version tags; 2. triggers a Plugin build; 3. flags the new version as pre-release; 4. tags the version in Git; 5. creates a local working copy of the SVN repo; 6. copies the new release to the local `trunk/` (whilst keeping the ‘Stable Tag’ field in `readme.txt` pointing to the previous stable version); 7. copies the commit message from the changelog in `readme.txt`; and 8. (if a flag is set) commits the changes to the remote `trunk/`. Pushing out a new release must still be done manually, once `trunk/` is tested and working. To do so, check out a local copy of `trunk/` and: 1. update the ‘Stable Tag’ field in `trunk/readme.txt` to the new version; 2. update the ‘Version’ field in the comment header of `trunk/footnotes.php` to the new version; 3. remove the ‘p’ from the end of the ‘version’ tag in the `getInfo()` function at the bottom of `js/wsiwyg-editor.js`; 4. copy a new tag for the release from `trunk/` (`svn cp trunk tags/`); and 5. commit your changes (`svn ci -m "Release version "`). The WP Plugin Directory will automatically parse the ‘Stable Tag’ field in `trunk/readme.txt`, and inform users that a new version is available. At various stages user input is required to validate information. This is not ready for automation with GitHub Actions, but is a useful step on the way — see [this piece](https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/) for more info. Unless a `-c` flag is passed (e.g., by running `composer run release:commit`) no changes will take place on the remote SVN repo. If you want to test this out on a branch other than `main`, uncomment lines 31 & 52 of the script. Version checking enforces the versioning rules stated [here](https://github.com/markcheret/footnotes/wiki/Versioning). **NB: I have not tested the `-c` mode yet, as I wanted people will more familiarity with the SVN to have a look at it before I risked making any changes and blowing everything up.** Co-authored-by: pewgeuges <73141620+pewgeuges@users.noreply.github.com> --- .gitignore | 1 + README.md | 29 +- _tools/build-stylesheets.sh | 48 +- _tools/build.sh | 30 +- _tools/release.sh | 246 ++ class/dashboard/layout.php | 22 +- class/init.php | 48 +- composer.json | 10 +- composer.lock | 4917 ++++++++++++++++++++- css/{ => tmp}/footnotes-alttbrpl0.min.css | 0 css/{ => tmp}/footnotes-alttbrpl1.min.css | 0 css/{ => tmp}/footnotes-alttbrpl2.min.css | 0 css/{ => tmp}/footnotes-alttbrpl3.min.css | 0 css/{ => tmp}/footnotes-jqttbrpl0.min.css | 0 css/{ => tmp}/footnotes-jqttbrpl1.min.css | 0 css/{ => tmp}/footnotes-jqttbrpl2.min.css | 0 css/{ => tmp}/footnotes-jqttbrpl3.min.css | 0 css/{ => tmp}/footnotes-nottbrpl0.min.css | 0 css/{ => tmp}/footnotes-nottbrpl1.min.css | 0 css/{ => tmp}/footnotes-nottbrpl2.min.css | 0 css/{ => tmp}/footnotes-nottbrpl3.min.css | 0 css/{ => tmp}/settings.min.css | 0 footnotes.php | 17 +- js/wysiwyg-editor.js | 2 +- readme.txt | 17 +- 25 files changed, 5310 insertions(+), 77 deletions(-) create mode 100755 _tools/release.sh rename css/{ => tmp}/footnotes-alttbrpl0.min.css (100%) rename css/{ => tmp}/footnotes-alttbrpl1.min.css (100%) rename css/{ => tmp}/footnotes-alttbrpl2.min.css (100%) rename css/{ => tmp}/footnotes-alttbrpl3.min.css (100%) rename css/{ => tmp}/footnotes-jqttbrpl0.min.css (100%) rename css/{ => tmp}/footnotes-jqttbrpl1.min.css (100%) rename css/{ => tmp}/footnotes-jqttbrpl2.min.css (100%) rename css/{ => tmp}/footnotes-jqttbrpl3.min.css (100%) rename css/{ => tmp}/footnotes-nottbrpl0.min.css (100%) rename css/{ => tmp}/footnotes-nottbrpl1.min.css (100%) rename css/{ => tmp}/footnotes-nottbrpl2.min.css (100%) rename css/{ => tmp}/footnotes-nottbrpl3.min.css (100%) rename css/{ => tmp}/settings.min.css (100%) diff --git a/.gitignore b/.gitignore index 494168f..64eb6cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .phpdoc/ vendor/ dist/ +tmp/ *.bak authors.txt diff --git a/README.md b/README.md index e24b6ac..99d11c2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Description -Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks! +Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) — cheers for the review, folks! **footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. @@ -14,21 +14,19 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor 1. Read the contributing guidelines 1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) - - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment + - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your local testing environment 1. Install [Composer](https://getcomposer.org/download/), if you don't have it already 1. Install dependencies (`composer install`) -1. Create a new branch from `main` (`git checkout -b `) -1. When you're finished, commit your changes to the remote version of your branch - and submit a [pull request](https://github.com/markcheret/footnotes/pulls). + - You will have to install `php-mbstring` manually if you do not already have it. -## Checking WP Coding Standard Compliance +## Code Formatting -1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p `) -1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p `) - - Add the `-n` flag to ignore warnings (i.e., show only errors) - - Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code) - - You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php` - - You may have to enable double-wildcards in your console first (`shopt -s globstar`) +1. Run `composer run lint-php` to lint all PHP files +1. Run `composer run lint-php:fix` to attempt to automatically fix errors and warnings + +## Releasing + +1. Run `composer run release` ## Building @@ -44,8 +42,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor ## Updating Documentation -1. Install [phpDocumentor](https://phpdoc.org/) -1. Run it (`phpDocumentor -d . -t docs`) +1. Run `composer run docs` ## Testing @@ -66,8 +63,8 @@ Unit tests are TODO. These are a few examples of possible ways to delimit footnotes: -1. Your awesome text((with an awesome footnote)) -2. Your awesome text[ref]with an awesome footnote[/ref] +1. Your awesome text`((`with an awesome footnote`))` +2. Your awesome text`[ref]`with an awesome footnote`[/ref]` 3. Your awesome text``with an awesome footnote`` 4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` diff --git a/_tools/build-stylesheets.sh b/_tools/build-stylesheets.sh index 146db4e..2d14f33 100755 --- a/_tools/build-stylesheets.sh +++ b/_tools/build-stylesheets.sh @@ -14,7 +14,8 @@ echo "Running $(dirname "$0")/build-stylesheets.sh" if [[ $1 == "-c" ]]; then - echo "Concatenating files and placing in \`css/tmp/\`." + echo "Concatenating files and placing in \`css/tmp/\`..." + mkdir -p ./css/tmp cat ./css/dev-common.css > ./css/tmp/footnotes-nottbrpl0.css cat ./css/dev-{common,layout-reference-container}.css > ./css/tmp/footnotes-nottbrpl1.css @@ -29,7 +30,9 @@ if [[ $1 == "-c" ]]; then cat ./css/dev-{common,tooltips,tooltips-alternative,layout-entry-content}.css > ./css/tmp/footnotes-alttbrpl2.css cat ./css/dev-{common,tooltips,tooltips-alternative,layout-main-content}.css > ./css/tmp/footnotes-alttbrpl3.css cat ./css/settings.css > ./css/tmp/settings.css - echo "Done." + + echo "Stylesheet concatenation complete." + exit 0 elif [[ $1 == "-m" ]]; then @@ -39,30 +42,39 @@ elif [[ $1 == "-m" ]]; then # `rmdir`, which will throw us an error if we have any minified files that # haven't been moved over to `dist/css/` for whatever reason. As it currently # stands, we have no error checking in place. - echo "Minifying files (TODO)..." - mkdir -p ./dist/css - for f in ./css/tmp/*.css; do - filename=$(basename $f .css) - echo $filename - # TODO: automated minification - echo $filename Done - done - echo "Done." + echo "Please minify the stylesheets in \`css/tmp/\`, saving them in the same location with the \`.min.css\` file extension." + read -p "Are you ready to continue? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 + exit 0 elif [[ $1 == "-d" ]]; then - echo "Deploying minified files to \`dist/css/\`..." + # NOTE: I've temporarily replaced the `mv` command + # with `cp` and disabled the `rm` command, so the minified + # files won't be removed from the source directory. + echo "Deploying minified stylesheets to \`dist/css/\`..." rm -r ./dist mkdir -p ./dist/css for f in ./css/tmp/*.min.css; do filename=$(basename $f .css) - echo Moving $filename - mv $f ./dist/css - echo $filename Moved + cp $f ./dist/css + #mv $f ./dist/css + echo -e '\t' $filename".css moved." done - echo "Deleting temporary files..." - rm -r ./css/tmp - echo "Done." + + # NB: We currently distribute both the minified + concatenated and the + # unminified + unconcatenated stylesheets with the Plugin. + echo "Deploying development stylesheets to \`dist/css/\`..." + for f in ./css/dev-*.css; do + filename=$(basename $f .css) + cp $f ./dist/css + #mv $f ./dist/css + echo -e '\t' $filename".css moved." + done + + #echo "Deleting temporary files..." + #rm -r ./css/tmp + echo "All stylesheets added to build." + exit 0 else diff --git a/_tools/build.sh b/_tools/build.sh index 13a7def..e4b908b 100755 --- a/_tools/build.sh +++ b/_tools/build.sh @@ -1,9 +1,31 @@ -#!/bin/sh +#!/bin/bash -# Moves everything except the stylesheets over to `dist/` +echo "Building Plugin..." + +# Moves everything including the style sheets over to `dist/` +echo "Copying directories..." +cp -r -t dist class/ css/ js/ languages/ templates/ +# Among the images, only 2 out of 3 are distributed. +echo "Copying the needed images..." +mkdir dist/img +cp -t dist/img img/fn-wysiwyg.png img/main-menu.png +echo "Copying files..." +cp -t dist features.txt license.txt readme.txt includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md +echo "Setting production flag..." +sed "s/'C_BOOL_CSS_PRODUCTION_MODE', false/'C_BOOL_CSS_PRODUCTION_MODE', true/g" footnotes.php > dist/footnotes.php +echo "Production flag set." -cp -r -t dist class/ js/ img/ languages/ templates/ -cp -t dist features.txt license.txt readme.txt footnotes.php includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md # TODO: once automatic minification is implemented, this should handle that. # For now, we shall have to assume that this command is being run on a repo. with # minimised stylesheet files already in `dist/css/`. +echo "Building stylesheets..." +./_tools/build-stylesheets.sh -c +if [ $? != 0 ]; then echo "Concatenation failed!"; exit 1; fi +./_tools/build-stylesheets.sh -m +if [ $? != 0 ]; then echo "Minification failed!"; exit 1; fi +./_tools/build-stylesheets.sh -d +if [ $? != 0 ]; then echo "Deployment failed!"; exit 1; fi +echo "Stylesheet build complete." + +echo "Build complete." +exit 0 diff --git a/_tools/release.sh b/_tools/release.sh new file mode 100755 index 0000000..11d74f0 --- /dev/null +++ b/_tools/release.sh @@ -0,0 +1,246 @@ +#!/bin/bash + +# This is a release helper script aimed at walking maintainers through the +# process of issuing new releases of the Plugin, both to reduce the risk of +# procedural errors and to provide a framework for future incremental +# automation. +# +# Step 1: Ensure the local copy has checked out the `main` branch +# Step 2: Ensure local copy of `main` is up-to-date with remote +# Step 3: Check versioning +# Step 3(a): Get all version declarations +# Step 3(b): Check that all version declarations exists +# Step 3(c)(1): Check that all development versions match +# Step 3(c)(2): Check that all stable versions match +# Step 3(d): Check that the development version is correctly flagged as such +# Step 3(e): Check that the 'Stable Tag' field is set to a stable version +# Step 3(f): Check that the 'Stable Tag' field points to a real tag on the SVN repo. +# Step 3(g): Check that the changelog is up-to-date +# Step 4: Build the Plugin +# Step 5: Update the version to pre-release +# Step 6: Tag the release + +echo "Welcome to the footnotes release helper!" +echo "========================================" + +if [[ $1 == "-c" ]]; then + read -p "You have passed the \`commit\` flag (\`-c\`). Did you mean to do this? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 +fi + +# NB: To run on a branch other than `main`, uncomment this line: +#if false; then + +# Step 1: Ensure the local copy has checked out the `main` branch + +if [[ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]]; then + echo "ERR: You are not on the \`main\` branch, please check it out and re-run this command." + exit 1 +else + echo "- \`main\` branch is checked out." +fi + +# Step 2: Ensure local copy of `main` is up-to-date with remote + +if [[ "$(git status | grep -c 'Your branch is up to date')" != 1 ]]; then + echo "ERR: Your local copy is not up-to-date with the remote, please update it and re-run this command." + exit 1 +else + echo "- Local copy of \`main\` is up-to-date with remote." +fi + +# NB: To run on a branch other than `main`, uncomment this line: +#fi + +# Step 3: Check versioning + +# Step 3(a): Get all version declarations + +# NOTE: I'm not sure why, but if you try to get the root header +# version without piping it through the second `grep` command, +# you'll end up with a list of files before the version +# declaration. + +echo "- Checking versions..." + +STABLE_TAG="$(grep "Stable Tag:" readme.txt)" +ROOT_HEADER_VERSION="$(grep " Version:" footnotes.php | grep -Po " Version: \d+\.\d+(\.\d+)?[a-z]?$")" +JS_VERSION="$(grep "version :" js/wysiwyg-editor.js)" + +# Step 3(b): Check that all version declarations exists + +if [[ -z $STABLE_TAG ]]; then + echo "ERR: No 'Stable Tag' field found in \`readme.txt\`!" + exit 1 +else echo "- 'Stable Tag' field set in \`readme.txt\`." +fi +if [[ -z $ROOT_HEADER_VERSION ]]; then + echo "ERR: No 'Version' field found in \`footnotes.php\` file header!" + exit 1 +else echo "- 'Version' field set in \`footnotes.php\` file header." +fi +if [[ -z $JS_VERSION ]]; then + echo "ERR: No \`version\` variable found in \`js/wysiwyg-editor.js\`!" + exit 1 +else echo "- \`version\` variable set in \`js/wysiwyg-editor.js\`." +fi + +# Step 3(c)(1): Check that all development versions match +# NB: This doesn't currently do anything as there is only one place where the +# development version is listed. + +if [[ "$(echo $JS_VERSION | grep -Poc '\d+\.\d+(\.\d+)?')" != 1 ]]; then + echo "ERR: Development version mismatch!" + echo -e "The following versions were found:\n" + echo -e '\t' $JS_VERSION '\n' + echo "Please ensure that all development versions match and re-run this command." + exit 1 +else echo "- Development versions match." +fi + +# Step 3(c)(2): Check that all stable versions match + +if [[ "$(echo $ROOT_HEADER_VERSION $STABLE_TAG | grep -Poc '\d+\.\d+(\.\d+)?')" != 1 ]]; then + echo "ERR: Stable version mismatch!" + echo -e "The following versions were found:\n" + echo -e '\t' $ROOT_HEADER_VERSION + echo -e '\t' $STABLE_TAG '\n' + echo "Please ensure that all stable versions match and re-run this command." + exit 1 +else echo "- Stable versions match." +fi + +# Step 3(d): Check that the development version is correctly flagged as such + +if [[ "$(echo $JS_VERSION | grep -Poc '\d+d')" != 1 ]]; then + echo "ERR: Development version flag not set!" + echo -e "The following version was found:\n" + echo -e '\t' $JS_VERSION '\n' + echo "Please ensure that the development flag ('d') is set and re-run this command." + exit 1 +else echo "- Development version flag is set." +fi + +DEVELOPMENT_VERSION="$(echo $JS_VERSION | grep -Po '\d+\.\d+(\.\d+)?')" + +echo -e "- Development version:" $DEVELOPMENT_VERSION + +# Step 3(e): Check that the 'Stable Tag' field is set to a stable version + +if [[ "$(echo $STABLE_TAG | grep -Poc '\d+\.\d+(\.\d+)?$')" != 1 ]]; then + echo "ERR: 'Stable Tag' not set to a stable version!" + echo -e "The 'Stable Tag' field is set to the following:\n" + echo -e '\t' $STABLE_TAG '\n' + echo "Please ensure that the 'Stable Tag' field is set to a stable version and re-run this command." + exit 1 +else echo "- 'Stable Tag' field set to stable version." +fi + +STABLE_VERSION="$(echo $STABLE_TAG | grep -Po '\d+\.\d+(\.\d+)?$')" + +echo "- Stable version:" $STABLE_VERSION + +# Step 3(f): Check that the 'Stable Tag' field points to a real tag on the SVN repo. + +echo "- Checking stable tag exists..." +git svn tag --dry-run $STABLE_VERSION &>/dev/null + +if [ $? -ne 1 ]; then + echo "ERR: 'Stable Tag' does not point to an existing tag!" + echo "Please ensure that the 'Stable Tag' field points to an existing stable version and re-run this command." + exit 1 +else echo "- 'Stable Tag' field is set to existing tag." +fi + +# Step 3(g): Check that the changelog is up-to-date + +CHANGELOG_LATEST="$(awk -e '/== Changelog ==/,/= [0-9]+\.[0-9]+(\.[0-9]+)? =/' readme.txt | grep -Po '\d+\.\d+(\.\d+)?')" +if [[ $CHANGELOG_LATEST != $DEVELOPMENT_VERSION ]]; then + echo "ERR: Changelog is not up-to-date!" + echo "Current version is $DEVELOPMENT_VERSION" + echo "Latest version in changelog is $CHANGELOG_LATEST" + echo "Please ensure that the changelog is up-to-date and re-run this command." + exit 1 +else echo "- Changelog is up-to-date." +fi + +echo -e "- Version check complete.\n" + +# Step 4: Build the Plugin + +echo "- Building Plugin..." +composer run build +if [ $? != 0 ]; then echo "Build failed!"; exit 1; fi +echo -e "- Build complete.\n" + +# Step 5: Update the version to pre-release + +echo "- Setting pre-release version flags..." +PRERELEASE_VERSION=$DEVELOPMENT_VERSION'p' +sed -i "s/$JS_VERSION/version : \"$PRERELEASE_VERSION\"/g" dist/js/wysiwyg-editor.js +echo "- Pre-release flags set." + +# Step 6: Tag the release + +echo "- Tagging release..." +git tag -a $DEVELOPMENT_VERSION -m "Pre-release of version $DEVELOPMENT_VERSION" +git push --tags +echo "- Release tagged." + +# Step 7: Push release to SVN repo. + +# Step 7(a): Create a new local copy of the SVN repo. + +echo -e "\nThe helper will now guide you through the steps to push the new release to the WordPress Plugin Directory SVN repository." +echo "For the time being, this part of the process shall remain (mostly) manual." +read -p "Are you ready to continue? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 + +echo "Creating local copy of SVN repo..." +svn checkout https://plugins.svn.wordpress.org/footnotes tmp --depth immediates +svn update --quiet tmp/trunk --set-depth infinity +svn update --quiet tmp/tags/$PRERELEASE_VERSION --set-depth infinity +echo -e "Local copy created.\n" + +# Step 7(b): Update `trunk/` +echo -e "Copying files from \`dist/\` to SVN \`trunk/\`...\n" +rsync -avhic dist/ tmp/trunk/ --delete | grep -v "^\." +read -p "Does the above list of changes look correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 +echo -e "Copying complete.\n" + +# Step 7(c): Set a release message + +echo "Getting commit message from changelog..." +CHANGELOG_MESSAGE="$(awk -e "/= $DEVELOPMENT_VERSION =/,/= $STABLE_VERSION =/" readme.txt | grep '^-')" +echo -e "The changelog message for this version is:\n" +echo -e "$CHANGELOG_MESSAGE\n" +read -p "Is this correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 +echo -e "Commit message set.\n" + +# Step 7(d): Review + +clear +echo "Let's review before pushing to the SVN..." +echo -e "Here is my current state:\n" +echo "Current version:" +echo -e '\t' $PRERELEASE_VERSION +echo "Stable version:" +echo -e '\t' $STABLE_VERSION '\n' +echo "Commit message:\n" +echo -e "$CHANGELOG_MESSAGE" '\n' +echo -e "Changes made to local \`trunk/\`:\n" +svn stat tmp/trunk/ +echo "" +echo -e "\`readme.txt\` header:\n" +head tmp/trunk/readme.txt +echo "" +read -p "Is this all correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1 + +# Step 7(d): Push to remote `trunk/` (provided the flag is set) + +if [[ $1 == "-c" ]]; then + svn ci -m "$CHANGELOG_MESSAGE" +else echo "- Commit flag not set, skipping commit step." +fi + +# Step 8: Cleanup + +rm -rf {dist/,tmp/} diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 6e48570..668453a 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -213,11 +213,29 @@ abstract class MCI_Footnotes_Layout_Engine { */ if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_PACKAGE_VERSION ); + wp_register_style( + 'mci-footnotes-admin', + plugins_url( 'footnotes/css/settings.min.css' ), + array(), + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/settings.min.css' + ) + ); } else { - wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_PACKAGE_VERSION ); + wp_register_style( + 'mci-footnotes-admin', + plugins_url( 'footnotes/css/settings.css' ), + array(), + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/settings.css' + ) + ); } diff --git a/class/init.php b/class/init.php index 94daec1..b90fd66 100644 --- a/class/init.php +++ b/class/init.php @@ -304,9 +304,6 @@ class MCI_Footnotes { * @since 2.0.3 add versioning of public.css for cache busting. * @date 2020-10-29T1413+0100 * Plugin version number is needed for busting browser caches after each plugin update. - * @since 2.1.4 automate passing version number for cache busting. - * @date 2020-11-30T0646+0100 - * The constant C_STR_PACKAGE_VERSION is defined at start of footnotes.php. * * The media scope argument 'all' is the default. * No need to use '-css' in the handle, as this is appended automatically. @@ -350,7 +347,11 @@ class MCI_Footnotes { MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' ), array(), - C_STR_PACKAGE_VERSION, + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' + ), 'all' ); @@ -364,9 +365,36 @@ class MCI_Footnotes { * * This optional layout fix is useful by lack of layout support. */ - wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_PACKAGE_VERSION ); - wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_PACKAGE_VERSION ); - wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_PACKAGE_VERSION ); + wp_enqueue_style( + 'mci-footnotes-common', + plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), + array(), + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/dev-common.css' + ) + ); + wp_enqueue_style( + 'mci-footnotes-tooltips', + plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), + array(), + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/dev-tooltips.css' + ) + ); + wp_enqueue_style( + 'mci-footnotes-alternative', + plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), + array(), + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/dev-tooltips-alternative.css' + ) + ); $l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT ); if ( 'none' !== $l_str_page_layout_option ) { @@ -376,7 +404,11 @@ class MCI_Footnotes { MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css' ), array(), - C_STR_PACKAGE_VERSION, + filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/dev-layout-' . $l_str_page_layout_option . '.css' + ), 'all' ); } diff --git a/composer.json b/composer.json index 27eab43..134107f 100644 --- a/composer.json +++ b/composer.json @@ -3,11 +3,19 @@ "description": "footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.", "license": "GPL-3.0-or-later", "scripts": { + "release": "./_tools/release.sh", + "release:commit": "composer run release -- -c", "build": "./_tools/build.sh", + "lint-php": "./vendor/bin/phpcs --standard='WordPress' --colors --encoding=utf-8 -n -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", + "lint-php:fix": "./vendor/bin/phpcbf --standard='WordPress' --encoding=utf-8 -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", + "lint-css": "echo TODO", + "lint-js": "echo TODO", + "docs": "./vendor/bin/phpdoc -d . -t ./docs --ignore vendor/", "post-install-cmd": "./_tools/setup.sh" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", - "wp-coding-standards/wpcs": "^2.3" + "wp-coding-standards/wpcs": "^2.3", + "phpdocumentor/phpdocumentor": "^3.0" } } diff --git a/composer.lock b/composer.lock index ceae236..4f48f1b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,82 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0d4821c9dd1b0f00e1204cc22488f77f", + "content-hash": "96b80176526406b01227fcaef2a4c2fc", "packages": [], "packages-dev": [ + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-11T10:22:58+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.1", @@ -77,6 +150,2119 @@ }, "time": "2020-12-07T18:04:37+00:00" }, + { + "name": "doctrine/event-manager", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, + { + "name": "friendsofphp/proxy-manager-lts", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "shasum": "" + }, + "require": { + "laminas/laminas-code": "~3.4.1|^4.0", + "php": ">=7.1", + "symfony/filesystem": "^4.4.17|^5.0" + }, + "conflict": { + "laminas/laminas-stdlib": "<3.2.1", + "zendframework/zend-stdlib": "<3.2.1" + }, + "replace": { + "ocramius/proxy-manager": "^2.1" + }, + "require-dev": { + "ext-phar": "*", + "symfony/phpunit-bridge": "^5.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "ocramius/proxy-manager", + "url": "https://github.com/Ocramius/ProxyManager" + } + }, + "autoload": { + "psr-4": { + "ProxyManager\\": "src/ProxyManager" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.io/" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", + "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", + "keywords": [ + "aop", + "lazy loading", + "proxy", + "proxy pattern", + "service proxies" + ], + "support": { + "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.3" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", + "type": "tidelift" + } + ], + "time": "2021-01-14T21:52:44+00:00" + }, + { + "name": "jawira/plantuml", + "version": "v1.52.0", + "source": { + "type": "git", + "url": "https://github.com/jawira/plantuml.git", + "reference": "297a2845de839d1289f6d1805a30fe0ebed1c23a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jawira/plantuml/zipball/297a2845de839d1289f6d1805a30fe0ebed1c23a", + "reference": "297a2845de839d1289f6d1805a30fe0ebed1c23a", + "shasum": "" + }, + "suggest": { + "pds/skeleton": "Standard PHP package skeleton", + "phing/phing": "PHP Build Tool" + }, + "bin": [ + "bin/plantuml" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "Jawira Portugal" + } + ], + "description": "Provides PlantUML integration: plantuml executable and plantuml.jar", + "keywords": [ + "diagram", + "plantuml", + "plantuml.jar", + "uml" + ], + "support": { + "issues": "https://github.com/jawira/plantuml/issues", + "source": "https://github.com/jawira/plantuml/tree/v1.52.0" + }, + "time": "2021-03-12T14:07:11+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laminas/laminas-code", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-code.git", + "reference": "28a6d70ea8b8bca687d7163300e611ae33baf82a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/28a6d70ea8b8bca687d7163300e611ae33baf82a", + "reference": "28a6d70ea8b8bca687d7163300e611ae33baf82a", + "shasum": "" + }, + "require": { + "laminas/laminas-eventmanager": "^3.3", + "php": "^7.4 || ~8.0.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "replace": { + "zendframework/zend-code": "self.version" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "ext-phar": "*", + "laminas/laminas-coding-standard": "^2.1.4", + "laminas/laminas-stdlib": "^3.3.0", + "phpunit/phpunit": "^9.4.2", + "psalm/plugin-phpunit": "^0.14.0", + "vimeo/psalm": "^4.3.1" + }, + "suggest": { + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", + "laminas/laminas-stdlib": "Laminas\\Stdlib component", + "laminas/laminas-zendframework-bridge": "A bridge with Zend Framework" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Code\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", + "homepage": "https://laminas.dev", + "keywords": [ + "code", + "laminas", + "laminasframework" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-code/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-code/issues", + "rss": "https://github.com/laminas/laminas-code/releases.atom", + "source": "https://github.com/laminas/laminas-code" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-12-30T16:16:14+00:00" + }, + { + "name": "laminas/laminas-eventmanager", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-eventmanager.git", + "reference": "966c859b67867b179fde1eff0cd38df51472ce4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/966c859b67867b179fde1eff0cd38df51472ce4a", + "reference": "966c859b67867b179fde1eff0cd38df51472ce4a", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ^8.0" + }, + "replace": { + "zendframework/zend-eventmanager": "^3.2.1" + }, + "require-dev": { + "container-interop/container-interop": "^1.1", + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0", + "phpbench/phpbench": "^0.17.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "container-interop/container-interop": "^1.1, to use the lazy listeners feature", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://laminas.dev", + "keywords": [ + "event", + "eventmanager", + "events", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-eventmanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-eventmanager/issues", + "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", + "source": "https://github.com/laminas/laminas-eventmanager" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-03-08T15:24:29+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-02-25T21:54:58+00:00" + }, + { + "name": "league/commonmark", + "version": "1.5.7", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/11df9b36fd4f1d2b727a73bf14931d81373b9a54", + "reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.2", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" + }, + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2020-10-31T13:49:32+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.x" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2020-08-23T07:39:11+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2021-01-18T20:58:21+00:00" + }, + { + "name": "league/pipeline", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/pipeline.git", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/pipeline/zipball/aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "leanphp/phpspec-code-coverage": "^4.2", + "phpspec/phpspec": "^4.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net", + "role": "Author" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "role": "Maintainer" + } + ], + "description": "A plug and play pipeline implementation.", + "keywords": [ + "composition", + "design pattern", + "pattern", + "pipeline", + "sequential" + ], + "support": { + "issues": "https://github.com/thephpleague/pipeline/issues", + "source": "https://github.com/thephpleague/pipeline/tree/master" + }, + "time": "2018-06-05T21:06:51+00:00" + }, + { + "name": "league/tactician", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician.git", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician/zipball/e79f763170f3d5922ec29e85cffca0bac5cd8975", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^9.3.8", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck", + "homepage": "http://tactician.thephpleague.com" + } + ], + "description": "A small, flexible command bus. Handy for building service layers.", + "keywords": [ + "command", + "command bus", + "service layer" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician/issues", + "source": "https://github.com/thephpleague/tactician/tree/v1.1.0" + }, + "time": "2021-02-14T15:29:04+00:00" + }, + { + "name": "league/tactician-bundle", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-bundle.git", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-bundle/zipball/89c51277423ac485b62580c38322426c3ec6ad47", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "league/tactician-container": "^2.0", + "league/tactician-logger": "^0.10.0", + "php": ">=7.2", + "symfony/config": "^3.4|^4.4|^5.0", + "symfony/dependency-injection": "^3.4|^4.4|^5.0", + "symfony/http-kernel": "^3.4|^4.4|^5.0", + "symfony/yaml": "^3.4|^4.4|^5.0" + }, + "require-dev": { + "matthiasnoback/symfony-config-test": "^4.2.1", + "matthiasnoback/symfony-dependency-injection-test": "^4.2.1", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~8.5", + "symfony/console": "^3.4|^4.4|^5.0", + "symfony/framework-bundle": "^3.4.31|^4.4|^5.0", + "symfony/security-bundle": "^3.4|^4.4|^5.0", + "symfony/security-core": "^3.4|^4.4|^5.0", + "symfony/validator": "^3.4|^4.4|^5.0" + }, + "suggest": { + "league/tactician-doctrine": "For doctrine transaction middleware", + "symfony/console": "For debugging command-to-handler routing using the tactician:debug console command", + "symfony/security": "For command security middleware", + "symfony/validator": "For command validator middleware" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\Bundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rafael Dohms", + "homepage": "http://doh.ms" + }, + { + "name": "Richard Tuin", + "homepage": "http://www.rtuin.nl/" + }, + { + "name": "Xander Smalbil", + "email": "xander@videofunk.nl" + }, + { + "name": "Ross Tuck", + "email": "me@rosstuck.com" + } + ], + "description": "Bundle to integrate Tactician with Symfony projects", + "keywords": [ + "bundle", + "symfony", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-bundle/issues", + "source": "https://github.com/thephpleague/tactician-bundle/tree/v1.3.0" + }, + "time": "2021-01-31T17:06:29+00:00" + }, + { + "name": "league/tactician-container", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-container.git", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-container/zipball/d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5", + "psr/container": "^1.0" + }, + "require-dev": { + "league/container": "~2.3", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nigel Greenway", + "homepage": "http://futurepixels.co.uk" + } + ], + "description": "Tactician integration for any container implementing PSR-11", + "keywords": [ + "container", + "container-interop", + "di", + "interoperable", + "league", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-container/issues", + "source": "https://github.com/thephpleague/tactician-container/tree/master" + }, + "time": "2017-04-13T06:27:12+00:00" + }, + { + "name": "league/tactician-logger", + "version": "v0.10.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-logger.git", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-logger/zipball/3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5.0", + "psr/log": "~1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9", + "phpunit/phpunit": "4.*", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Logger\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck" + } + ], + "description": "Adds PSR-3 logging support to the Tactician command bus", + "homepage": "https://github.com/thephpleague/tactician-logger", + "keywords": [ + "log", + "logging", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-logger/issues", + "source": "https://github.com/thephpleague/tactician-logger/tree/master" + }, + "time": "2016-08-23T05:50:38+00:00" + }, + { + "name": "league/uri", + "version": "6.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "09da64118eaf4c5d52f9923a1e6a5be1da52fd9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/09da64118eaf4c5d52f9923a1e6a5be1da52fd9a", + "reference": "09da64118eaf4c5d52f9923a1e6a5be1da52fd9a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.1", + "php": ">=7.2", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^8.0 || ^9.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "http://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.4.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2020-11-22T14:29:11+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "667f150e589d65d79c89ffe662e426704f84224f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/667f150e589d65d79c89ffe662e426704f84224f", + "reference": "667f150e589d65d79c89ffe662e426704f84224f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2020-10-31T13:45:51+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7", + "graylog2/gelf-php": "^1.4.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.59", + "phpunit/phpunit": "^8.5", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3", + "ruflin/elastica": ">=0.90 <7.0.1", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-12-14T13:15:25+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" + }, + { + "name": "phpdocumentor/flyfinder", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/FlyFinder.git", + "reference": "0443e747872cc4a4d8f4b830d16a0357c14df7a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/FlyFinder/zipball/0443e747872cc4a4d8f4b830d16a0357c14df7a6", + "reference": "0443e747872cc4a4d8f4b830d16a0357c14df7a6", + "shasum": "" + }, + "require": { + "league/flysystem": "^1.0", + "php": "^7.2" + }, + "require-dev": { + "league/flysystem-memory": "~1", + "mockery/mockery": "^1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Flyfinder\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Flysystem plugin to add file finding capabilities to the Filesystem entity", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "Flysystem", + "phpdoc" + ], + "support": { + "issues": "https://github.com/phpDocumentor/FlyFinder/issues", + "source": "https://github.com/phpDocumentor/FlyFinder/tree/1.0.0" + }, + "time": "2020-03-13T14:02:28+00:00" + }, + { + "name": "phpdocumentor/graphviz", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/GraphViz.git", + "reference": "929e97b4ab6765fc4eb2f944b091a4a02807ee5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/929e97b4ab6765fc4eb2f944b091a4a02807ee5d", + "reference": "929e97b4ab6765fc4eb2f944b091a4a02807ee5d", + "shasum": "" + }, + "require": { + "php": "^7.2 || 8.0.*" + }, + "require-dev": { + "ext-simplexml": "*", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.2 || ^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\GraphViz\\": "src/phpDocumentor/GraphViz", + "phpDocumentor\\GraphViz\\PHPStan\\": "./src/phpDocumentor/PHPStan" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "Wrapper for Graphviz", + "support": { + "issues": "https://github.com/phpDocumentor/GraphViz/issues", + "source": "https://github.com/phpDocumentor/GraphViz/tree/2.0.0" + }, + "time": "2021-02-02T20:48:43+00:00" + }, + { + "name": "phpdocumentor/phpdocumentor", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/phpDocumentor.git", + "reference": "405da431bdc7ca02512cb6aa15f4ed43ffca8175" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor/zipball/405da431bdc7ca02512cb6aa15f4ed43ffca8175", + "reference": "405da431bdc7ca02512cb6aa15f4ed43ffca8175", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1.1", + "ext-ctype": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "jawira/plantuml": "^1.27", + "jean85/pretty-package-versions": "^1.2", + "league/commonmark": "^1.5", + "league/flysystem": "^1.0", + "league/pipeline": "^1.0", + "league/tactician": "^1.0", + "league/tactician-bundle": "^1.2", + "league/uri": "^6.0", + "league/uri-interfaces": "^2.0", + "php": ">=7.2.5", + "phpdocumentor/flyfinder": "^1.0", + "phpdocumentor/graphviz": "^2.0@dev", + "phpdocumentor/reflection": "^4.0", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/reflection-docblock": "^5.0", + "phpdocumentor/type-resolver": "^1.0", + "psr/cache": "^1.0", + "psr/log": "^1.1", + "scrivo/highlight.php": "^9.17", + "symfony/cache": "^5.0", + "symfony/config": "^5.0", + "symfony/console": "^5.0", + "symfony/contracts": "^2.0", + "symfony/dependency-injection": "^5.0", + "symfony/dom-crawler": "5.1.*", + "symfony/dotenv": "^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/expression-language": "^5.0", + "symfony/filesystem": "^5.0", + "symfony/finder": "5.1.*", + "symfony/flex": "^1.3.1", + "symfony/framework-bundle": "^5.0", + "symfony/http-foundation": "^5.0.7", + "symfony/http-kernel": "^5.0.8", + "symfony/monolog-bundle": "^3.0", + "symfony/process": "5.1.*", + "symfony/proxy-manager-bridge": "^5.0", + "symfony/routing": "^5.0", + "symfony/stopwatch": "^5.0", + "symfony/string": "5.1.*", + "symfony/yaml": "^5.0", + "twig/twig": "~2.0", + "webmozart/assert": "^1.3" + }, + "conflict": { + "symfony/symfony": "*" + }, + "replace": { + "paragonie/random_compat": "2.*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php56": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php71": "*", + "symfony/polyfill-php72": "*" + }, + "require-dev": { + "fzaninotto/faker": "^1.9", + "mikey179/vfsstream": "^1.2", + "mockery/mockery": "^1.0" + }, + "bin": [ + "bin/phpdoc.php", + "bin/phpdoc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "symfony": { + "id": "01C32VS9393M1CP9R8TEJMH62G", + "allow-contrib": false, + "require": "^5.0" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Guides\\": "src/Guides/", + "phpDocumentor\\": [ + "src/phpDocumentor/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Documentation Generator for PHP", + "homepage": "https://www.phpdoc.org", + "keywords": [ + "api", + "application", + "dga", + "documentation", + "phpdoc" + ], + "support": { + "issues": "https://github.com/phpDocumentor/phpDocumentor/issues", + "source": "https://github.com/phpDocumentor/phpDocumentor/tree/v3.0.0" + }, + "time": "2020-10-27T20:24:27+00:00" + }, + { + "name": "phpdocumentor/reflection", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Reflection.git", + "reference": "447928a45710d6313e68774cf12b5f730b909baa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/447928a45710d6313e68774cf12b5f730b909baa", + "reference": "447928a45710d6313e68774cf12b5f730b909baa", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.0", + "php": ">=7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/reflection-docblock": "^5", + "phpdocumentor/type-resolver": "^1.0", + "psr/log": "~1.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.2", + "mockery/mockery": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-4.x": "4.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\": "src/phpDocumentor" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Reflection library to do Static Analysis for PHP Projects", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/Reflection/issues", + "source": "https://github.com/phpDocumentor/Reflection/tree/4.x" + }, + "time": "2020-06-19T18:26:14+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "scrivo/highlight.php", + "version": "v9.18.1.6", + "source": { + "type": "git", + "url": "https://github.com/scrivo/highlight.php.git", + "reference": "44a3d4136edb5ad8551590bf90f437db80b2d466" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/44a3d4136edb5ad8551590bf90f437db80b2d466", + "reference": "44a3d4136edb5ad8551590bf90f437db80b2d466", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.7", + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" + }, + "type": "library", + "autoload": { + "psr-0": { + "Highlight\\": "", + "HighlightUtilities\\": "" + }, + "files": [ + "HighlightUtilities/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Geert Bergman", + "homepage": "http://www.scrivo.org/", + "role": "Project Author" + }, + { + "name": "Vladimir Jimenez", + "homepage": "https://allejo.io", + "role": "Maintainer" + }, + { + "name": "Martin Folkers", + "homepage": "https://twobrain.io", + "role": "Contributor" + } + ], + "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", + "keywords": [ + "code", + "highlight", + "highlight.js", + "highlight.php", + "syntax" + ], + "support": { + "issues": "https://github.com/scrivo/highlight.php/issues", + "source": "https://github.com/scrivo/highlight.php" + }, + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2020-12-22T19:20:29+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.5.8", @@ -133,6 +2319,2735 @@ }, "time": "2020-10-23T02:01:07+00:00" }, + { + "name": "symfony/cache", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d", + "reference": "d15fb2576cdbe2c40d7c851e62f85b0faff3dd3d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/cache": "^1.0|^2.0", + "psr/log": "^1.1", + "symfony/cache-contracts": "^1.1.7|^2", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "conflict": { + "doctrine/dbal": "<2.10", + "symfony/dependency-injection": "<4.4", + "symfony/http-kernel": "<4.4", + "symfony/var-dumper": "<4.4" + }, + "provide": { + "psr/cache-implementation": "1.0|2.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0|2.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "^1.6", + "doctrine/dbal": "^2.10|^3.0", + "predis/predis": "^1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/filesystem": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-25T23:54:56+00:00" + }, + { + "name": "symfony/config", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "212d54675bf203ff8aef7d8cee8eecfb72f4a263" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/212d54675bf203ff8aef7d8cee8eecfb72f4a263", + "reference": "212d54675bf203ff8aef7d8cee8eecfb72f4a263", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/finder": "<4.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-23T23:58:19+00:00" + }, + { + "name": "symfony/console", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/938ebbadae1b0a9c9d1ec313f87f9708609f1b79", + "reference": "938ebbadae1b0a9c9d1ec313f87f9708609f1b79", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T13:42:15+00:00" + }, + { + "name": "symfony/contracts", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "f7783bdec14b06c323d30a5f74ba70a17ec0ce81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/f7783bdec14b06c323d30a5f74ba70a17ec0ce81", + "reference": "f7783bdec14b06c323d30a5f74ba70a17ec0ce81", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/cache": "^1.0", + "psr/container": "^1.0", + "psr/event-dispatcher": "^1.0" + }, + "replace": { + "symfony/cache-contracts": "self.version", + "symfony/deprecation-contracts": "self.version", + "symfony/event-dispatcher-contracts": "self.version", + "symfony/http-client-contracts": "self.version", + "symfony/service-contracts": "self.version", + "symfony/translation-contracts": "self.version" + }, + "require-dev": { + "symfony/polyfill-intl-idn": "^1.10" + }, + "suggest": { + "symfony/cache-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-implementation": "", + "symfony/service-implementation": "", + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "files": [ + "Deprecation/function.php" + ], + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/contracts/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-14T17:08:19+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "be0c7926f5729b15e4e79fd2bf917cac584b1970" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/be0c7926f5729b15e4e79fd2bf917cac584b1970", + "reference": "be0c7926f5729b15e4e79fd2bf917cac584b1970", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1.6|^2" + }, + "conflict": { + "symfony/config": "<5.1", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4" + }, + "provide": { + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0|2.0" + }, + "require-dev": { + "symfony/config": "^5.1", + "symfony/expression-language": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-05T20:13:41+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "5d89ceb53ec65e1973a555072fac8ed5ecad3384" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5d89ceb53ec65e1973a555072fac8ed5ecad3384", + "reference": "5d89ceb53ec65e1973a555072fac8ed5ecad3384", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "masterminds/html5": "<2.6" + }, + "require-dev": { + "masterminds/html5": "^2.6", + "symfony/css-selector": "^4.4|^5.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/783f12027c6b40ab0e93d6136d9f642d1d67cd6b", + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1" + }, + "require-dev": { + "symfony/process": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "source": "https://github.com/symfony/dotenv/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "b547d3babcab5c31e01de59ee33e9d9c1421d7d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/b547d3babcab5c31e01de59ee33e9d9c1421d7d0", + "reference": "b547d3babcab5c31e01de59ee33e9d9c1421d7d0", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "^1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/var-dumper": "^4.4|^5.0" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.1", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-11T08:21:20+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "d08d6ec121a425897951900ab692b612a61d6240" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", + "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-18T17:12:37+00:00" + }, + { + "name": "symfony/expression-language", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/expression-language.git", + "reference": "3fc560e62bc5121751b792b11505db03a12cf83c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/3fc560e62bc5121751b792b11505db03a12cf83c", + "reference": "3fc560e62bc5121751b792b11505db03a12cf83c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/cache": "^4.4|^5.0", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ExpressionLanguage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an engine that can compile and evaluate expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/expression-language/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-12T10:38:38+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "710d364200997a5afde34d9fe57bd52f3cc1e108" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/710d364200997a5afde34d9fe57bd52f3cc1e108", + "reference": "710d364200997a5afde34d9fe57bd52f3cc1e108", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-12T10:38:38+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e", + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/flex", + "version": "v1.12.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "e472606b4b3173564f0edbca8f5d32b52fc4f2c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/e472606b4b3173564f0edbca8f5d32b52fc4f2c9", + "reference": "e472606b4b3173564f0edbca8f5d32b52fc4f2c9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=7.1" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "symfony/dotenv": "^4.4|^5.0", + "symfony/filesystem": "^4.4|^5.0", + "symfony/phpunit-bridge": "^4.4|^5.0", + "symfony/process": "^3.4|^4.4|^5.0" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-main": "1.12-dev" + }, + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v1.12.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-16T14:05:05+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "4dae531503072a57cf26f7f4beb4c3ef8a061f8f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/4dae531503072a57cf26f7f4beb4c3ef8a061f8f", + "reference": "4dae531503072a57cf26f7f4beb4c3ef8a061f8f", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "php": ">=7.2.5", + "symfony/cache": "^5.2", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^5.2", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4.1|^5.0.1", + "symfony/event-dispatcher": "^5.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-foundation": "^5.2.1", + "symfony/http-kernel": "^5.2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/routing": "^5.2" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "phpunit/phpunit": "<5.4.3", + "symfony/asset": "<5.1", + "symfony/browser-kit": "<4.4", + "symfony/console": "<5.2.5", + "symfony/dom-crawler": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/form": "<5.2", + "symfony/http-client": "<4.4", + "symfony/lock": "<4.4", + "symfony/mailer": "<5.2", + "symfony/messenger": "<4.4", + "symfony/mime": "<4.4", + "symfony/property-access": "<5.2", + "symfony/property-info": "<4.4", + "symfony/serializer": "<5.2", + "symfony/stopwatch": "<4.4", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<4.4", + "symfony/twig-bundle": "<4.4", + "symfony/validator": "<5.2", + "symfony/web-profiler-bundle": "<4.4", + "symfony/workflow": "<5.2" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "doctrine/cache": "~1.0", + "doctrine/persistence": "^1.3|^2.0", + "paragonie/sodium_compat": "^1.8", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.1", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/console": "^5.2", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/dotenv": "^5.1", + "symfony/expression-language": "^4.4|^5.0", + "symfony/form": "^5.2", + "symfony/http-client": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/mailer": "^5.2", + "symfony/messenger": "^5.2", + "symfony/mime": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^4.4|^5.0", + "symfony/property-info": "^4.4|^5.0", + "symfony/security-bundle": "^5.1", + "symfony/security-core": "^4.4|^5.2", + "symfony/security-csrf": "^4.4|^5.0", + "symfony/security-http": "^4.4|^5.0", + "symfony/serializer": "^5.2", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/string": "^5.0", + "symfony/translation": "^5.0", + "symfony/twig-bundle": "^4.4|^5.0", + "symfony/validator": "^5.2", + "symfony/web-link": "^4.4|^5.0", + "symfony/workflow": "^5.2", + "symfony/yaml": "^4.4|^5.0", + "twig/twig": "^2.10|^3.0" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-09T08:47:49+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/54499baea7f7418bce7b5ec92770fd0799e8e9bf", + "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-25T17:16:57+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "b8c63ef63c2364e174c3b3e0ba0bf83455f97f73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b8c63ef63c2364e174c3b3e0ba0bf83455f97f73", + "reference": "b8c63ef63c2364e174c3b3e0ba0bf83455f97f73", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "~1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/http-client-contracts": "^1.1|^2", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/console": "<4.4", + "symfony/dependency-injection": "<5.1.8", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^5.1.8", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-10T17:07:35+00:00" + }, + { + "name": "symfony/monolog-bridge", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "8a330ab86c4bdf3983b26abf64bf85574edf0d52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/8a330ab86c4bdf3983b26abf64bf85574edf0d52", + "reference": "8a330ab86c4bdf3983b26abf64bf85574edf0d52", + "shasum": "" + }, + "require": { + "monolog/monolog": "^1.25.1|^2", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/console": "<4.4", + "symfony/http-foundation": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/mailer": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/security-core": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.", + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", + "symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler." + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Monolog\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Monolog with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/monolog-bridge/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "e495f5c7e4e672ffef4357d4a4d85f010802f940" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/e495f5c7e4e672ffef4357d4a4d85f010802f940", + "reference": "e495f5c7e4e672ffef4357d4a4d85f010802f940", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.22 || ~2.0", + "php": ">=5.6", + "symfony/config": "~3.4 || ~4.0 || ^5.0", + "symfony/dependency-injection": "~3.4.10 || ^4.0.10 || ^5.0", + "symfony/http-kernel": "~3.4 || ~4.0 || ^5.0", + "symfony/monolog-bridge": "~3.4 || ~4.0 || ^5.0" + }, + "require-dev": { + "symfony/console": "~3.4 || ~4.0 || ^5.0", + "symfony/phpunit-bridge": "^4.4 || ^5.0", + "symfony/yaml": "~3.4 || ~4.0 || ^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony MonologBundle", + "homepage": "http://symfony.com", + "keywords": [ + "log", + "logging" + ], + "support": { + "issues": "https://github.com/symfony/monolog-bundle/issues", + "source": "https://github.com/symfony/monolog-bundle/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-06T15:12:11+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/process", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "d279ae7f2d6e0e4e45f66de7d76006246ae00e4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/d279ae7f2d6e0e4e45f66de7d76006246ae00e4d", + "reference": "d279ae7f2d6e0e4e45f66de7d76006246ae00e4d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/proxy-manager-bridge", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/proxy-manager-bridge.git", + "reference": "fd6bb40190b1719abbe831be09adf38e0744d5f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/fd6bb40190b1719abbe831be09adf38e0744d5f5", + "reference": "fd6bb40190b1719abbe831be09adf38e0744d5f5", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8", + "friendsofphp/proxy-manager-lts": "^1.0.2", + "php": ">=7.2.5", + "symfony/dependency-injection": "^5.0" + }, + "require-dev": { + "symfony/config": "^4.4|^5.0" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\ProxyManager\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for ProxyManager with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/proxy-manager-bridge/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/routing", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "cafa138128dfd6ab6be1abf6279169957b34f662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/cafa138128dfd6ab6be1abf6279169957b34f662", + "reference": "cafa138128dfd6ab6be1abf6279169957b34f662", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "psr/log": "~1.0", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-22T15:48:39+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b12274acfab9d9850c52583d136a24398cdf1a0c", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "83bbb92d34881744b8021452a76532b28283dbfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/83bbb92d34881744b8021452a76532b28283dbfb", + "reference": "83bbb92d34881744b8021452a76532b28283dbfb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-25T14:41:58+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "002ab5a36702adf0c9a11e6d8836623253e9045e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/002ab5a36702adf0c9a11e6d8836623253e9045e", + "reference": "002ab5a36702adf0c9a11e6d8836623253e9045e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "5aed4875ab514c8cb9b6ff4772baa25fa4c10307" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/5aed4875ab514c8cb9b6ff4772baa25fa4c10307", + "reference": "5aed4875ab514c8cb9b6ff4772baa25fa4c10307", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "require-dev": { + "symfony/var-dumper": "^4.4.9|^5.0.9" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "298a08ddda623485208506fcee08817807a251dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/298a08ddda623485208506fcee08817807a251dd", + "reference": "298a08ddda623485208506fcee08817807a251dd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "twig/twig", + "version": "v2.14.4", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "0b4ba691fb99ec7952d25deb36c0a83061b93bbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b4ba691fb99ec7952d25deb36c0a83061b93bbf", + "reference": "0b4ba691fb99ec7952d25deb36c0a83061b93bbf", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.14-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v2.14.4" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2021-03-10T10:05:55+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + }, { "name": "wp-coding-standards/wpcs", "version": "2.3.0", diff --git a/css/footnotes-alttbrpl0.min.css b/css/tmp/footnotes-alttbrpl0.min.css similarity index 100% rename from css/footnotes-alttbrpl0.min.css rename to css/tmp/footnotes-alttbrpl0.min.css diff --git a/css/footnotes-alttbrpl1.min.css b/css/tmp/footnotes-alttbrpl1.min.css similarity index 100% rename from css/footnotes-alttbrpl1.min.css rename to css/tmp/footnotes-alttbrpl1.min.css diff --git a/css/footnotes-alttbrpl2.min.css b/css/tmp/footnotes-alttbrpl2.min.css similarity index 100% rename from css/footnotes-alttbrpl2.min.css rename to css/tmp/footnotes-alttbrpl2.min.css diff --git a/css/footnotes-alttbrpl3.min.css b/css/tmp/footnotes-alttbrpl3.min.css similarity index 100% rename from css/footnotes-alttbrpl3.min.css rename to css/tmp/footnotes-alttbrpl3.min.css diff --git a/css/footnotes-jqttbrpl0.min.css b/css/tmp/footnotes-jqttbrpl0.min.css similarity index 100% rename from css/footnotes-jqttbrpl0.min.css rename to css/tmp/footnotes-jqttbrpl0.min.css diff --git a/css/footnotes-jqttbrpl1.min.css b/css/tmp/footnotes-jqttbrpl1.min.css similarity index 100% rename from css/footnotes-jqttbrpl1.min.css rename to css/tmp/footnotes-jqttbrpl1.min.css diff --git a/css/footnotes-jqttbrpl2.min.css b/css/tmp/footnotes-jqttbrpl2.min.css similarity index 100% rename from css/footnotes-jqttbrpl2.min.css rename to css/tmp/footnotes-jqttbrpl2.min.css diff --git a/css/footnotes-jqttbrpl3.min.css b/css/tmp/footnotes-jqttbrpl3.min.css similarity index 100% rename from css/footnotes-jqttbrpl3.min.css rename to css/tmp/footnotes-jqttbrpl3.min.css diff --git a/css/footnotes-nottbrpl0.min.css b/css/tmp/footnotes-nottbrpl0.min.css similarity index 100% rename from css/footnotes-nottbrpl0.min.css rename to css/tmp/footnotes-nottbrpl0.min.css diff --git a/css/footnotes-nottbrpl1.min.css b/css/tmp/footnotes-nottbrpl1.min.css similarity index 100% rename from css/footnotes-nottbrpl1.min.css rename to css/tmp/footnotes-nottbrpl1.min.css diff --git a/css/footnotes-nottbrpl2.min.css b/css/tmp/footnotes-nottbrpl2.min.css similarity index 100% rename from css/footnotes-nottbrpl2.min.css rename to css/tmp/footnotes-nottbrpl2.min.css diff --git a/css/footnotes-nottbrpl3.min.css b/css/tmp/footnotes-nottbrpl3.min.css similarity index 100% rename from css/footnotes-nottbrpl3.min.css rename to css/tmp/footnotes-nottbrpl3.min.css diff --git a/css/settings.min.css b/css/tmp/settings.min.css similarity index 100% rename from css/settings.min.css rename to css/tmp/settings.min.css diff --git a/footnotes.php b/footnotes.php index 78a49e6..d1ee9cc 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,9 +4,7 @@ * Plugin URI: https://wordpress.org/plugins/footnotes/ * Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. * Author: Mark Cheret - * Package V.: 2.5.11d2 * Version: 2.5.10 - * CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION. * Author URI: https://cheret.org/footnotes/ * Text Domain: footnotes * Domain Path: /languages @@ -15,19 +13,6 @@ * @copyright 2021 Mark Cheret (email: mark@cheret.de) */ -/** - * Package Version number for stylesheet cache busting. - * - * Please keep this constant in sync with the Package Version in the header above - * and in the header of the readme, but not necessarily with the other Version. - * - * @since 2.1.4 - * @since 2.5.3 (Hungarian) - * @var str - * @lastmodified 2021-03-11T2202+0100 - */ -define( 'C_STR_PACKAGE_VERSION', '2.5.11d2' ); - /** * Version numbers in WordPress plugin readme.txt and main PHP headers. * @@ -145,4 +130,4 @@ $g_obj_mci_footnotes->run(); * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. */ -define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); +define( 'C_BOOL_CSS_PRODUCTION_MODE', false ); diff --git a/js/wysiwyg-editor.js b/js/wysiwyg-editor.js index 8eff23f..40b7b6e 100644 --- a/js/wysiwyg-editor.js +++ b/js/wysiwyg-editor.js @@ -69,7 +69,7 @@ author : 'Mark Cheret', authorurl : 'https://cheret.org/footnotes/', infourl : 'https://wordpress.org/plugins/footnotes/', - version : "2.5.10" + version : "2.5.11d" }; } }); diff --git a/readme.txt b/readme.txt index 9872614..a27b5f0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,10 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.7 Requires PHP: 5.6 -Package Version: 2.5.11d2 -Version: 2.5.10 Stable Tag: 2.5.10 -CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION. License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -81,14 +78,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == = 2.5.11 = -- Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. -- Adding: Documentation: Readme.txt: informative 'Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. -- Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. -- Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution during the codebase conformance overhaul. +- Update: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this field is (unintuitively) parsed for release configuration. +- Update: Documentation: Readme.txt: informative 'Version' field in sync with 'Version' in 'footnotes.php' for bugfix versions available ahead of the Stable Tag. +- Update: Documentation: Readme.txt: informative 'Package Version' field in sync with the 'Package V.' field added in the 'footnotes.php' file header. +- Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution in the standards compliance overhaul. - Update: Codebase: make all PHP code comply to WordPress Coding Standards requirements, thanks to @rumperuu code contribution and refactoring. -- Adding: Documentation: additional readme in markdown format 'README.md' for use with GitHub, thanks to @rumperuu code contribution. -- Adding: Documentation: help and support for contributors by the means of Contributing Guidelines 'CONTRIBUTING.md', thanks to @rumperuu code contribution. -- Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution. +- Update: Documentation: help and support for contributors by the means of Contributing Guidelines in 'CONTRIBUTING.md', thanks to @rumperuu code contribution. +- Update: Documentation: additional readme in markdown format 'README.md' for use with the code repository on GitHub, thanks to @rumperuu code contribution. +- Update: Documentation: move 'customized-template-stack.txt' and 'customized-documentation-schema.txt' from the 'development/' folder to root. = 2.5.10 = - Bugfix: Codebase: revert to 2.5.8 with apologies (below), thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. From c9050a5a124ce5b714b2b6dddb818be5c1b9b2b3 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:05:58 +0200 Subject: [PATCH 099/144] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a51bb0b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "composer" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From b198b33b52df6b339fcc1d390e4b7f067b458c5f Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:12:18 +0200 Subject: [PATCH 100/144] Create ossar-analysis.yml --- .github/workflows/ossar-analysis.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ossar-analysis.yml diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml new file mode 100644 index 0000000..f89b0d6 --- /dev/null +++ b/.github/workflows/ossar-analysis.yml @@ -0,0 +1,44 @@ +# This workflow integrates a collection of open source static analysis tools +# with GitHub code scanning. For documentation, or to provide feedback, visit +# https://github.com/github/ossar-action +name: OSSAR + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '39 23 * * 4' + +jobs: + OSSAR-Scan: + # OSSAR runs on windows-latest. + # ubuntu-latest and macos-latest support coming soon + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Ensure a compatible version of dotnet is installed. + # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. + # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. + # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped. + # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action: + # - name: Install .NET + # uses: actions/setup-dotnet@v1 + # with: + # dotnet-version: '3.1.x' + + # Run open source static analysis tools + - name: Run OSSAR + uses: github/ossar-action@v1 + id: ossar + + # Upload results to the Security tab + - name: Upload OSSAR results + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: ${{ steps.ossar.outputs.sarifFile }} From 27daa5f9fc33377de5af73dbfca57b72705b23b2 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:18:48 +0200 Subject: [PATCH 101/144] Create symfonycorp.yml --- .github/workflows/symfonycorp.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/symfonycorp.yml diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml new file mode 100644 index 0000000..cd08568 --- /dev/null +++ b/.github/workflows/symfonycorp.yml @@ -0,0 +1,2 @@ +- name: The PHP Security Checker + uses: symfonycorp/security-checker-action@v2 From 23872225df661e7e41e3e1aace6651d742777355 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:21:02 +0200 Subject: [PATCH 102/144] Update symfonycorp.yml --- .github/workflows/symfonycorp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml index cd08568..8e8b6af 100644 --- a/.github/workflows/symfonycorp.yml +++ b/.github/workflows/symfonycorp.yml @@ -1,2 +1,2 @@ -- name: The PHP Security Checker - uses: symfonycorp/security-checker-action@v2 +name: The PHP Security Checker +uses: symfonycorp/security-checker-action@v2 From c8ac17f5f6d9cee5cc585a648ca65483c713f488 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:21:48 +0200 Subject: [PATCH 103/144] Update symfonycorp.yml --- .github/workflows/symfonycorp.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml index 8e8b6af..bd0a0a7 100644 --- a/.github/workflows/symfonycorp.yml +++ b/.github/workflows/symfonycorp.yml @@ -1,2 +1,25 @@ -name: The PHP Security Checker -uses: symfonycorp/security-checker-action@v2 +name: 'The PHP Security Checker' +description: 'Checks composer.json for known vulnerabilities in your package dependencies' +branding: + icon: 'umbrella' + color: 'gray-dark' +inputs: + lock: + description: 'The path to composer.lock is stored (root directory by default)' + required: false + default: './composer.lock' + disable-exit-code: + description: 'Whether to fail when issues are detected (false by default)' + required: false + default: 0 +outputs: + vulns: + description: 'The detected vulnerabilities as JSON' +runs: + using: 'docker' + image: 'docker://symfonycorp/cli:latest' + args: + - check:security + - "--dir" + - ${{ inputs.lock }} + - "--disable-exit-code=${{ inputs.disable-exit-code }}" From cf6aec1ba9edc5e0751629daf200bfbca02fc65c Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:23:35 +0200 Subject: [PATCH 104/144] Delete symfonycorp.yml --- .github/workflows/symfonycorp.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/symfonycorp.yml diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml deleted file mode 100644 index bd0a0a7..0000000 --- a/.github/workflows/symfonycorp.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 'The PHP Security Checker' -description: 'Checks composer.json for known vulnerabilities in your package dependencies' -branding: - icon: 'umbrella' - color: 'gray-dark' -inputs: - lock: - description: 'The path to composer.lock is stored (root directory by default)' - required: false - default: './composer.lock' - disable-exit-code: - description: 'Whether to fail when issues are detected (false by default)' - required: false - default: 0 -outputs: - vulns: - description: 'The detected vulnerabilities as JSON' -runs: - using: 'docker' - image: 'docker://symfonycorp/cli:latest' - args: - - check:security - - "--dir" - - ${{ inputs.lock }} - - "--disable-exit-code=${{ inputs.disable-exit-code }}" From 4595b4a886c610c4f081e630b27daf75ae0e13d7 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:29:01 +0200 Subject: [PATCH 105/144] Create php.yml --- .github/workflows/php.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..6dcf060 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,36 @@ +name: PHP Composer + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" + # Docs: https://getcomposer.org/doc/articles/scripts.md + + # - name: Run test suite + # run: composer run-script test From b7282c927e8c47dd72ffde66d4c6e37c32654cab Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 18:47:11 +0000 Subject: [PATCH 106/144] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From cf865a8a8aa0272b480672f077b200afc67e6cc6 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:55:46 +0000 Subject: [PATCH 107/144] Add getting started instructions to README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index e24b6ac..f6a4ac9 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,21 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor Unit tests are TODO. +## Getting Started + +1. Read the contributing guidelines +1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Install [Composer](https://getcomposer.org/download/), if you don't have it already +1. Install dependencies (`composer install`) +1. Create a new branch from `main` (`git checkout -b `) +1. When you're finished, commit your changes to the remote version of your branch + and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + +## Updating Documentation + +1. Install [phpDocumentor](https://phpdoc.org/) +1. Run it (`phpDocumentor -d . -t docs`) + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From 1742b8b31517476c78a1d2404ee6fa3ae4df8a52 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:07:48 +0000 Subject: [PATCH 108/144] Add footnotes header image --- img/footnotes.png | Bin 0 -> 4964 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 img/footnotes.png diff --git a/img/footnotes.png b/img/footnotes.png new file mode 100644 index 0000000000000000000000000000000000000000..a4d82f6c4b6b704625dbf3ee328e81bd0cc2e38b GIT binary patch literal 4964 zcmbVPdpy(s_g{%ViAu~}pGA@DHq2!%xtH8;V`7<^8D`9ciRdETmdbK#Mm54*r^ux! zS+0pLNGfxgB9d!vzo}23-|vs_Nf1I87c|Fhdbd8)8Up|V zL3npBvX_HB977~%p*JyFF@$iwHUMCJI3^s83Bi&<{#YD7%tUdz?ujA@A7G;B33Grr zgj-^R@JA^mtQ*DA9YYDh7zQXFHU$~S!1)FUSTY(ELkJCvgvXdD{;~__^P6I@BIp-{ z9AcvQJ18#)XOJb4gayI0AetD69u%afs|D4C80s2ofV3e{2pFmjhUjZTA#j*J90CRX z^Hbz|BLxJ)U9D{X@x^~KQ4AuJ!{K0Xbab>4M z$7qH{D*drwg^k3J@Zn@UF$}b65$#WmBAY1kBmJEMA>6^?U&CRM{}hT}GH?t!91PWh zfC+@nyndl0$*$P{4dXweBi&=ev0zthBr%GF;qOPF(jR4h?f$!?O&~uSxDyG_-xPGH z6%i9fz=n}+txOd8D_Q~g0Jx30z6}(ruM5%FhUghUq2}7=*4FxZRyq)vjirvY^&cDm zNmtL%+(OsNT*nFq(}qH=bu9D^&CP9ebf6a2Py-z(?2oQ(SR@%8hQa>vi|70OM_2p5 z>cTBaSTvbPawif)|8#(J5Rpub3?hbuEZtyQP>=%}gAd!3Y;Mr+e66q~{7Gzp4T(qq z{i-k={~scNKnx)NJ@enX0so(>f%(CJH{0X?w96k6zXvzjf198G@bCCw!}v2p;t$8} zM;QKG?Y?1aW$qp`FiAHdac#tt<2VxP+;Dq>Jj<+w#8Ia5-cQiZP7CuJLfHzqr zDQ&l7I!eNmm}=w7PJXl7ej0pS$S6T3ZZlh*15CS}ue^2Z=t(X;wr=}rA_|52i|?Yl zLy&(Y004o4d~&<>eU;S5wdHohX~RJxdrfk(8cMvI_AzdV_h4ZJ^lj^>+msD3}kmpf}(^ z<|k1+CDSm zyVW{4CZ|;#XzVesvsZQ=o)=4Za;zG9*h!yllnJPJ z>YHumTC%S95?+_4Hy{tQfaMo*Wi;;y5PA7)2jV@+Y1;iF<8 z#I$t&$Q+eRRbSW0e!2boK$Iv$pyBnA#_#r4<7+u5$_6yV6F%fiMXQ0 zn4Vke+-t)RVm;bH-F7AC#~y4JPu_jrKCF*rUBbRtU@RC*0`E><|e4Cf##GJ+L3$nJe|i=Ag>LHF7|IQA_Ju zS1S(LDMF{NKW4^rsb>x86&j_lSjk;}rzB|sy`iy+HPKcQAjBJumlBCp?Y~@g`>Ro6@s}RpMf=^7{!X(uJzjA4Qmzy%*{^fM zkSe(sC0Z`zQ^V~IK#=?&c{q#V9E>Z~YE+S`i>hz+imDYR;C)ZX zwZ;4Adeks*A4av3f*rPCHnV!>2B)TKB49$o2bJYvRkr)D;Lp>0r6R_p9_M}+h^6NZFSj)}8qM;00oLRW}&x=;fQ^?$7 zJU5nujyP@B_4DHKTM%^~ld=`A0X(b*ZhWEY=m=EHs#ANGwaYF$-873i)c5T>prAw!|DEQ24_=HzWw_V7O zs}nyFIiosVnJ;}EeNmr~V;i^kwpX0dbeF!coFGPv zfzO`b`<;w66H0jitMzy9wu=``L~|<;EHP0k*`Wf1;FgM9((4S)auHqf`EI`_u|Qfn8aUYI<`hWNTZ>Azmzt;CRJ%3ngip;ca5@ z7TU_*r{dn^Mp+3(43t%w9RnY|}tyvMWF6jq=j`IprPwNhj{F3Mjlny6973BU7x}ed>*U-S?%8 zDv0pZmnFPgj_4~BCJLnu+8Nm<8_!p;pWT{bUsc8g%*Nx=UB1t$B1F&jMdzk}$t2%* z(=6JtGBS3YQ)Ta%@SeC)9$`Ij*-4&V^!Uu}IRk_y@RTQ9ohK;h0EB<6l#%KEdGrF) z3h$#o7}3w^*Qm;TcYG@#F~LuHxbcT{izE7nJ7oPJag1o$bwNY1W8#}1A0hVD5^SW5 zz-rE8Eh*FPuUwyGF}d}EwFPkYP~}A`kiPkPuKrr79FS2dBdAJ$cdj~w(h%Sk`%aL( z6)<-`ZuW=rL*#+B4m&Lwt^RVwBA$U1|Ha=uuhmqUANIl0_4qij=W~E4#%Dn~Pj#>4 z_(^Yq0(;B~-V>werp~{}cQ*LC|F)E-5N-#&@>#xW z#k?jWu_6x%wtP{1@-4YWC%Jx4KiQixaisvo4Q>1)4MG5NrDjeXk&DQiJ%rL%@ozTG z^ysPh0)3HELaf+&Mf57A;^yeVkvGQ*u)5)3RCe!IPR4z`;s;BygGmb7UH_nXg7?JW z$@6kRsqu@n@1?&)LaVBT0u(tn~5EcMqnT@Kg6fx-JNw%`PpbMR>D~Wm*W{*(<`)@W_ zY_8K$_Anyjv+j2ThI#Uql@@QFQT3yT@pKw+rm!`GBRpn!1zHRcJIa{QczW$qbP3stDpmOdySI6xOu`}@QO4pLWT=f;QRB4;Epz+ zqy5j_ds{4wtKBC*Mf}2M&G{>n<0J=~?`j=rgAD4j6?fOR>{lp#(*7ap#G$>{8-l{` z)l>96x@bYI=_x?J(3rbYnTP+LtIvHV6L~EyzG0vZTAW9s-^*l41!AKw`9?P=)3=** z9I@iAkLH(5pHo720L;J+Uk{$FRqt$1vgG(&1FD6%ycS9000T2v`hgGfiB8dUHSw-v z8WDqT%R3cTBtm3k{MF}r@=+EXK-CxMNfM=KClW5$<%RdemPzSwib*F1SyP`ctHTFv z5*m$gMF9|HvKKDCG?&CbSNXdrezEs_vv6HJ=FUmmsGB+k%B4rd(jV4!h|s?osm*d^ z84~hvi{Lot+Ow}TINN}l5&Yu>2^5;y$75m}&dpH_A&7?z;_a}2; zO`0Kf!Nh}2uJ-G_8Sx<;bvMgj?nhkN#C$|GyKcHVN934#7W2NTR;&tfX@hfcFEsG` zg{Nz_?pJmOuRntNUVF3ahM~f(ay|L!-s{tj=j3=6;Q0ycbNc&Z&2i7)n>_J!b+Okg z^X&Q>El;G45uYr&p2~rh$mv}NZaDTYZSC^SLWH`A)8$@dr>CbAQKuHi!Lb{rVzjr} zLdVBm6wVALRpmb;pmKQSUDL|Zsk4i638zKHG3glkcR<^UarOpSe{GFhw$U)-wiJ1w zs9OIXBhler z`&0l0?+v!2Mw^#SgANbxBIam6Du_^fw|f<7d-ms1t9QnB%T%QyExUx4vwfa4t=)|G zNIY6i?P&zn>hR?+`}g|_o%g!-iHs;$;V}zKyTZn0M+C;n*6^@dBMDiVA9|f)<5ZZx z(R`10>w6?K3kWa;u(xXZsr)F+7-V~0)|{?HPyf0u@ Date: Sat, 20 Feb 2021 19:55:52 +0000 Subject: [PATCH 109/144] Generate HTML documentation using phpDocumentor --- docs/classes/MCI-Footnotes-Config.html | 504 ++ docs/classes/MCI-Footnotes-Convert.html | 759 ++ docs/classes/MCI-Footnotes-Hooks.html | 526 ++ docs/classes/MCI-Footnotes-Language.html | 493 ++ .../MCI-Footnotes-Layout-Diagnostics.html | 2290 ++++++ docs/classes/MCI-Footnotes-Layout-Init.html | 759 ++ .../MCI-Footnotes-Layout-Settings.html | 3757 ++++++++++ docs/classes/MCI-Footnotes-LayoutEngine.html | 2222 ++++++ docs/classes/MCI-Footnotes-Settings.html | 6221 +++++++++++++++++ docs/classes/MCI-Footnotes-Task.html | 2902 ++++++++ docs/classes/MCI-Footnotes-Template.html | 1044 +++ docs/classes/MCI-Footnotes-WYSIWYG.html | 492 ++ ...I-Footnotes-Widget-ReferenceContainer.html | 688 ++ docs/classes/MCI-Footnotes-WidgetBase.html | 529 ++ docs/classes/MCI-Footnotes.html | 873 +++ docs/css/base.css | 1002 +++ docs/css/normalize.css | 427 ++ docs/css/template.css | 169 + docs/files/class-config.html | 121 + docs/files/class-convert.html | 121 + docs/files/class-dashboard-init.html | 121 + docs/files/class-dashboard-layout.html | 121 + .../class-dashboard-subpage-diagnostics.html | 121 + docs/files/class-dashboard-subpage-main.html | 121 + docs/files/class-hooks.html | 121 + docs/files/class-init.html | 121 + docs/files/class-language.html | 121 + docs/files/class-settings.html | 121 + docs/files/class-task.html | 121 + docs/files/class-template.html | 121 + docs/files/class-widgets-base.html | 121 + .../class-widgets-reference-container.html | 121 + docs/files/class-wysiwyg.html | 121 + docs/files/footnotes.html | 110 + docs/files/includes.html | 190 + docs/graphs/classes.html | 97 + docs/index.html | 223 + docs/indices/files.html | 142 + docs/js/search.js | 173 + docs/js/searchIndex.js | 1419 ++++ docs/namespaces/default.html | 227 + docs/packages/Default.html | 227 + docs/packages/default.html | 116 + docs/reports/deprecated.html | 106 + docs/reports/errors.html | 174 + docs/reports/markers.html | 128 + 46 files changed, 30804 insertions(+) create mode 100644 docs/classes/MCI-Footnotes-Config.html create mode 100644 docs/classes/MCI-Footnotes-Convert.html create mode 100644 docs/classes/MCI-Footnotes-Hooks.html create mode 100644 docs/classes/MCI-Footnotes-Language.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Diagnostics.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Init.html create mode 100644 docs/classes/MCI-Footnotes-Layout-Settings.html create mode 100644 docs/classes/MCI-Footnotes-LayoutEngine.html create mode 100644 docs/classes/MCI-Footnotes-Settings.html create mode 100644 docs/classes/MCI-Footnotes-Task.html create mode 100644 docs/classes/MCI-Footnotes-Template.html create mode 100644 docs/classes/MCI-Footnotes-WYSIWYG.html create mode 100644 docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html create mode 100644 docs/classes/MCI-Footnotes-WidgetBase.html create mode 100644 docs/classes/MCI-Footnotes.html create mode 100644 docs/css/base.css create mode 100644 docs/css/normalize.css create mode 100644 docs/css/template.css create mode 100644 docs/files/class-config.html create mode 100644 docs/files/class-convert.html create mode 100644 docs/files/class-dashboard-init.html create mode 100644 docs/files/class-dashboard-layout.html create mode 100644 docs/files/class-dashboard-subpage-diagnostics.html create mode 100644 docs/files/class-dashboard-subpage-main.html create mode 100644 docs/files/class-hooks.html create mode 100644 docs/files/class-init.html create mode 100644 docs/files/class-language.html create mode 100644 docs/files/class-settings.html create mode 100644 docs/files/class-task.html create mode 100644 docs/files/class-template.html create mode 100644 docs/files/class-widgets-base.html create mode 100644 docs/files/class-widgets-reference-container.html create mode 100644 docs/files/class-wysiwyg.html create mode 100644 docs/files/footnotes.html create mode 100644 docs/files/includes.html create mode 100644 docs/graphs/classes.html create mode 100644 docs/index.html create mode 100644 docs/indices/files.html create mode 100644 docs/js/search.js create mode 100644 docs/js/searchIndex.js create mode 100644 docs/namespaces/default.html create mode 100644 docs/packages/Default.html create mode 100644 docs/packages/default.html create mode 100644 docs/reports/deprecated.html create mode 100644 docs/reports/errors.html create mode 100644 docs/reports/markers.html diff --git a/docs/classes/MCI-Footnotes-Config.html b/docs/classes/MCI-Footnotes-Config.html new file mode 100644 index 0000000..57b1506 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Config.html @@ -0,0 +1,504 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                      +

                                                                                                                                                                      Documentation

                                                                                                                                                                      + + + + + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      +

                                                                                                                                                                      + MCI_Footnotes_Config + + + + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Contains all Plugin Constants. Contains no Method or Property.

                                                                                                                                                                      + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + author +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + + + +

                                                                                                                                                                      + Table of Contents + +

                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + C_STR_LOVE_SYMBOL + +  = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' +
                                                                                                                                                                      +
                                                                                                                                                                      Html tag for the LOVE symbol.
                                                                                                                                                                      + +
                                                                                                                                                                      + C_STR_LOVE_SYMBOL_HEADING + +  = '<span class="footnotes_heart_heading">&hearts;</span>' +
                                                                                                                                                                      +
                                                                                                                                                                      HTML code for the 'love' symbol used in dashboard heading
                                                                                                                                                                      + +
                                                                                                                                                                      + C_STR_NO_LOVE_SLUG + +  = '[[no footnotes: love]]' +
                                                                                                                                                                      +
                                                                                                                                                                      Short code to DON'T display the 'LOVE ME' slug on certain pages.
                                                                                                                                                                      + +
                                                                                                                                                                      + C_STR_PLUGIN_HEADING_NAME + +  = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' +
                                                                                                                                                                      +
                                                                                                                                                                      Public Plugin name for dashboard heading
                                                                                                                                                                      + +
                                                                                                                                                                      + C_STR_PLUGIN_NAME + +  = "footnotes" +
                                                                                                                                                                      +
                                                                                                                                                                      Internal Plugin name.
                                                                                                                                                                      + +
                                                                                                                                                                      + C_STR_PLUGIN_PUBLIC_NAME + +  = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' +
                                                                                                                                                                      +
                                                                                                                                                                      Public Plugin name.
                                                                                                                                                                      + +
                                                                                                                                                                      + + + + +
                                                                                                                                                                      +

                                                                                                                                                                      + Constants + +

                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_LOVE_SYMBOL + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Html tag for the LOVE symbol.

                                                                                                                                                                      + + + public + string + C_STR_LOVE_SYMBOL + = '<span style="color:#ff6d3b; font-weight:bold;">&hearts;</span>' + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + author +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_LOVE_SYMBOL_HEADING + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      HTML code for the 'love' symbol used in dashboard heading

                                                                                                                                                                      + + + public + string + C_STR_LOVE_SYMBOL_HEADING + = '<span class="footnotes_heart_heading">&hearts;</span>' + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 2.0.4 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_NO_LOVE_SLUG + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Short code to DON'T display the 'LOVE ME' slug on certain pages.

                                                                                                                                                                      + + + public + string + C_STR_NO_LOVE_SLUG + = '[[no footnotes: love]]' + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + author +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_PLUGIN_HEADING_NAME + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Public Plugin name for dashboard heading

                                                                                                                                                                      + + + public + string + C_STR_PLUGIN_HEADING_NAME + = '<span class="footnotes_logo_heading footnotes_logo_part1_heading">foot</span><span class="footnotes_logo_heading footnotes_logo_part2_heading">notes</span>' + + + +

                                                                                                                                                                      After properly displaying in dashboard headings until WPv5.4, the above started +in WPv5.5 being torn apart as if the headline was text-align:justify and not +the last line. That ugly display bug badly affected the plugin’s communication. +The only working solution found so far is using position:fixed in one heading +that isn’t translated, and dropping the logo in another, translatable heading.

                                                                                                                                                                      +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 2.0.4 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_PLUGIN_NAME + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Internal Plugin name.

                                                                                                                                                                      + + + public + string + C_STR_PLUGIN_NAME + = "footnotes" + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + author +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      + C_STR_PLUGIN_PUBLIC_NAME + +

                                                                                                                                                                      + + + +

                                                                                                                                                                      Public Plugin name.

                                                                                                                                                                      + + + public + string + C_STR_PLUGIN_PUBLIC_NAME + = '<span class="footnotes_logo footnotes_logo_part1">foot</span><span class="footnotes_logo footnotes_logo_part2">notes</span>' + + + +
                                                                                                                                                                      + + +
                                                                                                                                                                      + Tags + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      + author +
                                                                                                                                                                      +
                                                                                                                                                                      + +

                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + since +
                                                                                                                                                                      +
                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      + + + + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                      +

                                                                                                                                                                      Search results

                                                                                                                                                                      + +
                                                                                                                                                                      +
                                                                                                                                                                      +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + + + + diff --git a/docs/classes/MCI-Footnotes-Convert.html b/docs/classes/MCI-Footnotes-Convert.html new file mode 100644 index 0000000..ebb56d9 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Convert.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                        +

                                                                                                                                                                        Documentation

                                                                                                                                                                        + + + + + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + +
                                                                                                                                                                        + + +
                                                                                                                                                                        +

                                                                                                                                                                        + MCI_Footnotes_Convert + + + + +

                                                                                                                                                                        + + + +

                                                                                                                                                                        Converts data types and Footnotes specific values.

                                                                                                                                                                        + +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + + + + + +

                                                                                                                                                                        + Table of Contents + +

                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + debug() + +  : mixed +
                                                                                                                                                                        +
                                                                                                                                                                        Displays a Variable.
                                                                                                                                                                        + +
                                                                                                                                                                        + getArrow() + +  : array<string|int, mixed>|string +
                                                                                                                                                                        +
                                                                                                                                                                        Get a html Array short code depending on Arrow-Array key index.
                                                                                                                                                                        + +
                                                                                                                                                                        + Index() + +  : string +
                                                                                                                                                                        +
                                                                                                                                                                        Converts a integer into the user-defined counter style for the footnotes.
                                                                                                                                                                        + +
                                                                                                                                                                        + toBool() + +  : bool +
                                                                                                                                                                        +
                                                                                                                                                                        Converts a string depending on its value to a boolean.
                                                                                                                                                                        + +
                                                                                                                                                                        + toArabicLeading() + +  : string +
                                                                                                                                                                        +
                                                                                                                                                                        Converts an integer to a leading-0 integer.
                                                                                                                                                                        + +
                                                                                                                                                                        + toLatin() + +  : string +
                                                                                                                                                                        +
                                                                                                                                                                        Converts an integer into latin ascii characters, either lower or upper-case.
                                                                                                                                                                        + +
                                                                                                                                                                        + toRomanic() + +  : string +
                                                                                                                                                                        +
                                                                                                                                                                        Converts an integer to a romanic letter.
                                                                                                                                                                        + +
                                                                                                                                                                        + + + + + + + +
                                                                                                                                                                        +

                                                                                                                                                                        + Methods + +

                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + debug() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Displays a Variable.

                                                                                                                                                                        + + + public + static debug(mixed $p_mixed_Value) : mixed + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_mixed_Value + : mixed +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + mixed + — +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + getArrow() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Get a html Array short code depending on Arrow-Array key index.

                                                                                                                                                                        + + + public + static getArrow([int $p_int_Index = -1 ]) : array<string|int, mixed>|string + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_int_Index + : int + = -1
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Index representing the Arrow. If empty all Arrows are specified.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.3.2 + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + array<string|int, mixed>|string + — +

                                                                                                                                                                        Array of all Arrows if Index is empty otherwise html tag of a specific arrow.

                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + Index() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Converts a integer into the user-defined counter style for the footnotes.

                                                                                                                                                                        + + + public + static Index(int $p_int_Index[, string $p_str_ConvertStyle = "arabic_plain" ]) : string + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_int_Index + : int +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Index to be converted.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_str_ConvertStyle + : string + = "arabic_plain"
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Style of the new/converted Index.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 2.2.0 + +

                                                                                                                                                                        lowercase Roman numerals supported

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + string + — +

                                                                                                                                                                        Converted Index as string in the defined counter style.

                                                                                                                                                                        +

                                                                                                                                                                        Edited:

                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + toBool() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Converts a string depending on its value to a boolean.

                                                                                                                                                                        + + + public + static toBool(string $p_str_Value) : bool + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_str_Value + : string +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        String to be converted to boolean.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.0-beta + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + bool + — +

                                                                                                                                                                        Boolean representing the string.

                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + toArabicLeading() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Converts an integer to a leading-0 integer.

                                                                                                                                                                        + + + private + static toArabicLeading(int $p_int_Value) : string + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_int_Value + : int +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Value/Index to be converted.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.0-gamma + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + string + — +

                                                                                                                                                                        Value with a leading zero.

                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + toLatin() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Converts an integer into latin ascii characters, either lower or upper-case.

                                                                                                                                                                        + + + private + static toLatin(int $p_int_Value, bool $p_bool_UpperCase) : string + +

                                                                                                                                                                        Function available from A to ZZ ( means 676 footnotes at 1 page possible).

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_int_Value + : int +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Value/Index to be converted.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_bool_UpperCase + : bool +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        True to convert the value to upper case letter, otherwise to lower case.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.0-gamma + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + string + — +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        + toRomanic() + +

                                                                                                                                                                        + + +

                                                                                                                                                                        Converts an integer to a romanic letter.

                                                                                                                                                                        + + + private + static toRomanic(int $p_int_Value, mixed $p_bool_UpperCase) : string + +
                                                                                                                                                                        + +
                                                                                                                                                                        Parameters
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_int_Value + : int +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Value/Index to be converted.

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + $p_bool_UpperCase + : mixed +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        + Tags + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        + author +
                                                                                                                                                                        +
                                                                                                                                                                        + +

                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 1.0-gamma + +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + since +
                                                                                                                                                                        +
                                                                                                                                                                        + 2.2.0 + +

                                                                                                                                                                        optionally lowercase (code from Latin) 2020-12-12T1538+0100

                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        Return values
                                                                                                                                                                        + string + — +

                                                                                                                                                                        Edited:

                                                                                                                                                                        +
                                                                                                                                                                        + + +
                                                                                                                                                                        +
                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                        +

                                                                                                                                                                        Search results

                                                                                                                                                                        + +
                                                                                                                                                                        +
                                                                                                                                                                        +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + + +
                                                                                                                                                                          + + + + diff --git a/docs/classes/MCI-Footnotes-Hooks.html b/docs/classes/MCI-Footnotes-Hooks.html new file mode 100644 index 0000000..eb710f1 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Hooks.html @@ -0,0 +1,526 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                          +

                                                                                                                                                                          Documentation

                                                                                                                                                                          + + + + + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + +
                                                                                                                                                                          + + +
                                                                                                                                                                          +

                                                                                                                                                                          + MCI_Footnotes_Hooks + + + + +

                                                                                                                                                                          + + + +

                                                                                                                                                                          Registers all WordPress Hooks and executes them on demand.

                                                                                                                                                                          + +
                                                                                                                                                                          + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + + + + +

                                                                                                                                                                          + Table of Contents + +

                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + activatePlugin() + +  : mixed +
                                                                                                                                                                          +
                                                                                                                                                                          Executed when the Plugin gets activated.
                                                                                                                                                                          + +
                                                                                                                                                                          + deactivatePlugin() + +  : mixed +
                                                                                                                                                                          +
                                                                                                                                                                          Executed when the Plugin gets deactivated.
                                                                                                                                                                          + +
                                                                                                                                                                          + PluginLinks() + +  : array<string|int, mixed> +
                                                                                                                                                                          +
                                                                                                                                                                          Add Links to the Plugin in the "installed Plugins" page.
                                                                                                                                                                          + +
                                                                                                                                                                          + registerHooks() + +  : mixed +
                                                                                                                                                                          +
                                                                                                                                                                          Registers all WordPress hooks.
                                                                                                                                                                          + +
                                                                                                                                                                          + uninstallPlugin() + +  : mixed +
                                                                                                                                                                          +
                                                                                                                                                                          Executed when the Plugin gets uninstalled.
                                                                                                                                                                          + +
                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                          +

                                                                                                                                                                          + Methods + +

                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          + activatePlugin() + +

                                                                                                                                                                          + + +

                                                                                                                                                                          Executed when the Plugin gets activated.

                                                                                                                                                                          + + + public + static activatePlugin() : mixed + +
                                                                                                                                                                          + + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          Return values
                                                                                                                                                                          + mixed + — +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          + deactivatePlugin() + +

                                                                                                                                                                          + + +

                                                                                                                                                                          Executed when the Plugin gets deactivated.

                                                                                                                                                                          + + + public + static deactivatePlugin() : mixed + +
                                                                                                                                                                          + + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          Return values
                                                                                                                                                                          + mixed + — +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          + + + +

                                                                                                                                                                          Add Links to the Plugin in the "installed Plugins" page.

                                                                                                                                                                          + + + public + static PluginLinks(array<string|int, mixed> $p_arr_Links, string $p_str_PluginFileName) : array<string|int, mixed> + +
                                                                                                                                                                          + +
                                                                                                                                                                          Parameters
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + $p_arr_Links + : array<string|int, mixed> +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          Current Links.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + $p_str_PluginFileName + : string +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          Plugins init file name.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          Return values
                                                                                                                                                                          + array<string|int, mixed> + — +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          + registerHooks() + +

                                                                                                                                                                          + + +

                                                                                                                                                                          Registers all WordPress hooks.

                                                                                                                                                                          + + + public + static registerHooks() : mixed + +
                                                                                                                                                                          + + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          Return values
                                                                                                                                                                          + mixed + — +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          + uninstallPlugin() + +

                                                                                                                                                                          + + +

                                                                                                                                                                          Executed when the Plugin gets uninstalled.

                                                                                                                                                                          + + + public + static uninstallPlugin() : mixed + +
                                                                                                                                                                          + + + +
                                                                                                                                                                          + Tags + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          + author +
                                                                                                                                                                          +
                                                                                                                                                                          + +

                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 1.5.0 + +

                                                                                                                                                                          Edit: ClearAll didn’t actually work.

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + since +
                                                                                                                                                                          +
                                                                                                                                                                          + 2.2.0 + +

                                                                                                                                                                          this function is not called any longer when deleting the plugin

                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          Return values
                                                                                                                                                                          + mixed + — +
                                                                                                                                                                          + + +
                                                                                                                                                                          +
                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                          +

                                                                                                                                                                          Search results

                                                                                                                                                                          + +
                                                                                                                                                                          +
                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + + +
                                                                                                                                                                            + + + + diff --git a/docs/classes/MCI-Footnotes-Language.html b/docs/classes/MCI-Footnotes-Language.html new file mode 100644 index 0000000..ebf670f --- /dev/null +++ b/docs/classes/MCI-Footnotes-Language.html @@ -0,0 +1,493 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                            +

                                                                                                                                                                            Documentation

                                                                                                                                                                            + + + + + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + +
                                                                                                                                                                            + + +
                                                                                                                                                                            +

                                                                                                                                                                            + MCI_Footnotes_Language + + + + +

                                                                                                                                                                            + + + +

                                                                                                                                                                            Loads text domain of current or default language for localization.

                                                                                                                                                                            + +
                                                                                                                                                                            + + +
                                                                                                                                                                            + Tags + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + author +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + + + + + +

                                                                                                                                                                            + Table of Contents + +

                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + loadTextDomain() + +  : mixed +
                                                                                                                                                                            +
                                                                                                                                                                            Loads the text domain for current WordPress language if exists.
                                                                                                                                                                            + +
                                                                                                                                                                            + registerHooks() + +  : mixed +
                                                                                                                                                                            +
                                                                                                                                                                            Register WordPress Hook.
                                                                                                                                                                            + +
                                                                                                                                                                            + load() + +  : bool +
                                                                                                                                                                            +
                                                                                                                                                                            Loads a specific text domain.
                                                                                                                                                                            + +
                                                                                                                                                                            + + + + + + + +
                                                                                                                                                                            +

                                                                                                                                                                            + Methods + +

                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            + loadTextDomain() + +

                                                                                                                                                                            + + +

                                                                                                                                                                            Loads the text domain for current WordPress language if exists.

                                                                                                                                                                            + + + public + static loadTextDomain() : mixed + +

                                                                                                                                                                            Otherwise fallback "en_GB" will be loaded.

                                                                                                                                                                            +
                                                                                                                                                                            + + + +
                                                                                                                                                                            + Tags + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + author +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                              +
                                                                                                                                                                            • Bugfix: Correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution.
                                                                                                                                                                            • +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 2.0.0 + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + date +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            2020-10-26T1609+0100

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + contributor +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            @matkus2

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + link +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            Add 3rd (empty) argument in apply_filters() to prevent PHP from throwing an error: +“Fatal error: Uncaught ArgumentCountError: Too few arguments to function apply_filters()”

                                                                                                                                                                            +

                                                                                                                                                                            Yet get_locale() is defined w/o parameters in wp-includes/l10n.php:30, and +apply_filters() is defined as apply_filters( $tag, $value ) in wp-includes/plugin.php:181.

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + link +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            But apply_filters() is defined with a 3rd parameter (and w/o the first one) in +wp-includes/class-wp-hook.php:264, as public function apply_filters( $value, $args ).

                                                                                                                                                                            +

                                                                                                                                                                            Taking it all together, probably the full function definition would be: +public function apply_filters( $tag, $value, $args ). +In the case of get_locale(), $args is empty.

                                                                                                                                                                            +

                                                                                                                                                                            The bug was lurking in WP. PHP 7.1 promoted the warning to an error.

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + link +
                                                                                                                                                                            +
                                                                                                                                                                            + https://www.php.net/manual/en/migration71.incompatible.php + +
                                                                                                                                                                            +
                                                                                                                                                                            + link +
                                                                                                                                                                            +
                                                                                                                                                                            + https://www.php.net/manual/en/migration71.incompatible.php#migration71.incompatible.too-few-arguments-exception + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            Return values
                                                                                                                                                                            + mixed + — +
                                                                                                                                                                            + + +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            + registerHooks() + +

                                                                                                                                                                            + + +

                                                                                                                                                                            Register WordPress Hook.

                                                                                                                                                                            + + + public + static registerHooks() : mixed + +
                                                                                                                                                                            + + + +
                                                                                                                                                                            + Tags + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + author +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            Return values
                                                                                                                                                                            + mixed + — +
                                                                                                                                                                            + + +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            + load() + +

                                                                                                                                                                            + + +

                                                                                                                                                                            Loads a specific text domain.

                                                                                                                                                                            + + + private + static load(string $p_str_LanguageCode) : bool + +
                                                                                                                                                                            + +
                                                                                                                                                                            Parameters
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + $p_str_LanguageCode + : string +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            Language Code to load a specific text domain.

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + + +
                                                                                                                                                                            + Tags + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            + author +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 1.5.1 + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + since +
                                                                                                                                                                            +
                                                                                                                                                                            + 2.1.6 + +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + date +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            2020-12-08T1931+0100

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + reporter +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            @nikelaos

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + link +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            That is done by using load_plugin_textdomain(): +“The .mo file should be named based on the text domain with a dash, and then the locale exactly.”

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + see +
                                                                                                                                                                            +
                                                                                                                                                                            + +

                                                                                                                                                                            wp-includes/l10n.php:857

                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            Return values
                                                                                                                                                                            + bool + — +
                                                                                                                                                                              +
                                                                                                                                                                            • Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report.
                                                                                                                                                                            • +
                                                                                                                                                                            +
                                                                                                                                                                            + + +
                                                                                                                                                                            +
                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                            +

                                                                                                                                                                            Search results

                                                                                                                                                                            + +
                                                                                                                                                                            +
                                                                                                                                                                            +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Diagnostics.html b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html new file mode 100644 index 0000000..d00152d --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Diagnostics.html @@ -0,0 +1,2290 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                              +

                                                                                                                                                                              Documentation

                                                                                                                                                                              + + + + + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + +
                                                                                                                                                                              + + +
                                                                                                                                                                              +

                                                                                                                                                                              + MCI_Footnotes_Layout_Diagnostics + + + extends MCI_Footnotes_LayoutEngine + + + + +

                                                                                                                                                                              + + + +

                                                                                                                                                                              Displays Diagnostics of the web server, PHP and WordPress.

                                                                                                                                                                              + +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + + + + + +

                                                                                                                                                                              + Table of Contents + +

                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Stores all Sections for the child sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + $a_str_SubPageHook + +  : null|string +
                                                                                                                                                                              +
                                                                                                                                                                              Stores the Hook connection string for the child sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + Description() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Output the Description of a section. May be overwritten in any section.
                                                                                                                                                                              + +
                                                                                                                                                                              + Diagnostics() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Displays a diagnostics about the web server, php and WordPress.
                                                                                                                                                                              + +
                                                                                                                                                                              + displayContent() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Displays the content of specific sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + getPriority() + +  : int +
                                                                                                                                                                              +
                                                                                                                                                                              Returns a Priority index. Lower numbers have a higher Priority.
                                                                                                                                                                              + +
                                                                                                                                                                              + registerSections() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Registers all sections for a sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + registerSubPage() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Registers a sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + addCheckbox() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for an input [type = checkbox].
                                                                                                                                                                              + +
                                                                                                                                                                              + addColorSelection() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for an input [type = text] with color selection class.
                                                                                                                                                                              + +
                                                                                                                                                                              + addLabel() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for an input/select label.
                                                                                                                                                                              + +
                                                                                                                                                                              + addLineSpace() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns a line break to have a space between two lines.
                                                                                                                                                                              + +
                                                                                                                                                                              + addMetaBox() + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Returns an array describing a meta box.
                                                                                                                                                                              + +
                                                                                                                                                                              + addNewline() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns a line break to start a new line.
                                                                                                                                                                              + +
                                                                                                                                                                              + addNumBox() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for an input [type = num].
                                                                                                                                                                              + +
                                                                                                                                                                              + addSection() + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Returns an array describing a sub page section.
                                                                                                                                                                              + +
                                                                                                                                                                              + addSelectBox() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for a select box.
                                                                                                                                                                              + +
                                                                                                                                                                              + addText() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns a simple text inside html <span> text.
                                                                                                                                                                              + +
                                                                                                                                                                              + addTextArea() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for a text area.
                                                                                                                                                                              + +
                                                                                                                                                                              + addTextBox() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the html tag for an input [type = text].
                                                                                                                                                                              + +
                                                                                                                                                                              + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Returns an array of all registered meta boxes for each section of the sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + getSections() + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Returns an array of all registered sections for the sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + getSubPageSlug() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the unique slug of the sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + getSubPageTitle() + +  : string +
                                                                                                                                                                              +
                                                                                                                                                                              Returns the title of the sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + LoadSetting() + +  : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              Loads specific setting and returns an array with the keys [id, name, value].
                                                                                                                                                                              + +
                                                                                                                                                                              + appendScripts() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Append javascript and css files for specific sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + registerMetaBoxes() + +  : mixed +
                                                                                                                                                                              +
                                                                                                                                                                              Registers all Meta boxes for a sub page.
                                                                                                                                                                              + +
                                                                                                                                                                              + saveSettings() + +  : bool +
                                                                                                                                                                              +
                                                                                                                                                                              Save all Plugin settings.
                                                                                                                                                                              + +
                                                                                                                                                                              + + + + + + +
                                                                                                                                                                              +

                                                                                                                                                                              + Properties + +

                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + $a_arr_Sections + + + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Stores all Sections for the child sub page.

                                                                                                                                                                              + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + $a_str_SubPageHook + + + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Stores the Hook connection string for the child sub page.

                                                                                                                                                                              + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +

                                                                                                                                                                              + Methods + +

                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + Description() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Output the Description of a section. May be overwritten in any section.

                                                                                                                                                                              + + + public + Description() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + Diagnostics() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Displays a diagnostics about the web server, php and WordPress.

                                                                                                                                                                              + + + public + Diagnostics() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + displayContent() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Displays the content of specific sub page.

                                                                                                                                                                              + + + public + displayContent() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + getPriority() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns a Priority index. Lower numbers have a higher Priority.

                                                                                                                                                                              + + + public + getPriority() : int + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + int + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + registerSections() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Registers all sections for a sub page.

                                                                                                                                                                              + + + public + registerSections() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + registerSubPage() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Registers a sub page.

                                                                                                                                                                              + + + public + registerSubPage() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addCheckbox() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for an input [type = checkbox].

                                                                                                                                                                              + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre load the input field.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addColorSelection() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for an input [type = text] with color selection class.

                                                                                                                                                                              + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre load the input field.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.6 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addLabel() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for an input/select label.

                                                                                                                                                                              + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to connect the Label with the input/select field.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_Caption + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Label caption.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 2.1.6 + +

                                                                                                                                                                              no colon

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +

                                                                                                                                                                              Edited 2020-12-01T0159+0100..

                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addLineSpace() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns a line break to have a space between two lines.

                                                                                                                                                                              + + + protected + addLineSpace() : string + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addMetaBox() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns an array describing a meta box.

                                                                                                                                                                              + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SectionID + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Parent Section ID.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_ID + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Unique ID suffix.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_Title + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Title for the meta box.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_CallbackFunctionName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Class method name for callback.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + array<string|int, mixed> + — +

                                                                                                                                                                              meta box description to be able to append a meta box to the output.

                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addNewline() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns a line break to start a new line.

                                                                                                                                                                              + + + protected + addNewline() : string + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addNumBox() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for an input [type = num].

                                                                                                                                                                              + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre load the input field.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_in_Min + : int +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Minimum value.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_int_Max + : int +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Maximum value.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_bool_Deci + : bool + = false
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              true if 0.1 steps and floating to string, false if integer (default)

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 2.1.4 + +

                                                                                                                                                                              step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +

                                                                                                                                                                              Edited:

                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addSection() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns an array describing a sub page section.

                                                                                                                                                                              + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_ID + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Unique ID suffix.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_Title + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Title of the section.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_int_SettingsContainerIndex + : int +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Settings Container Index.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_bool_hasSubmitButton + : bool + = true
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Should a Submit Button be displayed for this section, default: true.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + array<string|int, mixed> + — +

                                                                                                                                                                              Array describing the section.

                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addSelectBox() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for a select box.

                                                                                                                                                                              + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre select the current value.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_arr_Options + : array<string|int, mixed> +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Possible options to be selected.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addText() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns a simple text inside html <span> text.

                                                                                                                                                                              + + + protected + addText(string $p_str_Text) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_Text + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Message to be surrounded with simple html tag (span).

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addTextArea() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for a text area.

                                                                                                                                                                              + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre fill the text area.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + addTextBox() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the html tag for an input [type = text].

                                                                                                                                                                              + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Name of the Settings key to pre load the input field.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_MaxLength + : int + = 999
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Maximum length of the input, default 999 characters.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_bool_Readonly + : bool + = false
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Set the input to be read only, default false.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_bool_Hidden + : bool + = false
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Set the input to be hidden, default false.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + getMetaBoxes() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns an array of all registered meta boxes for each section of the sub page.

                                                                                                                                                                              + + + protected + getMetaBoxes() : array<string|int, mixed> + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + array<string|int, mixed> + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + getSections() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns an array of all registered sections for the sub page.

                                                                                                                                                                              + + + protected + getSections() : array<string|int, mixed> + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + array<string|int, mixed> + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + getSubPageSlug() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the unique slug of the sub page.

                                                                                                                                                                              + + + protected + getSubPageSlug() : string + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + getSubPageTitle() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Returns the title of the sub page.

                                                                                                                                                                              + + + protected + getSubPageTitle() : string + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + string + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + LoadSetting() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Loads specific setting and returns an array with the keys [id, name, value].

                                                                                                                                                                              + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_SettingKeyName + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Settings Array key name.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + array<string|int, mixed> + — +

                                                                                                                                                                              Contains Settings ID, Settings Name and Settings Value.

                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + appendScripts() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Append javascript and css files for specific sub page.

                                                                                                                                                                              + + + private + appendScripts() : mixed + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + registerMetaBoxes() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Registers all Meta boxes for a sub page.

                                                                                                                                                                              + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                                                                                                              + +
                                                                                                                                                                              Parameters
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + $p_str_ParentID + : string +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Parent section unique id.

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + mixed + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              + saveSettings() + +

                                                                                                                                                                              + + +

                                                                                                                                                                              Save all Plugin settings.

                                                                                                                                                                              + + + private + saveSettings() : bool + +
                                                                                                                                                                              + + + +
                                                                                                                                                                              + Tags + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              + author +
                                                                                                                                                                              +
                                                                                                                                                                              + +

                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + since +
                                                                                                                                                                              +
                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              Return values
                                                                                                                                                                              + bool + — +
                                                                                                                                                                              + + +
                                                                                                                                                                              +
                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                              +

                                                                                                                                                                              Search results

                                                                                                                                                                              + +
                                                                                                                                                                              +
                                                                                                                                                                              +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + + +
                                                                                                                                                                                + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Init.html b/docs/classes/MCI-Footnotes-Layout-Init.html new file mode 100644 index 0000000..0ec0d29 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Init.html @@ -0,0 +1,759 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                +

                                                                                                                                                                                Documentation

                                                                                                                                                                                + + + + + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + +
                                                                                                                                                                                + + +
                                                                                                                                                                                +

                                                                                                                                                                                + MCI_Footnotes_Layout_Init + + + + +

                                                                                                                                                                                + + + +

                                                                                                                                                                                Handles the Settings interface of the Plugin.

                                                                                                                                                                                + +
                                                                                                                                                                                + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + + + + + + +

                                                                                                                                                                                + Table of Contents + +

                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + C_STR_MAIN_MENU_SLUG + +  = "mfmmf" +
                                                                                                                                                                                +
                                                                                                                                                                                Slug for the Plugin main menu.
                                                                                                                                                                                + +
                                                                                                                                                                                + C_STR_MAIN_MENU_TITLE + +  = "ManFisher" +
                                                                                                                                                                                +
                                                                                                                                                                                Plugin main menu name.
                                                                                                                                                                                + +
                                                                                                                                                                                + $a_arr_SubPageClasses + +  : array<string|int, mixed> +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                + __construct() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                Class Constructor. Initializes all WordPress hooks for the Plugin Settings.
                                                                                                                                                                                + +
                                                                                                                                                                                + displayOtherPlugins() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                Displays other Plugins from the developers.
                                                                                                                                                                                + +
                                                                                                                                                                                + getPluginMetaInformation() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.
                                                                                                                                                                                + +
                                                                                                                                                                                + initializeSettings() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                Initializes all sub pages and registers the settings.
                                                                                                                                                                                + +
                                                                                                                                                                                + registerMainMenu() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                Registers the new main menu for the WordPress dashboard.
                                                                                                                                                                                + +
                                                                                                                                                                                + registerSubPages() + +  : mixed +
                                                                                                                                                                                +
                                                                                                                                                                                Registers all SubPages for this Plugin.
                                                                                                                                                                                + +
                                                                                                                                                                                + + + + +
                                                                                                                                                                                +

                                                                                                                                                                                + Constants + +

                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + C_STR_MAIN_MENU_SLUG + +

                                                                                                                                                                                + + + +

                                                                                                                                                                                Slug for the Plugin main menu.

                                                                                                                                                                                + + + public + string + C_STR_MAIN_MENU_SLUG + = "mfmmf" + + + +
                                                                                                                                                                                + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + C_STR_MAIN_MENU_TITLE + +

                                                                                                                                                                                + + + +

                                                                                                                                                                                Plugin main menu name.

                                                                                                                                                                                + + + public + string + C_STR_MAIN_MENU_TITLE + = "ManFisher" + + + +
                                                                                                                                                                                + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + + +
                                                                                                                                                                                +

                                                                                                                                                                                + Properties + +

                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + $a_arr_SubPageClasses + + + +

                                                                                                                                                                                + + + + + private + array<string|int, mixed> + $a_arr_SubPageClasses + = array() + +
                                                                                                                                                                                + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +

                                                                                                                                                                                + Methods + +

                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + __construct() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                Class Constructor. Initializes all WordPress hooks for the Plugin Settings.

                                                                                                                                                                                + + + public + __construct() : mixed + +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + displayOtherPlugins() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                Displays other Plugins from the developers.

                                                                                                                                                                                + + + public + displayOtherPlugins() : mixed + +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + getPluginMetaInformation() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                AJAX call. returns a JSON string containing meta information about a specific WordPress Plugin.

                                                                                                                                                                                + + + public + getPluginMetaInformation() : mixed + +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + initializeSettings() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                Initializes all sub pages and registers the settings.

                                                                                                                                                                                + + + public + initializeSettings() : mixed + +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + registerMainMenu() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                Registers the new main menu for the WordPress dashboard.

                                                                                                                                                                                + + + public + registerMainMenu() : mixed + +

                                                                                                                                                                                Registers all sub menu pages for the new main menu.

                                                                                                                                                                                +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + see +
                                                                                                                                                                                +
                                                                                                                                                                                + http://codex.wordpress.org/Function_Reference/add_menu_page + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                + registerSubPages() + +

                                                                                                                                                                                + + +

                                                                                                                                                                                Registers all SubPages for this Plugin.

                                                                                                                                                                                + + + private + registerSubPages() : mixed + +
                                                                                                                                                                                + + + +
                                                                                                                                                                                + Tags + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                + author +
                                                                                                                                                                                +
                                                                                                                                                                                + +

                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + since +
                                                                                                                                                                                +
                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                Return values
                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                + + +
                                                                                                                                                                                +
                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                +

                                                                                                                                                                                Search results

                                                                                                                                                                                + +
                                                                                                                                                                                +
                                                                                                                                                                                +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + + + + diff --git a/docs/classes/MCI-Footnotes-Layout-Settings.html b/docs/classes/MCI-Footnotes-Layout-Settings.html new file mode 100644 index 0000000..5b4da79 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Layout-Settings.html @@ -0,0 +1,3757 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                  +

                                                                                                                                                                                  Documentation

                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MCI_Footnotes_Layout_Settings + + + extends MCI_Footnotes_LayoutEngine + + + + +

                                                                                                                                                                                  + + + +

                                                                                                                                                                                  Displays and handles all Settings of the Plugin.

                                                                                                                                                                                  + +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + + + + + +

                                                                                                                                                                                  + Table of Contents + +

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Stores all Sections for the child sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + $a_str_SubPageHook + +  : null|string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Stores the Hook connection string for the child sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + CustomCSS() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays the custom css box.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + CustomCSSMigration() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + CustomCSSNew() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Description() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Output the Description of a section. May be overwritten in any section.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + displayContent() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays the content of specific sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Donate() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all Donate button to support the developers.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Excerpts() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays the excerpt setting
                                                                                                                                                                                  + +
                                                                                                                                                                                  + getPriority() + +  : int +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns a Priority index. Lower numbers have a higher Priority.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Help() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays a short introduction of the Plugin.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + HyperlinkArrow() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all settings for the prepended symbol
                                                                                                                                                                                  + +
                                                                                                                                                                                  + LookupHooks() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays available Hooks to look for Footnote short codes.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Love() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all settings for 'I love Footnotes'.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBox() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all settings for the footnotes mouse-over box.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxAppearance() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxDimensions() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxPosition() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxText() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxTiming() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + MouseOverBoxTruncation() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Numbering() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + ReferenceContainer() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all settings for the reference container.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + registerSections() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Registers all sections for a sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + registerSubPage() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Registers a sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Scrolling() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  + StartEnd() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior
                                                                                                                                                                                  + +
                                                                                                                                                                                  + Superscript() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Displays all settings for the footnote referrers
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addCheckbox() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for an input [type = checkbox].
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addColorSelection() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for an input [type = text] with color selection class.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addLabel() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for an input/select label.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addLineSpace() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns a line break to have a space between two lines.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addMetaBox() + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns an array describing a meta box.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addNewline() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns a line break to start a new line.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addNumBox() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for an input [type = num].
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addSection() + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns an array describing a sub page section.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addSelectBox() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for a select box.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addText() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns a simple text inside html <span> text.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addTextArea() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for a text area.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + addTextBox() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the html tag for an input [type = text].
                                                                                                                                                                                  + +
                                                                                                                                                                                  + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns an array of all registered meta boxes for each section of the sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + getSections() + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns an array of all registered sections for the sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + getSubPageSlug() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the unique slug of the sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + getSubPageTitle() + +  : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  Returns the title of the sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + LoadSetting() + +  : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  Loads specific setting and returns an array with the keys [id, name, value].
                                                                                                                                                                                  + +
                                                                                                                                                                                  + appendScripts() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Append javascript and css files for specific sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + registerMetaBoxes() + +  : mixed +
                                                                                                                                                                                  +
                                                                                                                                                                                  Registers all Meta boxes for a sub page.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + saveSettings() + +  : bool +
                                                                                                                                                                                  +
                                                                                                                                                                                  Save all Plugin settings.
                                                                                                                                                                                  + +
                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Properties + +

                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + $a_arr_Sections + + + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Stores all Sections for the child sub page.

                                                                                                                                                                                  + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + $a_str_SubPageHook + + + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Stores the Hook connection string for the child sub page.

                                                                                                                                                                                  + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Methods + +

                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + CustomCSS() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays the custom css box.

                                                                                                                                                                                  + + + public + CustomCSS() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.6 + +

                                                                                                                                                                                  drop localized notices for CSS classes as the number increased to 16 +list directly in the template, as CSS is in English anyway

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.2 + +

                                                                                                                                                                                  migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.3.0 + +

                                                                                                                                                                                  say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.5.1 + +

                                                                                                                                                                                  mention validity while visible, thanks to @rkupadhya bug report

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + see +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  templates/dashboard/customize-css.html +2020-12-09T1113+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + CustomCSSMigration() + +

                                                                                                                                                                                  + + + + + public + CustomCSSMigration() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + CustomCSSNew() + +

                                                                                                                                                                                  + + + + + public + CustomCSSNew() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Description() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Output the Description of a section. May be overwritten in any section.

                                                                                                                                                                                  + + + public + Description() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + displayContent() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays the content of specific sub page.

                                                                                                                                                                                  + + + public + displayContent() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Donate() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all Donate button to support the developers.

                                                                                                                                                                                  + + + public + Donate() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Excerpts() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays the excerpt setting

                                                                                                                                                                                  + + + public + Excerpts() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited heading 2020-12-12T1453+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.1 + +

                                                                                                                                                                                  more settings and notices, thanks to @nikelaos

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  dedicated to the excerpt setting and its notices 2020-12-12T1454+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 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 + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + getPriority() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns a Priority index. Lower numbers have a higher Priority.

                                                                                                                                                                                  + + + public + getPriority() : int + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + int + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Help() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays a short introduction of the Plugin.

                                                                                                                                                                                  + + + public + Help() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + HyperlinkArrow() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all settings for the prepended symbol

                                                                                                                                                                                  + + + public + HyperlinkArrow() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited heading for v2.0.4

                                                                                                                                                                                  +

                                                                                                                                                                                  The former 'hyperlink arrow', incompatible with combined identical footnotes, +became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics +of the footnote number.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                  moved to Settings > Reference container > Display a backlink symbol

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.1 + +

                                                                                                                                                                                  and 2.2.4 back here

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + LookupHooks() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays available Hooks to look for Footnote short codes.

                                                                                                                                                                                  + + + public + LookupHooks() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.5 + +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.1 + +

                                                                                                                                                                                  priority level setting for the_content 2020-11-16T2152+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                  priority level settings for the other hooks 2020-11-19T1421+0100

                                                                                                                                                                                  +

                                                                                                                                                                                  priority level was initially hard-coded default +shows "9223372036854775807" in the numbox +empty should be interpreted as PHP_INT_MAX, +but a numbox cannot be set to empty: https://github.com/Modernizr/Modernizr/issues/171 +define -1 as PHP_INT_MAX instead

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.9 + +

                                                                                                                                                                                  removed the warning about the widget text hook 2020-12-25T0348+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.9 + +

                                                                                                                                                                                  added guidance for the widget text hook 2020-12-25T0353+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Love() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all settings for 'I love Footnotes'.

                                                                                                                                                                                  + + + public + Love() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  position-sensitive placeholders to support more locales 2020-12-11T0432+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  more options 2020-12-11T0432+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all settings for the footnotes mouse-over box.

                                                                                                                                                                                  + + + public + MouseOverBox() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.2 + +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  5 parts to address increased settings number

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.5 + +

                                                                                                                                                                                  position settings for alternative tooltips

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxAppearance() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxAppearance() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxDimensions() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxDimensions() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxPosition() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxPosition() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxText() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxText() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxTiming() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxTiming() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + MouseOverBoxTruncation() + +

                                                                                                                                                                                  + + + + + public + MouseOverBoxTruncation() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Numbering() + +

                                                                                                                                                                                  + + + + + public + Numbering() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + ReferenceContainer() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all settings for the reference container.

                                                                                                                                                                                  + + + public + ReferenceContainer() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Completed:

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.4: + +

                                                                                                                                                                                  layout and typography options 2020-11-30T0548+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.5 + +

                                                                                                                                                                                  options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + link +
                                                                                                                                                                                  +
                                                                                                                                                                                  + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + registerSections() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Registers all sections for a sub page.

                                                                                                                                                                                  + + + public + registerSections() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + registerSubPage() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Registers a sub page.

                                                                                                                                                                                  + + + public + registerSubPage() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Scrolling() + +

                                                                                                                                                                                  + + + + + public + Scrolling() : mixed + + + + + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + StartEnd() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all options for the footnotes start and end tag short codes +Displays all options for the footnotes numbering +Displays all options for the scrolling behavior

                                                                                                                                                                                  + + + public + StartEnd() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited heading 2020-12-12T1412+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  start/end short codes: more predefined options 2020-12-12T1412+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  3 boxes for clarity 2020-12-12T1422+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.5 + +

                                                                                                                                                                                  support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.4.0 + +

                                                                                                                                                                                  added warning about Block Editor escapement disruption 2021-01-02T2324+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.4.0 + +

                                                                                                                                                                                  removed the HTML comment tag option 2021-01-02T2325+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.5.0 + +

                                                                                                                                                                                  Shortcode syntax validation: add more information around the setting, thanks to @andreasra

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + link +
                                                                                                                                                                                  +
                                                                                                                                                                                  + https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + link +
                                                                                                                                                                                  +
                                                                                                                                                                                  + https://wordpress.org/support/topic/add-support-for-ibid-notation/ + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + link +
                                                                                                                                                                                  +
                                                                                                                                                                                  + https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + Superscript() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Displays all settings for the footnote referrers

                                                                                                                                                                                  + + + public + Superscript() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +

                                                                                                                                                                                  Edited heading 2020-12-12T1513+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.1 + +

                                                                                                                                                                                  option for superscript (optionally baseline referrers)

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.2.0 + +

                                                                                                                                                                                  option for link element moved here 2020-12-12T1514+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addCheckbox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for an input [type = checkbox].

                                                                                                                                                                                  + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addColorSelection() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for an input [type = text] with color selection class.

                                                                                                                                                                                  + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.6 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addLabel() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for an input/select label.

                                                                                                                                                                                  + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to connect the Label with the input/select field.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_Caption + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Label caption.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.6 + +

                                                                                                                                                                                  no colon

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +

                                                                                                                                                                                  Edited 2020-12-01T0159+0100..

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addLineSpace() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns a line break to have a space between two lines.

                                                                                                                                                                                  + + + protected + addLineSpace() : string + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addMetaBox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns an array describing a meta box.

                                                                                                                                                                                  + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SectionID + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parent Section ID.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_ID + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Unique ID suffix.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_Title + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Title for the meta box.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_CallbackFunctionName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Class method name for callback.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + array<string|int, mixed> + — +

                                                                                                                                                                                  meta box description to be able to append a meta box to the output.

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addNewline() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns a line break to start a new line.

                                                                                                                                                                                  + + + protected + addNewline() : string + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addNumBox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for an input [type = num].

                                                                                                                                                                                  + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_in_Min + : int +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Minimum value.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_int_Max + : int +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Maximum value.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_bool_Deci + : bool + = false
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  true if 0.1 steps and floating to string, false if integer (default)

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                  step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addSection() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns an array describing a sub page section.

                                                                                                                                                                                  + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_ID + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Unique ID suffix.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_Title + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Title of the section.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_int_SettingsContainerIndex + : int +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Settings Container Index.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_bool_hasSubmitButton + : bool + = true
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Should a Submit Button be displayed for this section, default: true.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + array<string|int, mixed> + — +

                                                                                                                                                                                  Array describing the section.

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addSelectBox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for a select box.

                                                                                                                                                                                  + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre select the current value.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_arr_Options + : array<string|int, mixed> +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Possible options to be selected.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addText() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns a simple text inside html <span> text.

                                                                                                                                                                                  + + + protected + addText(string $p_str_Text) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_Text + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Message to be surrounded with simple html tag (span).

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addTextArea() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for a text area.

                                                                                                                                                                                  + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre fill the text area.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + addTextBox() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the html tag for an input [type = text].

                                                                                                                                                                                  + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Name of the Settings key to pre load the input field.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_MaxLength + : int + = 999
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Maximum length of the input, default 999 characters.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_bool_Readonly + : bool + = false
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Set the input to be read only, default false.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_bool_Hidden + : bool + = false
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Set the input to be hidden, default false.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + getMetaBoxes() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns an array of all registered meta boxes for each section of the sub page.

                                                                                                                                                                                  + + + protected + getMetaBoxes() : array<string|int, mixed> + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.0.0 + +

                                                                                                                                                                                  discontinued

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.0.4 + +

                                                                                                                                                                                  restored to meet user demand for arrow symbol semantics

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                  discontinued, content moved to Settings > Reference container > Display a backlink symbol

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.0.4 + +

                                                                                                                                                                                  to reflect changes in meta box label display since WPv5.5 +spans need position:fixed and become unlocalizable +fix: logo is kept only in the label that doesn’t need to be translated: +Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.6 + +

                                                                                                                                                                                  / 2.2.0 tabs reordered and renamed

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + see +
                                                                                                                                                                                  +
                                                                                                                                                                                  + details + +

                                                                                                                                                                                  in class/config.php

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + array<string|int, mixed> + — +

                                                                                                                                                                                  Edited for 2.0.0 and later.

                                                                                                                                                                                  +

                                                                                                                                                                                  HyperlinkArrow meta box:

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + getSections() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns an array of all registered sections for the sub page.

                                                                                                                                                                                  + + + protected + getSections() : array<string|int, mixed> + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.6 + +

                                                                                                                                                                                  tabs reordered and renamed

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 2.1.6 + +

                                                                                                                                                                                  removed if statement around expert tab

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + link +
                                                                                                                                                                                  +
                                                                                                                                                                                  + https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + array<string|int, mixed> + — +

                                                                                                                                                                                  Edited:

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + getSubPageSlug() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the unique slug of the sub page.

                                                                                                                                                                                  + + + protected + getSubPageSlug() : string + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + getSubPageTitle() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Returns the title of the sub page.

                                                                                                                                                                                  + + + protected + getSubPageTitle() : string + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + string + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + LoadSetting() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Loads specific setting and returns an array with the keys [id, name, value].

                                                                                                                                                                                  + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_SettingKeyName + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Settings Array key name.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + array<string|int, mixed> + — +

                                                                                                                                                                                  Contains Settings ID, Settings Name and Settings Value.

                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + appendScripts() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Append javascript and css files for specific sub page.

                                                                                                                                                                                  + + + private + appendScripts() : mixed + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + registerMetaBoxes() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Registers all Meta boxes for a sub page.

                                                                                                                                                                                  + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Parameters
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + $p_str_ParentID + : string +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Parent section unique id.

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  + saveSettings() + +

                                                                                                                                                                                  + + +

                                                                                                                                                                                  Save all Plugin settings.

                                                                                                                                                                                  + + + private + saveSettings() : bool + +
                                                                                                                                                                                  + + + +
                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  + author +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +

                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + since +
                                                                                                                                                                                  +
                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  Return values
                                                                                                                                                                                  + bool + — +
                                                                                                                                                                                  + + +
                                                                                                                                                                                  +
                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                  +

                                                                                                                                                                                  Search results

                                                                                                                                                                                  + +
                                                                                                                                                                                  +
                                                                                                                                                                                  +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + + + + diff --git a/docs/classes/MCI-Footnotes-LayoutEngine.html b/docs/classes/MCI-Footnotes-LayoutEngine.html new file mode 100644 index 0000000..ff9e0f2 --- /dev/null +++ b/docs/classes/MCI-Footnotes-LayoutEngine.html @@ -0,0 +1,2222 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                    +

                                                                                                                                                                                    Documentation

                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +

                                                                                                                                                                                    + MCI_Footnotes_LayoutEngine + + + + +

                                                                                                                                                                                    + + + +

                                                                                                                                                                                    Layout Engine for the administration dashboard.

                                                                                                                                                                                    + +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + + + + + +

                                                                                                                                                                                    + Table of Contents + +

                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $a_arr_Sections + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Stores all Sections for the child sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + $a_str_SubPageHook + +  : null|string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Stores the Hook connection string for the child sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + Description() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Output the Description of a section. May be overwritten in any section.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + displayContent() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Displays the content of specific sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + getPriority() + +  : int +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns a Priority index. Lower numbers have a higher Priority.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + registerSections() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Registers all sections for a sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + registerSubPage() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Registers a sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addCheckbox() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for an input [type = checkbox].
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addColorSelection() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for an input [type = text] with color selection class.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addLabel() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for an input/select label.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addLineSpace() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns a line break to have a space between two lines.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addMetaBox() + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns an array describing a meta box.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addNewline() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns a line break to start a new line.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addNumBox() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for an input [type = num].
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addSection() + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns an array describing a sub page section.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addSelectBox() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for a select box.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addText() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns a simple text inside html <span> text.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addTextArea() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for a text area.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + addTextBox() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the html tag for an input [type = text].
                                                                                                                                                                                    + +
                                                                                                                                                                                    + getMetaBoxes() + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns an array of all registered meta boxes.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + getSections() + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns an array of all registered sections for a sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + getSubPageSlug() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the unique slug of the child sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + getSubPageTitle() + +  : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    Returns the title of the child sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + LoadSetting() + +  : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    Loads specific setting and returns an array with the keys [id, name, value].
                                                                                                                                                                                    + +
                                                                                                                                                                                    + appendScripts() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Append javascript and css files for specific sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + registerMetaBoxes() + +  : mixed +
                                                                                                                                                                                    +
                                                                                                                                                                                    Registers all Meta boxes for a sub page.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + saveSettings() + +  : bool +
                                                                                                                                                                                    +
                                                                                                                                                                                    Save all Plugin settings.
                                                                                                                                                                                    + +
                                                                                                                                                                                    + + + + + + +
                                                                                                                                                                                    +

                                                                                                                                                                                    + Properties + +

                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + $a_arr_Sections + + + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Stores all Sections for the child sub page.

                                                                                                                                                                                    + + + protected + array<string|int, mixed> + $a_arr_Sections + = array() + +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + $a_str_SubPageHook + + + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Stores the Hook connection string for the child sub page.

                                                                                                                                                                                    + + + protected + null|string + $a_str_SubPageHook + = +ull + +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +

                                                                                                                                                                                    + Methods + +

                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + Description() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Output the Description of a section. May be overwritten in any section.

                                                                                                                                                                                    + + + public + Description() : mixed + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + displayContent() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Displays the content of specific sub page.

                                                                                                                                                                                    + + + public + displayContent() : mixed + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + getPriority() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns a Priority index. Lower numbers have a higher Priority.

                                                                                                                                                                                    + + + public + abstract getPriority() : int + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + int + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + registerSections() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Registers all sections for a sub page.

                                                                                                                                                                                    + + + public + registerSections() : mixed + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + registerSubPage() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Registers a sub page.

                                                                                                                                                                                    + + + public + registerSubPage() : mixed + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addCheckbox() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for an input [type = checkbox].

                                                                                                                                                                                    + + + protected + addCheckbox(string $p_str_SettingName) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre load the input field.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addColorSelection() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for an input [type = text] with color selection class.

                                                                                                                                                                                    + + + protected + addColorSelection(string $p_str_SettingName) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre load the input field.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.6 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addLabel() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for an input/select label.

                                                                                                                                                                                    + + + protected + addLabel(string $p_str_SettingName, string $p_str_Caption) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to connect the Label with the input/select field.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_Caption + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Label caption.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 2.1.6 + +

                                                                                                                                                                                    no colon

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +

                                                                                                                                                                                    Edited 2020-12-01T0159+0100..

                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addLineSpace() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns a line break to have a space between two lines.

                                                                                                                                                                                    + + + protected + addLineSpace() : string + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addMetaBox() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns an array describing a meta box.

                                                                                                                                                                                    + + + protected + addMetaBox(string $p_str_SectionID, string $p_str_ID, string $p_str_Title, string $p_str_CallbackFunctionName) : array<string|int, mixed> + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SectionID + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Parent Section ID.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_ID + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Unique ID suffix.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_Title + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Title for the meta box.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_CallbackFunctionName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Class method name for callback.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + array<string|int, mixed> + — +

                                                                                                                                                                                    meta box description to be able to append a meta box to the output.

                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addNewline() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns a line break to start a new line.

                                                                                                                                                                                    + + + protected + addNewline() : string + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addNumBox() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for an input [type = num].

                                                                                                                                                                                    + + + protected + addNumBox(string $p_str_SettingName, int $p_in_Min, int $p_int_Max[, bool $p_bool_Deci = false ]) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre load the input field.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_in_Min + : int +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Minimum value.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_int_Max + : int +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Maximum value.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_bool_Deci + : bool + = false
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    true if 0.1 steps and floating to string, false if integer (default)

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 2.1.4 + +

                                                                                                                                                                                    step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +

                                                                                                                                                                                    Edited:

                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addSection() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns an array describing a sub page section.

                                                                                                                                                                                    + + + protected + addSection(string $p_str_ID, string $p_str_Title, int $p_int_SettingsContainerIndex[, bool $p_bool_hasSubmitButton = true ]) : array<string|int, mixed> + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_ID + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Unique ID suffix.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_Title + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Title of the section.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_int_SettingsContainerIndex + : int +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Settings Container Index.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_bool_hasSubmitButton + : bool + = true
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Should a Submit Button be displayed for this section, default: true.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + array<string|int, mixed> + — +

                                                                                                                                                                                    Array describing the section.

                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addSelectBox() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for a select box.

                                                                                                                                                                                    + + + protected + addSelectBox(string $p_str_SettingName, array<string|int, mixed> $p_arr_Options) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre select the current value.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_arr_Options + : array<string|int, mixed> +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Possible options to be selected.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addText() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns a simple text inside html <span> text.

                                                                                                                                                                                    + + + protected + addText(string $p_str_Text) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_Text + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Message to be surrounded with simple html tag (span).

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addTextArea() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for a text area.

                                                                                                                                                                                    + + + protected + addTextArea(string $p_str_SettingName) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre fill the text area.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + addTextBox() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the html tag for an input [type = text].

                                                                                                                                                                                    + + + protected + addTextBox(string $p_str_SettingName[, int $p_str_MaxLength = 999 ][, bool $p_bool_Readonly = false ][, bool $p_bool_Hidden = false ]) : string + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Name of the Settings key to pre load the input field.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_MaxLength + : int + = 999
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Maximum length of the input, default 999 characters.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_bool_Readonly + : bool + = false
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Set the input to be read only, default false.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_bool_Hidden + : bool + = false
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Set the input to be hidden, default false.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + getMetaBoxes() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns an array of all registered meta boxes.

                                                                                                                                                                                    + + + protected + abstract getMetaBoxes() : array<string|int, mixed> + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + array<string|int, mixed> + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + getSections() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns an array of all registered sections for a sub page.

                                                                                                                                                                                    + + + protected + abstract getSections() : array<string|int, mixed> + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + array<string|int, mixed> + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + getSubPageSlug() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the unique slug of the child sub page.

                                                                                                                                                                                    + + + protected + abstract getSubPageSlug() : string + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + getSubPageTitle() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Returns the title of the child sub page.

                                                                                                                                                                                    + + + protected + abstract getSubPageTitle() : string + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + string + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + LoadSetting() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Loads specific setting and returns an array with the keys [id, name, value].

                                                                                                                                                                                    + + + protected + LoadSetting(string $p_str_SettingKeyName) : array<string|int, mixed> + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_SettingKeyName + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Settings Array key name.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + array<string|int, mixed> + — +

                                                                                                                                                                                    Contains Settings ID, Settings Name and Settings Value.

                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + appendScripts() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Append javascript and css files for specific sub page.

                                                                                                                                                                                    + + + private + appendScripts() : mixed + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + registerMetaBoxes() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Registers all Meta boxes for a sub page.

                                                                                                                                                                                    + + + private + registerMetaBoxes(string $p_str_ParentID) : mixed + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Parameters
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + $p_str_ParentID + : string +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Parent section unique id.

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + mixed + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    + saveSettings() + +

                                                                                                                                                                                    + + +

                                                                                                                                                                                    Save all Plugin settings.

                                                                                                                                                                                    + + + private + saveSettings() : bool + +
                                                                                                                                                                                    + + + +
                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    + author +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +

                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + since +
                                                                                                                                                                                    +
                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    Return values
                                                                                                                                                                                    + bool + — +
                                                                                                                                                                                    + + +
                                                                                                                                                                                    +
                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                    +

                                                                                                                                                                                    Search results

                                                                                                                                                                                    + +
                                                                                                                                                                                    +
                                                                                                                                                                                    +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + + + + diff --git a/docs/classes/MCI-Footnotes-Settings.html b/docs/classes/MCI-Footnotes-Settings.html new file mode 100644 index 0000000..e436525 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Settings.html @@ -0,0 +1,6221 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                      +

                                                                                                                                                                                      Documentation

                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +

                                                                                                                                                                                      + MCI_Footnotes_Settings + + + + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Loads the settings values, sets to default values if undefined.

                                                                                                                                                                                      + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + +

                                                                                                                                                                                      + Table of Contents + +

                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_max_width_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + +  = "footnotes_inputfield_backlinks_column_width_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + +  = "footnotes_inputfield_backlinks_line_breaks_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + +  = "footnotes_inputfield_backlinks_separator_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + +  = "footnotes_inputfield_backlinks_terminator_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +  = "footnote_inputfield_combine_identical" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for combining identical footnotes.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +  = "footnote_inputfield_custom_css_legacy_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable display of legacy Custom CSS metaboxes.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +  = "footnote_inputfield_expert_lookup_the_content" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the 'the_content' hook.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +  = "footnote_inputfield_expert_lookup_the_excerpt" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the 'the_excerpt' hook.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +  = "footnote_inputfield_expert_lookup_the_title" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the 'the_title' hook.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +  = "footnote_inputfield_expert_lookup_widget_text" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the 'widget_text' hook.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +  = "footnote_inputfield_expert_lookup_widget_title" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the 'widget_title' hook.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +  = "footnotes_inputfield_shortcode_syntax_validation_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key for shortcode syntax validation.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +  = "footnote_inputfield_url_wrap_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for URL wrap option
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + +  = "footnotes_inputfield_backlink_tooltip_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to enable backlink tooltips.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_EXPERT_MODE + +  = "footnote_inputfield_enable_expert_mode" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the Expert mode.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + +  = "footnotes_inputfield_hard_links_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_IN_EXCERPT + +  = "footnote_inputfield_search_in_excerpt" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to look for footnotes in post excerpts.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +  = "footnote_inputfield_custom_mouse_over_box_alternative" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the alternative tooltips.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the mouse-over box.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable tooltip truncation.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +  = "footnotes_inputfield_referrer_superscript_tags" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the referrer element.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +  = "footnotes_inputfield_tooltip_excerpt_mirror_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to enable mirroring the tooltip excerpt in the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_LINK_ELEMENT_ENABLED + +  = "footnote_inputfield_link_element_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +  = "footnotes_inputfield_mouse_over_box_font_size_enabled" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +  = "footnotes_inputfield_reference_container_3column_layout_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the legacy layout of the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + +  = "footnotes_inputfield_reference_container_backlink_symbol_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to enable the display of a backlink symbol.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + +  = "footnotes_inputfield_reference_container_backlink_symbol_switch" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to get the backlink symbol switch side.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +  = "footnote_inputfield_collapse_references" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to collapse the reference container by default.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +  = "footnotes_inputfield_reference_container_label_bottom_border" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +  = "footnotes_inputfield_reference_container_row_borders_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for table cell borders, thanks to @noobishh
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +  = "footnotes_inputfield_reference_container_start_page_enable" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key to not display the reference container on the homepage.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +  = "footnotes_inputfield_mouse_over_box_font_size_scalar" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_max_width_scalar" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + +  = "footnotes_inputfield_backlinks_column_width_scalar" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_content_priority_level" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for 'the_content' hook priority level.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_the_title_priority_level" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for '' hook priority level
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_text_priority_level" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +  = "footnote_inputfield_expert_lookup_widget_title_priority_level" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_x" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnotes_inputfield_alternative_mouse_over_box_offset_y" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +  = "footnotes_inputfield_alternative_mouse_over_box_width" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +  = "footnote_inputfield_custom_mouse_over_box_border_radius" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border radius.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_border_width" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border width.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +  = "footnote_inputfield_custom_mouse_over_box_excerpt_length" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +  = "footnote_inputfield_custom_mouse_over_box_max_width" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the max. width.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +  = "footnote_inputfield_custom_mouse_over_box_offset_x" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the offset (x).
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +  = "footnote_inputfield_custom_mouse_over_box_offset_y" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the offset (y).
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_SCROLL_DURATION + +  = "footnotes_inputfield_scroll_duration" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_FOOTNOTES_SCROLL_OFFSET + +  = "footnotes_inputfield_scroll_offset" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Scroll offset and duration
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_in_delay" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_in_duration" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +  = "footnotes_inputfield_mouse_over_box_fade_out_delay" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +  = "footnotes_inputfield_mouse_over_box_fade_out_duration" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +  = "footnotes_inputfield_reference_container_bottom_margin" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +  = "footnotes_inputfield_reference_container_top_margin" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_max_width_unit" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + +  = "footnotes_inputfield_backlinks_column_width_unit" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_SEPARATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_separator_custom" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_SEPARATOR_OPTION + +  = "footnotes_inputfield_backlinks_separator_option" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_TERMINATOR_CUSTOM + +  = "footnotes_inputfield_backlinks_terminator_custom" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_BACKLINKS_TERMINATOR_OPTION + +  = "footnotes_inputfield_backlinks_terminator_option" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_CUSTOM_CSS + +  = "footnote_inputfield_custom_css" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the Custom CSS.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_CUSTOM_CSS_NEW + +  = "footnote_inputfield_custom_css_new" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the Custom CSS migrated to a dedicated tab.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_footnote_fragment_id_slug" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +  = "footnotes_inputfield_referrers_normal_superscript" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to enable superscript style normalization.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +  = "footnotes_inputfield_alternative_mouse_over_box_position" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + +  = "footnotes_inputfield_backlink_tooltip_text" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to configure the backlink tooltip.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_COUNTER_STYLE + +  = "footnote_inputfield_counter_style" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the counter style of the footnotes.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_LOVE + +  = "footnote_inputfield_love" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the 'I love footnotes' text.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +  = "footnote_inputfield_custom_mouse_over_box_background" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the background color.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_border_color" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border color.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_color" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the color.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +  = "footnote_inputfield_custom_mouse_over_box_position" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the position.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +  = "footnote_inputfield_custom_mouse_over_box_shadow_color" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the box-shadow color.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +  = "footnotes_inputfield_page_layout_support" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +  = "footnotes_inputfield_reference_container_script_mode" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to select the script mode for the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_END + +  = "footnote_inputfield_placeholder_end" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the short code of the footnote’s end.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +  = "footnote_inputfield_placeholder_end_user_defined" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the user-defined short code of the footnotes end.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_START + +  = "footnote_inputfield_placeholder_start" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the short code of the footnote’s start.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +  = "footnote_inputfield_placeholder_start_user_defined" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the user-defined short code of the footnotes start.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_STYLING_AFTER + +  = "footnote_inputfield_custom_styling_after" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the string after the footnote referrer.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_STYLING_BEFORE + +  = "footnote_inputfield_custom_styling_before" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the string before the footnote referrer.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +  = "footnotes_inputfield_tooltip_excerpt_delimiter" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to configure the tooltip excerpt delimiter.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +  = "footnotes_inputfield_tooltip_excerpt_mirror_separator" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings container key to configure the tooltip excerpt separator in the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +  = "footnote_inputfield_readon_label" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the label of the Read-on button in truncated tooltips.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_HARD_LINK_IDS_SEPARATOR + +  = "footnotes_inputfield_hard_link_ids_separator" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_HYPERLINK_ARROW + +  = "footnote_inputfield_custom_hyperlink_symbol" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the backlink symbol selection.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_HYPERLINK_ARROW_USER_DEFINED + +  = "footnote_inputfield_custom_hyperlink_symbol_user" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the user-defined backlink symbol.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +  = "footnotes_inputfield_mouse_over_box_font_size_unit" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +  = "footnotes_inputfield_reference_container_label_element" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_NAME + +  = "footnote_inputfield_references_label" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the label of the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_POSITION + +  = "footnote_inputfield_reference_container_place" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for the position of the reference container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +  = "footnote_inputfield_reference_container_position_shortcode" +
                                                                                                                                                                                      +
                                                                                                                                                                                      Settings Container Key for reference container position shortcode
                                                                                                                                                                                      + +
                                                                                                                                                                                      + C_STR_REFERRER_FRAGMENT_ID_SLUG + +  = "footnotes_inputfield_referrer_fragment_id_slug" +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      + $a_arr_Container + +  : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      Contains all Settings Container names.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + $a_arr_Default + +  : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      Contains all Default Settings for each Settings Container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + $a_arr_Settings + +  : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      Contains all Settings from each Settings container as soon as this class is initialized.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + $a_obj_Instance + +  : MCI_Footnotes_Settings +
                                                                                                                                                                                      +
                                                                                                                                                                                      Stores a singleton reference of this class.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + ClearAll() + +  : mixed +
                                                                                                                                                                                      +
                                                                                                                                                                                      Deletes each Settings Container and loads the default values for each Settings Container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + get() + +  : mixed +
                                                                                                                                                                                      +
                                                                                                                                                                                      Returns the value of specified Settings name.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + getContainer() + +  : str +
                                                                                                                                                                                      +
                                                                                                                                                                                      Returns the name of a specified Settings Container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + getDefaults() + +  : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      Returns the default values of a specific Settings Container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + instance() + +  : MCI_Footnotes_Settings +
                                                                                                                                                                                      +
                                                                                                                                                                                      Returns a singleton of this class.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + RegisterSettings() + +  : mixed +
                                                                                                                                                                                      +
                                                                                                                                                                                      Register all Settings Container for the Plugin Settings Page in the Dashboard.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + saveOptions() + +  : bool +
                                                                                                                                                                                      +
                                                                                                                                                                                      Updates a whole Settings container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + __construct() + +  : mixed +
                                                                                                                                                                                      +
                                                                                                                                                                                      Class Constructor. Loads all Settings from each WordPress Settings container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + Load() + +  : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      Loads all Settings from specified Settings Container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + loadAll() + +  : mixed +
                                                                                                                                                                                      +
                                                                                                                                                                                      Loads all Settings from each Settings container.
                                                                                                                                                                                      + +
                                                                                                                                                                                      + + + + +
                                                                                                                                                                                      +

                                                                                                                                                                                      + Constants + +

                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_max_width_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED + = "footnotes_inputfield_backlinks_column_width_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED + = "footnotes_inputfield_backlinks_line_breaks_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_BACKLINKS_SEPARATOR_ENABLED + = "footnotes_inputfield_backlinks_separator_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_BACKLINKS_TERMINATOR_ENABLED + = "footnotes_inputfield_backlinks_terminator_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for combining identical footnotes.

                                                                                                                                                                                      + + + public + str + C_BOOL_COMBINE_IDENTICAL_FOOTNOTES + = "footnote_inputfield_combine_identical" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable display of legacy Custom CSS metaboxes.

                                                                                                                                                                                      + + + public + str + C_BOOL_CUSTOM_CSS_LEGACY_ENABLE + = "footnote_inputfield_custom_css_legacy_enable" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.2 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.3.0 + +

                                                                                                                                                                                      swap Boolean from 'migration complete' to 'show legacy'

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-12-15T0520+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 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 toBool() converts empty to false.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the 'the_content' hook.

                                                                                                                                                                                      + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_CONTENT + = "footnote_inputfield_expert_lookup_the_content" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the 'the_excerpt' hook.

                                                                                                                                                                                      + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_EXCERPT + = "footnote_inputfield_expert_lookup_the_excerpt" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_THE_TITLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the 'the_title' hook.

                                                                                                                                                                                      + + + public + str + C_BOOL_EXPERT_LOOKUP_THE_TITLE + = "footnote_inputfield_expert_lookup_the_title" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the 'widget_text' hook.

                                                                                                                                                                                      + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT + = "footnote_inputfield_expert_lookup_widget_text" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the 'widget_title' hook.

                                                                                                                                                                                      + + + public + str + C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE + = "footnote_inputfield_expert_lookup_widget_title" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key for shortcode syntax validation.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE + = "footnotes_inputfield_shortcode_syntax_validation_enable" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.4.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2021-01-01T0616+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for URL wrap option

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTE_URL_WRAP_ENABLED + = "footnote_inputfield_url_wrap_enabled" + + + +

                                                                                                                                                                                      This is made optional because it causes weird line breaks. +Unicode-compliant browsers break URLs at slashes.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings container key to enable backlink tooltips.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE + = "footnotes_inputfield_backlink_tooltip_enable" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @theroninjedi47

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      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 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_EXPERT_MODE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the Expert mode.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_EXPERT_MODE + = "footnote_inputfield_enable_expert_mode" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 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.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE + = "footnotes_inputfield_hard_links_enable" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_IN_EXCERPT + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to look for footnotes in post excerpts.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_IN_EXCERPT + = "footnote_inputfield_search_in_excerpt" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the alternative tooltips.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE + = "footnote_inputfield_custom_mouse_over_box_alternative" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-11T1817+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @andreasra

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the mouse-over box.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED + = "footnote_inputfield_custom_mouse_over_box_enabled" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.2 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable tooltip truncation.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED + = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the referrer element.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS + = "footnotes_inputfield_referrer_superscript_tags" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-16T0859+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @cwbayer

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key to enable mirroring the tooltip excerpt in the reference container.

                                                                                                                                                                                      + + + public + str + C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE + = "footnotes_inputfield_tooltip_excerpt_mirror_enable" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      But this must not be the default behavior.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/change-tooltip-text/#post-13935488 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings Container Keys for the link element option +Settings Container Keys for backlink typography and layout +Settings Container Keys for tooltip font size +Settings Container Keys for page layout support +Settings Container Keys for scroll offset and duration +Settings Container Keys for tooltip display durations

                                                                                                                                                                                      + + + public + str|bool|int|flo + C_BOOL_LINK_ELEMENT_ENABLED + = "footnote_inputfield_link_element_enabled" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + +

                                                                                                                                                                                      + + + + + + public + mixed + C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED + = "footnotes_inputfield_mouse_over_box_font_size_enabled" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to enable the legacy layout of the reference container.

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE + = "footnotes_inputfield_reference_container_3column_layout_enable" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings Container Key to enable the display of a backlink symbol.

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE + = "footnotes_inputfield_reference_container_backlink_symbol_enable" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @spaceling

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings Container Key to get the backlink symbol switch side.

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH + = "footnotes_inputfield_reference_container_backlink_symbol_switch" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-16T2024+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + contributor +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @spaceling

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/change-the-position-5/#post-13615994 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to collapse the reference container by default.

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_COLLAPSE + = "footnote_inputfield_collapse_references" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + see +
                                                                                                                                                                                      +
                                                                                                                                                                                      + MCI_Footnotes_Convert::toBool() + +

                                                                                                                                                                                      The type in the variable name is useful to show the intention.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + todo +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + +

                                                                                                                                                                                      + + + + + + public + mixed + C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER + = "footnotes_inputfield_reference_container_label_bottom_border" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for table cell borders, thanks to @noobishh

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE + = "footnotes_inputfield_reference_container_row_borders_enable" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/borders-25/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.10 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key to not display the reference container on the homepage.

                                                                                                                                                                                      + + + public + str + C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE + = "footnotes_inputfield_reference_container_start_page_enable" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @dragon013

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + +

                                                                                                                                                                                      + + + + + + public + mixed + C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR + = "footnotes_inputfield_mouse_over_box_font_size_scalar" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_max_width_scalar" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR + = "footnotes_inputfield_backlinks_column_width_scalar" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for 'the_content' hook priority level.

                                                                                                                                                                                      + + + public + str + C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_content_priority_level" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.1 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-16T0859+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_excerpt_priority_level" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for '' hook priority level

                                                                                                                                                                                      + + + public + str + C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_the_title_priority_level" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.2 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-20T0620+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_text_priority_level" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL + = "footnote_inputfield_expert_lookup_widget_title_priority_level" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X + = "footnotes_inputfield_alternative_mouse_over_box_offset_x" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y + = "footnotes_inputfield_alternative_mouse_over_box_offset_y" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH + = "footnotes_inputfield_alternative_mouse_over_box_width" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border radius.

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS + = "footnote_inputfield_custom_mouse_over_box_border_radius" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border width.

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH + = "footnote_inputfield_custom_mouse_over_box_border_width" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt.

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH + = "footnote_inputfield_custom_mouse_over_box_excerpt_length" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the max. width.

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH + = "footnote_inputfield_custom_mouse_over_box_max_width" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the offset (x).

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X + = "footnote_inputfield_custom_mouse_over_box_offset_x" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.7 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the offset (y).

                                                                                                                                                                                      + + + public + str + C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y + = "footnote_inputfield_custom_mouse_over_box_offset_y" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.7 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_SCROLL_DURATION + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_FOOTNOTES_SCROLL_DURATION + = "footnotes_inputfield_scroll_duration" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_FOOTNOTES_SCROLL_OFFSET + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Scroll offset and duration

                                                                                                                                                                                      + + + public + mixed + C_INT_FOOTNOTES_SCROLL_OFFSET + = "footnotes_inputfield_scroll_offset" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                                                                                                                                                                                      • +
                                                                                                                                                                                      • Bugfix: Scroll duration: make configurable to conform to website content and style requirements.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-12-05T0538+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY + = "footnotes_inputfield_mouse_over_box_fade_in_delay" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION + = "footnotes_inputfield_mouse_over_box_fade_in_duration" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY + = "footnotes_inputfield_mouse_over_box_fade_out_delay" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION + = "footnotes_inputfield_mouse_over_box_fade_out_duration" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + +

                                                                                                                                                                                      + + + + + + public + mixed + C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN + = "footnotes_inputfield_reference_container_bottom_margin" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container keys for reference container top and bottom margins +Settings container keys for hard link enabling +Settings container keys for hard link anchors in referrers and footnotes

                                                                                                                                                                                      + + + public + int|bool|str + C_INT_REFERENCE_CONTAINER_TOP_MARGIN + = "footnotes_inputfield_reference_container_top_margin" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.3.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_max_width_unit" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_COLUMN_WIDTH_UNIT + = "footnotes_inputfield_backlinks_column_width_unit" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_CUSTOM + = "footnotes_inputfield_backlinks_separator_custom" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_SEPARATOR_OPTION + = "footnotes_inputfield_backlinks_separator_option" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_CUSTOM + = "footnotes_inputfield_backlinks_terminator_custom" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_BACKLINKS_TERMINATOR_OPTION + = "footnotes_inputfield_backlinks_terminator_option" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_CUSTOM_CSS + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the Custom CSS.

                                                                                                                                                                                      + + + public + str + C_STR_CUSTOM_CSS + = "footnote_inputfield_custom_css" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.3.0 + +

                                                                                                                                                                                      Adding: new settings tab for custom CSS settings.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_CUSTOM_CSS_NEW + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the Custom CSS migrated to a dedicated tab.

                                                                                                                                                                                      + + + public + str + C_STR_CUSTOM_CSS_NEW + = "footnote_inputfield_custom_css_new" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.2 + +

                                                                                                                                                                                      Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-12-15T0520+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + +

                                                                                                                                                                                      + + + + + + public + mixed + C_STR_FOOTNOTE_FRAGMENT_ID_SLUG + = "footnotes_inputfield_footnote_fragment_id_slug" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key to enable superscript style normalization.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT + = "footnotes_inputfield_referrers_normal_superscript" + + + +

                                                                                                                                                                                      -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.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @tomturowski

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Keys for alternative tooltip position +Settings Container Keys for reference container label element, thanks to @markhillyer

                                                                                                                                                                                      + + + public + int + C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION + = "footnotes_inputfield_alternative_mouse_over_box_position" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.5 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings container key to configure the backlink tooltip.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT + = "footnotes_inputfield_backlink_tooltip_text" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @theroninjedi47

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_COUNTER_STYLE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the counter style of the footnotes.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_COUNTER_STYLE + = "footnote_inputfield_counter_style" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_LOVE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the 'I love footnotes' text.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_LOVE + = "footnote_inputfield_love" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the background color.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND + = "footnote_inputfield_custom_mouse_over_box_background" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the border color.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR + = "footnote_inputfield_custom_mouse_over_box_border_color" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the color.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR + = "footnote_inputfield_custom_mouse_over_box_color" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the position.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION + = "footnote_inputfield_custom_mouse_over_box_position" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.7 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the mouse-over box to define the box-shadow color.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR + = "footnote_inputfield_custom_mouse_over_box_shadow_color" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.8 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + +

                                                                                                                                                                                      + + + + + + public + mixed + C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT + = "footnotes_inputfield_page_layout_support" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key to select the script mode for the reference container.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE + = "footnotes_inputfield_reference_container_script_mode" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @hopper87it

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/footnotes-wp-rocket/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_END + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the short code of the footnote’s end.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END + = "footnote_inputfield_placeholder_end" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the user-defined short code of the footnotes end.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED + = "footnote_inputfield_placeholder_end_user_defined" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_START + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the short code of the footnote’s start.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START + = "footnote_inputfield_placeholder_start" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the user-defined short code of the footnotes start.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED + = "footnote_inputfield_placeholder_start_user_defined" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_STYLING_AFTER + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the string after the footnote referrer.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_STYLING_AFTER + = "footnote_inputfield_custom_styling_after" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_STYLING_BEFORE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the string before the footnote referrer.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_STYLING_BEFORE + = "footnote_inputfield_custom_styling_before" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key to configure the tooltip excerpt delimiter.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER + = "footnotes_inputfield_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.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @jbj2199

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      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.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings container key to configure the tooltip excerpt separator in the reference container.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR + = "footnotes_inputfield_tooltip_excerpt_mirror_separator" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.5.4 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the label of the Read-on button in truncated tooltips.

                                                                                                                                                                                      + + + public + str + C_STR_FOOTNOTES_TOOLTIP_READON_LABEL + = "footnote_inputfield_readon_label" + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                      • Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
                                                                                                                                                                                      • +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + date +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      2020-11-08T2106+0100

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + reporter +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      @rovanov

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + + + + public + mixed + C_STR_HARD_LINK_IDS_SEPARATOR + = "footnotes_inputfield_hard_link_ids_separator" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings Container Key for the backlink symbol selection.

                                                                                                                                                                                      + + + public + str + C_STR_HYPERLINK_ARROW + = "footnote_inputfield_custom_hyperlink_symbol" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + + + +

                                                                                                                                                                                      Settings Container Key for the user-defined backlink symbol.

                                                                                                                                                                                      + + + public + str + C_STR_HYPERLINK_ARROW_USER_DEFINED + = "footnote_inputfield_custom_hyperlink_symbol_user" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + +

                                                                                                                                                                                      + + + + + + public + mixed + C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT + = "footnotes_inputfield_mouse_over_box_font_size_unit" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + +

                                                                                                                                                                                      + + + + + + public + mixed + C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT + = "footnotes_inputfield_reference_container_label_element" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_NAME + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the label of the reference container.

                                                                                                                                                                                      + + + public + str + C_STR_REFERENCE_CONTAINER_NAME + = "footnote_inputfield_references_label" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_POSITION + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for the position of the reference container.

                                                                                                                                                                                      + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION + = "footnote_inputfield_reference_container_place" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + +

                                                                                                                                                                                      + + + +

                                                                                                                                                                                      Settings Container Key for reference container position shortcode

                                                                                                                                                                                      + + + public + str + C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE + = "footnote_inputfield_reference_container_position_shortcode" + + + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + C_STR_REFERRER_FRAGMENT_ID_SLUG + +

                                                                                                                                                                                      + + + + + + public + mixed + C_STR_REFERRER_FRAGMENT_ID_SLUG + = "footnotes_inputfield_referrer_fragment_id_slug" + + + + + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +

                                                                                                                                                                                      + Properties + +

                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + $a_arr_Container + + + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Contains all Settings Container names.

                                                                                                                                                                                      + + + private + array<string|int, mixed> + $a_arr_Container + = array("footnotes_storage", "footnotes_storage_custom", "footnotes_storage_expert", "footnotes_storage_custom_css") + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + $a_arr_Default + + + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Contains all Default Settings for each Settings Container.

                                                                                                                                                                                      + + + private + array<string|int, mixed> + $a_arr_Default + = array("footnotes_storage" => array( + self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', + self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', + self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', + self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', + self::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes', + self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', + self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', + self::C_BOOL_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_INT_FOOTNOTES_SCROLL_OFFSET => 20, + self::C_INT_FOOTNOTES_SCROLL_DURATION => 380, + // 2.5.4 fast-tracked: + self::C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes', + self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←', + self::C_STR_REFERENCE_CONTAINER_NAME => 'References', + self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', + self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', + self::C_BOOL_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_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + // whether to enqueue additional stylesheet: + self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // top and bottom margins: + self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24, + self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0, + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // backlink symbol: + self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', + self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', + // backlink separators and terminators are often not preferred. + // but a choice must be provided along with the ability to customize: + self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes', + self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma', + self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '', + self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no', + self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop', + self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '', + // set backlinks column width: + self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50', + self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px', + // set backlinks column max. width: + self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no', + self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140', + self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px', + // whether a <br /> tag is inserted: + self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no', + // whether to enable URL line wrapping: + self::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED => 'yes', + // whether to use link elements: + self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes', + // excerpt should be disabled: + self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', + self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', + self::C_STR_FOOTNOTES_LOVE => 'no', +), "footnotes_storage_custom" => array( + self::C_STR_HYPERLINK_ARROW => '&#8593;', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', + self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', + // 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: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + // 2.5.4 fast-tracked: + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', + self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', + self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', + // 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: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + // fixed width is for alternative tooltips, cannot reuse max-width nor offsets: + self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right', + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24, + self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400, + // tooltip display durations: + // called mouse over box not tooltip for consistency + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0, + self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400, + self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200, + // tooltip font size reset to legacy by default since 2.1.4; + // was set to inherit since 2.1.1 as it overrode custom CSS, + // is moved to settings since 2.1.4 2020-12-04T1023+0100 + self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes', + self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13, + self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px', + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', + // Custom CSS migrates to a dedicated tab: + self::C_STR_CUSTOM_CSS => '', +), "footnotes_storage_expert" => array( + // These are checkboxes; keyword 'checked' is converted to Boolean true, + // empty string to false (default): + // Titles should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. + // See <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. + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked', + // And the_excerpt is disabled by default following @nikelaos in + // <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879> + // <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068> + self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + // 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. + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', + // initially hard-coded default + // shows "9223372036854780000" instead of 9223372036854775807 in the numbox + // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty: + // <https://github.com/Modernizr/Modernizr/issues/171> + // interpret -1 as PHP_INT_MAX instead + self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + // 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. + self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, + self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, +), "footnotes_storage_custom_css" => array(self::C_BOOL_CUSTOM_CSS_LEGACY_ENABLE => 'yes', self::C_STR_CUSTOM_CSS_NEW => '')) + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.1.3 + +

                                                                                                                                                                                      excerpt hook: disable by default, thanks to @nikelaos

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + $a_arr_Settings + + + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Contains all Settings from each Settings container as soon as this class is initialized.

                                                                                                                                                                                      + + + private + array<string|int, mixed> + $a_arr_Settings + = array() + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + $a_obj_Instance + + + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Stores a singleton reference of this class.

                                                                                                                                                                                      + + + private + static MCI_Footnotes_Settings + $a_obj_Instance + = +ull + +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +

                                                                                                                                                                                      + Methods + +

                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + ClearAll() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Deletes each Settings Container and loads the default values for each Settings Container.

                                                                                                                                                                                      + + + public + ClearAll() : mixed + +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +

                                                                                                                                                                                      Edit: This didn’t actually work.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 2.2.0 + +

                                                                                                                                                                                      this function is not called any longer when deleting the plugin, +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

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + mixed + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + get() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Returns the value of specified Settings name.

                                                                                                                                                                                      + + + public + get(string $p_str_Key) : mixed + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Parameters
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_str_Key + : string +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Settings Array Key name.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + mixed + — +

                                                                                                                                                                                      Value of the Setting on Success or Null in Settings name is invalid.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + getContainer() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Returns the name of a specified Settings Container.

                                                                                                                                                                                      + + + public + getContainer(int $p_int_Index) : str + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Parameters
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_int_Index + : int +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Settings Container Array Key Index.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + str + — +

                                                                                                                                                                                      Settings Container name.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + getDefaults() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Returns the default values of a specific Settings Container.

                                                                                                                                                                                      + + + public + getDefaults(int $p_int_Index) : array<string|int, mixed> + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Parameters
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_int_Index + : int +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Settings Container Aray Key Index.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.6 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + array<string|int, mixed> + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + instance() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Returns a singleton of this class.

                                                                                                                                                                                      + + + public + static instance() : MCI_Footnotes_Settings + +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + MCI_Footnotes_Settings + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + RegisterSettings() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Register all Settings Container for the Plugin Settings Page in the Dashboard.

                                                                                                                                                                                      + + + public + RegisterSettings() : mixed + +

                                                                                                                                                                                      Settings Container Label will be the same as the Settings Container Name.

                                                                                                                                                                                      +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + mixed + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + saveOptions() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Updates a whole Settings container.

                                                                                                                                                                                      + + + public + saveOptions(int $p_int_Index, array<string|int, mixed> $p_arr_newValues) : bool + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Parameters
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_int_Index + : int +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Index of the Settings container.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_arr_newValues + : array<string|int, mixed> +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      new Settings.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + bool + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + __construct() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Class Constructor. Loads all Settings from each WordPress Settings container.

                                                                                                                                                                                      + + + private + __construct() : mixed + +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + mixed + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + Load() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Loads all Settings from specified Settings Container.

                                                                                                                                                                                      + + + private + Load(int $p_int_Index) : array<string|int, mixed> + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Parameters
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + $p_int_Index + : int +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Settings Container Array Key Index.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      ditched trimming whitespace from text box content in response to user request.

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + link +
                                                                                                                                                                                      +
                                                                                                                                                                                      + https://wordpress.org/support/topic/leading-space-in-footnotes-tag/#post-5347966 + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + array<string|int, mixed> + — +

                                                                                                                                                                                      Settings loaded from Container of Default Settings if Settings Container is empty (first usage).

                                                                                                                                                                                      +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      + loadAll() + +

                                                                                                                                                                                      + + +

                                                                                                                                                                                      Loads all Settings from each Settings container.

                                                                                                                                                                                      + + + private + loadAll() : mixed + +
                                                                                                                                                                                      + + + +
                                                                                                                                                                                      + Tags + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      + author +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +

                                                                                                                                                                                      Stefan Herndler

                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + since +
                                                                                                                                                                                      +
                                                                                                                                                                                      + 1.5.0 + +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      Return values
                                                                                                                                                                                      + mixed + — +
                                                                                                                                                                                      + + +
                                                                                                                                                                                      +
                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                      +

                                                                                                                                                                                      Search results

                                                                                                                                                                                      + +
                                                                                                                                                                                      +
                                                                                                                                                                                      +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + + + + diff --git a/docs/classes/MCI-Footnotes-Task.html b/docs/classes/MCI-Footnotes-Task.html new file mode 100644 index 0000000..b8cddb3 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Task.html @@ -0,0 +1,2902 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                        +

                                                                                                                                                                                        Documentation

                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +

                                                                                                                                                                                        + MCI_Footnotes_Task + + + + +

                                                                                                                                                                                        + + + +

                                                                                                                                                                                        Searches and replaces the footnotes.

                                                                                                                                                                                        + +

                                                                                                                                                                                        Generates the reference container.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + + + + +

                                                                                                                                                                                        + Table of Contents + +

                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $a_arr_Footnotes + +  : array<string|int, mixed> +
                                                                                                                                                                                        +
                                                                                                                                                                                        Contains all footnotes found on current public page.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_AllowLoveMe + +  : bool +
                                                                                                                                                                                        +
                                                                                                                                                                                        Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_HardLinksEnable + +  : bool|str|int +
                                                                                                                                                                                        +
                                                                                                                                                                                        Hard links for AMP compatibility
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_MirrorTooltipText + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Dedicated tooltip text
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_SyntaxErrorFlag + +  : bool +
                                                                                                                                                                                        +
                                                                                                                                                                                        Footnote delimiter syntax validation
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_bool_TooltipsEnabled + +  : bool +
                                                                                                                                                                                        +
                                                                                                                                                                                        Template process optimization
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_int_PostId + +  : int +
                                                                                                                                                                                        +
                                                                                                                                                                                        Infinite scroll / autoload or archive view
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_int_ReferenceContainerId + +  : int +
                                                                                                                                                                                        +
                                                                                                                                                                                        Multiple reference containers in content and widgets
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_int_ScrollOffset + +  : int +
                                                                                                                                                                                        +
                                                                                                                                                                                        Scroll offset
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_int_TooltipShortcodeLength + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_FootnoteLinkSlug + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_LinkCloseTag + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_LinkIdsSeparator + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_LinkOpenTag + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_LinkSpan + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Optional link element for footnote referrers and backlinks
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_PostContainerIdCompound + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_Prefix + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Prefix for the Footnote html element ID.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_ReferrerLinkSlug + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + $a_str_TooltipShortcode + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        + exec() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces all footnotes that occur in the given content.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + ReferenceContainer() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Generates the reference container.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + registerHooks() + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Register WordPress Hooks to replace Footnotes in the content of a public page.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + search() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces all footnotes in the given content and appends them to the static property.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + the_content() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in the content of the current page/post.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + the_excerpt() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in the excerpt of the current page/post.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + the_post() + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in each Content var of the current Post object.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + the_title() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in the post/page title.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + widget_text() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in the content of the current widget.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + widget_title() + +  : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replaces footnotes in the widget title.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + wp_footer() + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Displays the 'LOVE FOOTNOTES' slug if enabled.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + wp_head() + +  : mixed +
                                                                                                                                                                                        +
                                                                                                                                                                                        Outputs the custom css to the header of the public page.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + replacePostObject() + +  : WP_Post +
                                                                                                                                                                                        +
                                                                                                                                                                                        Replace all Footnotes in a WP_Post object.
                                                                                                                                                                                        + +
                                                                                                                                                                                        + + + + + + +
                                                                                                                                                                                        +

                                                                                                                                                                                        + Properties + +

                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_arr_Footnotes + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Contains all footnotes found on current public page.

                                                                                                                                                                                        + + + public + static array<string|int, mixed> + $a_arr_Footnotes + = array() + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_AllowLoveMe + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Flag if the display of 'LOVE FOOTNOTES' is allowed on the current public page.

                                                                                                                                                                                        + + + public + static bool + $a_bool_AllowLoveMe + = rue + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_AlternativeTooltipsEnabled + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_HardLinksEnable + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Hard links for AMP compatibility

                                                                                                                                                                                        + + + public + static bool|str|int + $a_bool_HardLinksEnable + = alse + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.0 + +

                                                                                                                                                                                        Bugfix: footnote links script independent.

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.4 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.3.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @theroninjedi47

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @psykonevro

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        The official AMP plugin strips off JavaScript, breaking Footnotes’ +animated scrolling. +When the alternative reference container is enabled, hard links are too.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + contributor +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @martinneumannat

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_MirrorTooltipText + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Dedicated tooltip text

                                                                                                                                                                                        + + + public + static mixed + $a_bool_MirrorTooltipText + = alse + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Update: Tooltips: ability to display dedicated content before [[/tooltip]], thanks to @jbj2199 issue report.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.2 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2021-01-19T2223+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @jbj2199

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        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.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_SyntaxErrorFlag + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Footnote delimiter syntax validation

                                                                                                                                                                                        + + + public + static bool + $a_bool_SyntaxErrorFlag + = rue + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.4.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2021-01-01T0227+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_bool_TooltipsEnabled + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Template process optimization

                                                                                                                                                                                        + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.4.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2021-01-04T1355+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Patrizia Lutz @misfist

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        repository

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        diff

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_int_PostId + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Infinite scroll / autoload or archive view

                                                                                                                                                                                        + + + public + static int + $a_int_PostId + = 0 + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.6 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + contributor +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @docteurfitness

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/auto-load-post-compatibility-update/#post-13618833 + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        As multiple posts are appended to each other, functions and fragment IDs must be disambiguated. +post ID to make everything unique wrt infinite scroll and archive view:

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @docteurfitness

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_int_ReferenceContainerId + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Multiple reference containers in content and widgets

                                                                                                                                                                                        + + + public + static int + $a_int_ReferenceContainerId + = 1 + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.9 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2020-12-25T0338+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @justbecuz

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/reset-footnotes-to-1/ + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830 + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_int_ScrollOffset + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Scroll offset

                                                                                                                                                                                        + + + public + static int + $a_int_ScrollOffset + = 34 + +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.4 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.4.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2020-12-05T0538+0100

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2021-01-03T2055+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2021-01-04T0504+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @lukashuggenberg

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13857922 + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_int_TooltipShortcodeLength + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_int_TooltipShortcodeLength + = 12 + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_FootnoteLinkSlug + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_FootnoteLinkSlug + = 'f' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_LinkCloseTag + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_LinkCloseTag + = '' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_LinkIdsSeparator + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_LinkIdsSeparator + = '+' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_LinkOpenTag + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_LinkOpenTag + = '' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_LinkSpan + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Optional link element for footnote referrers and backlinks

                                                                                                                                                                                        + + + public + static mixed + $a_str_LinkSpan + = 'span' + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.0 + +

                                                                                                                                                                                        add link elements along with hard links.

                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.4 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.3.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2020-11-25T1306+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2020-11-26T1051+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + date +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        2020-12-30T2313+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + contributor +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @docteurfitness

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + contributor +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @martinneumannat

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/update-2-1-3/#post-13704194 + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                        • Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
                                                                                                                                                                                        • +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        + https://wordpress.org/support/topic/making-it-amp-compatible/ + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + link +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Although widely used for that purpose, hyperlinks are disliked for footnote linking. +Browsers may need to be prevented from logging these clicks in the browsing history, +as logging compromises the usability of the 'return to previous' button in browsers. +For that purpose, and for scroll animation, this linking is performed by JavaScript.

                                                                                                                                                                                        +

                                                                                                                                                                                        Link elements raise concerns, so that mitigating their proliferation may be desired.

                                                                                                                                                                                        +

                                                                                                                                                                                        By contrast, due to an insufficiency in the CSS standard, coloring elements with the +theme’s link color requires real link elements and cannot be done with named colors, +as CSS does not support 'color: link|hover|active|visited', after the pseudo-classes +of the link element.

                                                                                                                                                                                        +

                                                                                                                                                                                        Yet styling these elements with the link color is not universally preferred, so that +the very presence of these link elements may need to be avoided.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @docteurfitness

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + reporter +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        @psykonevro

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + see +
                                                                                                                                                                                        +
                                                                                                                                                                                        + self::$a_bool_HardLinksEnable + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_PostContainerIdCompound + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_PostContainerIdCompound + = '' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_Prefix + + + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Prefix for the Footnote html element ID.

                                                                                                                                                                                        + + + public + static string + $a_str_Prefix + = "" + +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.8 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_ReferrerLinkSlug + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_ReferrerLinkSlug + = 'r' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + $a_str_TooltipShortcode + + + +

                                                                                                                                                                                        + + + + + public + static mixed + $a_str_TooltipShortcode + = '[[/tooltip]]' + + + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +

                                                                                                                                                                                        + Methods + +

                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + exec() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces all footnotes that occur in the given content.

                                                                                                                                                                                        + + + public + exec(string $p_str_Content[, bool $p_bool_OutputReferences = false ][, bool $p_bool_HideFootnotesText = false ]) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Any string that may contain footnotes to be replaced.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_bool_OutputReferences + : bool + = false
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Appends the Reference Container to the output if set to true, default true.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_bool_HideFootnotesText + : bool + = false
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Hide footnotes found in the string.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.0 + +

                                                                                                                                                                                        Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.5 + +

                                                                                                                                                                                        Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + ReferenceContainer() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Generates the reference container.

                                                                                                                                                                                        + + + public + ReferenceContainer() : string + +
                                                                                                                                                                                        + + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.0 + +

                                                                                                                                                                                        Update: remove backlink symbol along with column 2 of the reference container

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.3 + +

                                                                                                                                                                                        Bugfix: prepend an arrow on user request

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.6 + +

                                                                                                                                                                                        Bugfix: Reference container: fix line breaking behavior in footnote number clusters.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.4 + +

                                                                                                                                                                                        Bugfix: restore the arrow select and backlink symbol input settings

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.1 + +

                                                                                                                                                                                        Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.1 + +

                                                                                                                                                                                        Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + registerHooks() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Register WordPress Hooks to replace Footnotes in the content of a public page.

                                                                                                                                                                                        + + + public + registerHooks() : mixed + +
                                                                                                                                                                                        + + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.4 + +

                                                                                                                                                                                        Adding: Hooks: support 'the_post' in response to user request for custom post types.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.5 + +

                                                                                                                                                                                        Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.5 + +

                                                                                                                                                                                        Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.6 + +

                                                                                                                                                                                        Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility).

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 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.0.7 + +

                                                                                                                                                                                        Bugfix: Set priority level back to 10 assuming it is unproblematic 2020-11-06T1344+0100.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.8 + +

                                                                                                                                                                                        Bugfix: Priority level back to PHP_INT_MAX (need to get in touch with other plugins).

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.0 + +

                                                                                                                                                                                        UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.1 + +

                                                                                                                                                                                        Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.2 + +

                                                                                                                                                                                        Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.0 + +

                                                                                                                                                                                        Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.1 + +

                                                                                                                                                                                        Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + mixed + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + +

                                                                                                                                                                                        Replaces all footnotes in the given content and appends them to the static property.

                                                                                                                                                                                        + + + public + search(string $p_str_Content, bool $p_bool_ConvertHtmlChars, bool $p_bool_HideFootnotesText) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Content to be searched for footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_bool_ConvertHtmlChars + : bool +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        html encode settings, default true.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_bool_HideFootnotesText + : bool +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Hide footnotes found in the string.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.0.0 + +

                                                                                                                                                                                        various.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.4.0 + +

                                                                                                                                                                                        Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.0 + +

                                                                                                                                                                                        Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.0 + +

                                                                                                                                                                                        Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.0 + +

                                                                                                                                                                                        Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + the_content() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in the content of the current page/post.

                                                                                                                                                                                        + + + public + the_content(string $p_str_Content) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Page/Post content.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +

                                                                                                                                                                                        Content with replaced footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + the_excerpt() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in the excerpt of the current page/post.

                                                                                                                                                                                        + + + public + the_excerpt(string $p_str_Content) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Page/Post content.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +

                                                                                                                                                                                        Content with replaced footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + the_post() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in each Content var of the current Post object.

                                                                                                                                                                                        + + + public + the_post(array<string|int, mixed>|WP_Post &$p_mixed_Posts) : mixed + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_mixed_Posts + : array<string|int, mixed>|WP_Post +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.4 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + mixed + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + the_title() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in the post/page title.

                                                                                                                                                                                        + + + public + the_title(string $p_str_Content) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Widget content.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +

                                                                                                                                                                                        Content with replaced footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + widget_text() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in the content of the current widget.

                                                                                                                                                                                        + + + public + widget_text(string $p_str_Content) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Widget content.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +

                                                                                                                                                                                        Content with replaced footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + widget_title() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replaces footnotes in the widget title.

                                                                                                                                                                                        + + + public + widget_title(string $p_str_Content) : string + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_str_Content + : string +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Widget content.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + string + — +

                                                                                                                                                                                        Content with replaced footnotes.

                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + + +

                                                                                                                                                                                        Displays the 'LOVE FOOTNOTES' slug if enabled.

                                                                                                                                                                                        + + + public + wp_footer() : mixed + +
                                                                                                                                                                                        + + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.0 + +

                                                                                                                                                                                        more options 2020-12-11T0506+0100

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + mixed + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + wp_head() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Outputs the custom css to the header of the public page.

                                                                                                                                                                                        + + + public + wp_head() : mixed + +
                                                                                                                                                                                        + + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.1 + +

                                                                                                                                                                                        Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.1 + +

                                                                                                                                                                                        Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.3 + +

                                                                                                                                                                                        raise settings priority to override theme stylesheets

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.4 + +

                                                                                                                                                                                        Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.1.4 + +

                                                                                                                                                                                        Bugfix: Reference container: fix layout issues by moving backlink column width to settings.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.5 + +

                                                                                                                                                                                        Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.2.5 + +

                                                                                                                                                                                        Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.3.0 + +

                                                                                                                                                                                        Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 2.5.4 + +

                                                                                                                                                                                        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.

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + mixed + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        + replacePostObject() + +

                                                                                                                                                                                        + + +

                                                                                                                                                                                        Replace all Footnotes in a WP_Post object.

                                                                                                                                                                                        + + + private + replacePostObject(WP_Post $p_obj_Post) : WP_Post + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Parameters
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + $p_obj_Post + : WP_Post +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        + author +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +

                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + since +
                                                                                                                                                                                        +
                                                                                                                                                                                        + 1.5.6 + +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        Return values
                                                                                                                                                                                        + WP_Post + — +
                                                                                                                                                                                        + + +
                                                                                                                                                                                        +
                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                        +

                                                                                                                                                                                        Search results

                                                                                                                                                                                        + +
                                                                                                                                                                                        +
                                                                                                                                                                                        +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + + + + diff --git a/docs/classes/MCI-Footnotes-Template.html b/docs/classes/MCI-Footnotes-Template.html new file mode 100644 index 0000000..98bc1ed --- /dev/null +++ b/docs/classes/MCI-Footnotes-Template.html @@ -0,0 +1,1044 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                          +

                                                                                                                                                                                          Documentation

                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +

                                                                                                                                                                                          + MCI_Footnotes_Template + + + + +

                                                                                                                                                                                          + + + +

                                                                                                                                                                                          Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).

                                                                                                                                                                                          + +

                                                                                                                                                                                          Loads a template file, replaces all Placeholders and returns the replaced file content.

                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + + + + + +

                                                                                                                                                                                          + Table of Contents + +

                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + C_STR_DASHBOARD + +  = "dashboard" +
                                                                                                                                                                                          +
                                                                                                                                                                                          Directory name for dashboard templates.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + C_STR_PUBLIC + +  = "public" +
                                                                                                                                                                                          +
                                                                                                                                                                                          Directory name for public templates.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + $plugin_directory + +  : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          Plugin Directory
                                                                                                                                                                                          + +
                                                                                                                                                                                          + $a_str_OriginalContent + +  : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          Contains the content of the template after initialize.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + $a_str_ReplacedContent + +  : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          Contains the content of the template after initialize with replaced place holders.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + __construct() + +  : mixed +
                                                                                                                                                                                          +
                                                                                                                                                                                          Class Constructor. Reads and loads the template file without replace any placeholder.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + get_template() + +  : mixed +
                                                                                                                                                                                          +
                                                                                                                                                                                          Get the template
                                                                                                                                                                                          + +
                                                                                                                                                                                          + getContent() + +  : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          Returns the content of the template file with replaced placeholders.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + process_template() + +  : void +
                                                                                                                                                                                          +
                                                                                                                                                                                          Process template file
                                                                                                                                                                                          + +
                                                                                                                                                                                          + reload() + +  : mixed +
                                                                                                                                                                                          +
                                                                                                                                                                                          Reloads the original content of the template file.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + replace() + +  : bool +
                                                                                                                                                                                          +
                                                                                                                                                                                          Replace all placeholders specified in array.
                                                                                                                                                                                          + +
                                                                                                                                                                                          + + + + +
                                                                                                                                                                                          +

                                                                                                                                                                                          + Constants + +

                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + C_STR_DASHBOARD + +

                                                                                                                                                                                          + + + +

                                                                                                                                                                                          Directory name for dashboard templates.

                                                                                                                                                                                          + + + public + string + C_STR_DASHBOARD + = "dashboard" + + + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + C_STR_PUBLIC + +

                                                                                                                                                                                          + + + +

                                                                                                                                                                                          Directory name for public templates.

                                                                                                                                                                                          + + + public + string + C_STR_PUBLIC + = "public" + + + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +

                                                                                                                                                                                          + Properties + +

                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + $plugin_directory + + + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Plugin Directory

                                                                                                                                                                                          + + + public + string + $plugin_directory + + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Patrizia Lutz @misfist

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.4.0d3 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + $a_str_OriginalContent + + + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Contains the content of the template after initialize.

                                                                                                                                                                                          + + + private + string + $a_str_OriginalContent + = "" + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + $a_str_ReplacedContent + + + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Contains the content of the template after initialize with replaced place holders.

                                                                                                                                                                                          + + + private + string + $a_str_ReplacedContent + = "" + +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +

                                                                                                                                                                                          + Methods + +

                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + __construct() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Class Constructor. Reads and loads the template file without replace any placeholder.

                                                                                                                                                                                          + + + public + __construct(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Parameters
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_FileType + : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Template file type (take a look on the Class constants).

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_FileName + : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Template file name inside the Template directory without the file extension.

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_Extension + : string + = "html"
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Optional Template file extension (default: html)

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.2.6 + +

                                                                                                                                                                                          support for custom templates 2020-12-19T0606+0100

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.4.0 + +

                                                                                                                                                                                          look for custom template in the active theme first, thanks to @misfist

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + link +
                                                                                                                                                                                          +
                                                                                                                                                                                          + https://wordpress.org/support/topic/template-override-filter/ + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + link +
                                                                                                                                                                                          +
                                                                                                                                                                                          + https://wordpress.org/support/topic/template-override-filter/#post-13846598 + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + mixed + — +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + get_template() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Get the template

                                                                                                                                                                                          + + + public + get_template(string $p_str_FileType, string $p_str_FileName[, string $p_str_Extension = "html" ]) : mixed + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Parameters
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_FileType + : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_FileName + : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_str_Extension + : string + = "html"
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Patrizia Lutz @misfist

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.4.0d3 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + mixed + — +

                                                                                                                                                                                          false | template path

                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + getContent() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Returns the content of the template file with replaced placeholders.

                                                                                                                                                                                          + + + public + getContent() : string + +
                                                                                                                                                                                          + + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + string + — +

                                                                                                                                                                                          Template content with replaced placeholders.

                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + process_template() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Process template file

                                                                                                                                                                                          + + + public + process_template(string $template) : void + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Parameters
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $template + : string +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Patrizia Lutz @misfist

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.4.0d3 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.0.3 + +

                                                                                                                                                                                          replace tab with a space

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.0.3 + +

                                                                                                                                                                                          replace 2 spaces with 1

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.0.4 + +

                                                                                                                                                                                          collapse multiple spaces

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.2.6 + +

                                                                                                                                                                                          delete a space before a closing pointy bracket

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 2.5.4 + +

                                                                                                                                                                                          collapse HTML comments and PHP/JS docblocks (only)

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + void + — +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + reload() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Reloads the original content of the template file.

                                                                                                                                                                                          + + + public + reload() : mixed + +
                                                                                                                                                                                          + + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + mixed + — +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          + replace() + +

                                                                                                                                                                                          + + +

                                                                                                                                                                                          Replace all placeholders specified in array.

                                                                                                                                                                                          + + + public + replace(array<string|int, mixed> $p_arr_Placeholders) : bool + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Parameters
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + $p_arr_Placeholders + : array<string|int, mixed> +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Placeholders (key = placeholder, value = value).

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          + Tags + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          + author +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +

                                                                                                                                                                                          Stefan Herndler

                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + since +
                                                                                                                                                                                          +
                                                                                                                                                                                          + 1.5.0 + +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          Return values
                                                                                                                                                                                          + bool + — +

                                                                                                                                                                                          True on Success, False if Placeholders invalid.

                                                                                                                                                                                          +
                                                                                                                                                                                          + + +
                                                                                                                                                                                          +
                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                          +

                                                                                                                                                                                          Search results

                                                                                                                                                                                          + +
                                                                                                                                                                                          +
                                                                                                                                                                                          +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            + + + + diff --git a/docs/classes/MCI-Footnotes-WYSIWYG.html b/docs/classes/MCI-Footnotes-WYSIWYG.html new file mode 100644 index 0000000..08eae4a --- /dev/null +++ b/docs/classes/MCI-Footnotes-WYSIWYG.html @@ -0,0 +1,492 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                            +

                                                                                                                                                                                            Documentation

                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +

                                                                                                                                                                                            + MCI_Footnotes_WYSIWYG + + + + +

                                                                                                                                                                                            + + + + +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + author +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + since +
                                                                                                                                                                                            +
                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + + + + + +

                                                                                                                                                                                            + Table of Contents + +

                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + ajaxCallback() + +  : mixed +
                                                                                                                                                                                            +
                                                                                                                                                                                            AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.
                                                                                                                                                                                            + +
                                                                                                                                                                                            + includeScripts() + +  : array<string|int, mixed> +
                                                                                                                                                                                            +
                                                                                                                                                                                            Includes the Plugins WYSIWYG editor script.
                                                                                                                                                                                            + +
                                                                                                                                                                                            + newPlainTextEditorButton() + +  : mixed +
                                                                                                                                                                                            +
                                                                                                                                                                                            Add a new button to the plain text editor.
                                                                                                                                                                                            + +
                                                                                                                                                                                            + newVisualEditorButton() + +  : array<string|int, mixed> +
                                                                                                                                                                                            +
                                                                                                                                                                                            Append a new Button to the WYSIWYG editor of Posts and Pages.
                                                                                                                                                                                            + +
                                                                                                                                                                                            + registerHooks() + +  : mixed +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            + + + + + + + +
                                                                                                                                                                                            +

                                                                                                                                                                                            + Methods + +

                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            + ajaxCallback() + +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            AJAX Callback function when the Footnotes Button is clicked. Either in the Plain text or Visual editor.

                                                                                                                                                                                            + + + public + static ajaxCallback() : mixed + +

                                                                                                                                                                                            Returns an JSON encoded array with the Footnotes start and end short code.

                                                                                                                                                                                            +
                                                                                                                                                                                            + + + +
                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + author +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + since +
                                                                                                                                                                                            +
                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Return values
                                                                                                                                                                                            + mixed + — +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            + includeScripts() + +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            Includes the Plugins WYSIWYG editor script.

                                                                                                                                                                                            + + + public + static includeScripts(array<string|int, mixed> $p_arr_Plugins) : array<string|int, mixed> + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Parameters
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + $p_arr_Plugins + : array<string|int, mixed> +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            Scripts to be included to the editor.

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + author +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + since +
                                                                                                                                                                                            +
                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Return values
                                                                                                                                                                                            + array<string|int, mixed> + — +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            + newPlainTextEditorButton() + +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            Add a new button to the plain text editor.

                                                                                                                                                                                            + + + public + static newPlainTextEditorButton() : mixed + +
                                                                                                                                                                                            + + + +
                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + author +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + since +
                                                                                                                                                                                            +
                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Return values
                                                                                                                                                                                            + mixed + — +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            + newVisualEditorButton() + +

                                                                                                                                                                                            + + +

                                                                                                                                                                                            Append a new Button to the WYSIWYG editor of Posts and Pages.

                                                                                                                                                                                            + + + public + static newVisualEditorButton(array<string|int, mixed> $p_arr_Buttons) : array<string|int, mixed> + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Parameters
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + $p_arr_Buttons + : array<string|int, mixed> +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            pre defined Buttons from WordPress.

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            + author +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +

                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + since +
                                                                                                                                                                                            +
                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            Return values
                                                                                                                                                                                            + array<string|int, mixed> + — +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            + registerHooks() + +

                                                                                                                                                                                            + + + + + public + static registerHooks() : mixed + + + + + +
                                                                                                                                                                                            Return values
                                                                                                                                                                                            + mixed + — +
                                                                                                                                                                                            + + +
                                                                                                                                                                                            +
                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                            +

                                                                                                                                                                                            Search results

                                                                                                                                                                                            + +
                                                                                                                                                                                            +
                                                                                                                                                                                            +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              + + + + diff --git a/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html new file mode 100644 index 0000000..8ef7d35 --- /dev/null +++ b/docs/classes/MCI-Footnotes-Widget-ReferenceContainer.html @@ -0,0 +1,688 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                              +

                                                                                                                                                                                              Documentation

                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +

                                                                                                                                                                                              + MCI_Footnotes_Widget_ReferenceContainer + + + extends MCI_Footnotes_WidgetBase + + + + +

                                                                                                                                                                                              + + + +

                                                                                                                                                                                              Registers a Widget to put the Reference Container to the widget area.

                                                                                                                                                                                              + +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + + + + + +

                                                                                                                                                                                              + Table of Contents + +

                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + __construct() + +  : mixed +
                                                                                                                                                                                              +
                                                                                                                                                                                              Class Constructor. Registers the child Widget to WordPress.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + form() + +  : void +
                                                                                                                                                                                              +
                                                                                                                                                                                              Outputs the Settings of the Widget.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + widget() + +  : mixed +
                                                                                                                                                                                              +
                                                                                                                                                                                              Outputs the Content of the Widget.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + getDescription() + +  : string +
                                                                                                                                                                                              +
                                                                                                                                                                                              Returns the Description of the child widget.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + getID() + +  : string +
                                                                                                                                                                                              +
                                                                                                                                                                                              Returns an unique ID as string used for the Widget Base ID.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + getName() + +  : string +
                                                                                                                                                                                              +
                                                                                                                                                                                              Returns the Public name of the Widget to be displayed in the Configuration page.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + getWidgetWidth() + +  : int +
                                                                                                                                                                                              +
                                                                                                                                                                                              Returns the width of the Widget. Default width is 250 pixel.
                                                                                                                                                                                              + +
                                                                                                                                                                                              + + + + + + + +
                                                                                                                                                                                              +

                                                                                                                                                                                              + Methods + +

                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + __construct() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Class Constructor. Registers the child Widget to WordPress.

                                                                                                                                                                                              + + + public + __construct() : mixed + +
                                                                                                                                                                                              + + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                                +
                                                                                                                                                                                              • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                                                                                                                                                                                              • +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.6.4 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + contributor +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              @dartiss

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + link +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + mixed + — +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + form() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Outputs the Settings of the Widget.

                                                                                                                                                                                              + + + public + form(mixed $instance) : void + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Parameters
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + $instance + : mixed +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + void + — +

                                                                                                                                                                                              Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + widget() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Outputs the Content of the Widget.

                                                                                                                                                                                              + + + public + widget(mixed $args, mixed $instance) : mixed + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Parameters
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + $args + : mixed +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + $instance + : mixed +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + mixed + — +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + getDescription() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Returns the Description of the child widget.

                                                                                                                                                                                              + + + protected + getDescription() : string + +
                                                                                                                                                                                              + + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + string + — +

                                                                                                                                                                                              Edit: curly quotes 2.2.0 2020-12-12T2130+0100

                                                                                                                                                                                              +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + getID() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Returns an unique ID as string used for the Widget Base ID.

                                                                                                                                                                                              + + + protected + getID() : string + +
                                                                                                                                                                                              + + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + string + — +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + getName() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Returns the Public name of the Widget to be displayed in the Configuration page.

                                                                                                                                                                                              + + + protected + getName() : string + +
                                                                                                                                                                                              + + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + string + — +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              + getWidgetWidth() + +

                                                                                                                                                                                              + + +

                                                                                                                                                                                              Returns the width of the Widget. Default width is 250 pixel.

                                                                                                                                                                                              + + + protected + getWidgetWidth() : int + +
                                                                                                                                                                                              + + + +
                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              + author +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +

                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + since +
                                                                                                                                                                                              +
                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              Return values
                                                                                                                                                                                              + int + — +
                                                                                                                                                                                              + + +
                                                                                                                                                                                              +
                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                              +

                                                                                                                                                                                              Search results

                                                                                                                                                                                              + +
                                                                                                                                                                                              +
                                                                                                                                                                                              +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                + + + + diff --git a/docs/classes/MCI-Footnotes-WidgetBase.html b/docs/classes/MCI-Footnotes-WidgetBase.html new file mode 100644 index 0000000..31cc342 --- /dev/null +++ b/docs/classes/MCI-Footnotes-WidgetBase.html @@ -0,0 +1,529 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                +

                                                                                                                                                                                                Documentation

                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +

                                                                                                                                                                                                + MCI_Footnotes_WidgetBase + + + extends WP_Widget + + + + +

                                                                                                                                                                                                + + + +

                                                                                                                                                                                                Base Class for all Plugin Widgets. Registers each Widget to WordPress.

                                                                                                                                                                                                + +

                                                                                                                                                                                                The following Methods MUST be overwritten in each sub class: +public function widget($args, $instance) -> echo the Widget Content +public function form($instance) -> echo the Settings of the Widget

                                                                                                                                                                                                +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + + + + + + +

                                                                                                                                                                                                + Table of Contents + +

                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + __construct() + +  : mixed +
                                                                                                                                                                                                +
                                                                                                                                                                                                Class Constructor. Registers the child Widget to WordPress.
                                                                                                                                                                                                + +
                                                                                                                                                                                                + getDescription() + +  : string +
                                                                                                                                                                                                +
                                                                                                                                                                                                Returns the Description of the child widget.
                                                                                                                                                                                                + +
                                                                                                                                                                                                + getID() + +  : string +
                                                                                                                                                                                                +
                                                                                                                                                                                                Returns an unique ID as string used for the Widget Base ID.
                                                                                                                                                                                                + +
                                                                                                                                                                                                + getName() + +  : string +
                                                                                                                                                                                                +
                                                                                                                                                                                                Returns the Public name of child Widget to be displayed in the Configuration page.
                                                                                                                                                                                                + +
                                                                                                                                                                                                + getWidgetWidth() + +  : int +
                                                                                                                                                                                                +
                                                                                                                                                                                                Returns the width of the Widget. Default width is 250 pixel.
                                                                                                                                                                                                + +
                                                                                                                                                                                                + + + + + + + +
                                                                                                                                                                                                +

                                                                                                                                                                                                + Methods + +

                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                + __construct() + +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Class Constructor. Registers the child Widget to WordPress.

                                                                                                                                                                                                + + + public + __construct() : mixed + +
                                                                                                                                                                                                + + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                • Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution.
                                                                                                                                                                                                • +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.6.4 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + contributor +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                @dartiss

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + link +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                “The called constructor method for WP_Widget in MCI_Footnotes_Widget_ReferenceContainer is deprecated since version 4.3.0! Use __construct() instead.”

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                Return values
                                                                                                                                                                                                + mixed + — +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                + getDescription() + +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Returns the Description of the child widget.

                                                                                                                                                                                                + + + protected + abstract getDescription() : string + +
                                                                                                                                                                                                + + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                Return values
                                                                                                                                                                                                + string + — +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                + getID() + +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Returns an unique ID as string used for the Widget Base ID.

                                                                                                                                                                                                + + + protected + abstract getID() : string + +
                                                                                                                                                                                                + + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                Return values
                                                                                                                                                                                                + string + — +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                + getName() + +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Returns the Public name of child Widget to be displayed in the Configuration page.

                                                                                                                                                                                                + + + protected + abstract getName() : string + +
                                                                                                                                                                                                + + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                Return values
                                                                                                                                                                                                + string + — +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                + getWidgetWidth() + +

                                                                                                                                                                                                + + +

                                                                                                                                                                                                Returns the width of the Widget. Default width is 250 pixel.

                                                                                                                                                                                                + + + protected + getWidgetWidth() : int + +
                                                                                                                                                                                                + + + +
                                                                                                                                                                                                + Tags + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                + author +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +

                                                                                                                                                                                                Stefan Herndler

                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + since +
                                                                                                                                                                                                +
                                                                                                                                                                                                + 1.5.0 + +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                Return values
                                                                                                                                                                                                + int + — +
                                                                                                                                                                                                + + +
                                                                                                                                                                                                +
                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                +

                                                                                                                                                                                                Search results

                                                                                                                                                                                                + +
                                                                                                                                                                                                +
                                                                                                                                                                                                +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  + + + + diff --git a/docs/classes/MCI-Footnotes.html b/docs/classes/MCI-Footnotes.html new file mode 100644 index 0000000..d09558a --- /dev/null +++ b/docs/classes/MCI-Footnotes.html @@ -0,0 +1,873 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Documentation

                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + MCI_Footnotes + + + + +

                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                  Entry point of the Plugin. Loads the Dashboard and executes the Task.

                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + + + + + +

                                                                                                                                                                                                  + Table of Contents + +

                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + $a_bool_AlternativeTooltipsEnabled + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + $a_bool_TooltipsEnabled + +  : bool +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Template process and script / stylesheet load optimization.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + $a_obj_Task + +  : null|MCI_Footnotes_Task +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Reference to the Plugin Task object.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + initializeWidgets() + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Initializes all Widgets of the Plugin.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + registerPublic() + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Registers and enqueues scripts and stylesheets to the public pages.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + run() + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Executes the Plugin.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + initializeDashboard() + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Initializes the Dashboard of the Plugin and loads them.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + initializeTask() + +  : mixed +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  Initializes the Plugin Task and registers the Task hooks.
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  + + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + Properties + +

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + $a_bool_AlternativeTooltipsEnabled + + + +

                                                                                                                                                                                                  + + + + + public + static mixed + $a_bool_AlternativeTooltipsEnabled + = alse + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + $a_bool_TooltipsEnabled + + + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Template process and script / stylesheet load optimization.

                                                                                                                                                                                                  + + + public + static bool + $a_bool_TooltipsEnabled + = alse + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.4.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + date +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  2021-01-04T1355+0100

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Patrizia Lutz @misfist

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + https://wordpress.org/support/topic/template-override-filter/#post-13864301 + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  repository

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  diff

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + $a_obj_Task + + + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Reference to the Plugin Task object.

                                                                                                                                                                                                  + + + public + null|MCI_Footnotes_Task + $a_obj_Task + = +ull + +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + Methods + +

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + initializeWidgets() + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Initializes all Widgets of the Plugin.

                                                                                                                                                                                                  + + + public + initializeWidgets() : mixed + +
                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.6.5 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + contributor +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  @felipelavinz

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + https://wordpress.org/support/topic/bug-function-create_function-is-deprecated/ + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + https://wordpress.org/support/topic/deprecated-function-create_function-14/ + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  create_function() was deprecated in PHP 7.2.0 and removed in PHP 8.0.0.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  The fix is to move add_action() above into run(), +and use the bare register_widget() here.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + reporter +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  @psykonevro

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + reporter +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  @daliasued

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + see +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + self::run() + +

                                                                                                                                                                                                  Also, the visibility of initializeWidgets() is not private any longer.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  Return values
                                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + registerPublic() + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Registers and enqueues scripts and stylesheets to the public pages.

                                                                                                                                                                                                  + + + public + registerPublic() : mixed + +
                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.0.0 + +

                                                                                                                                                                                                  Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.0.3 + +

                                                                                                                                                                                                  add versioning of public.css for cache busting 2020-10-29T1413+0100

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.0.4 + +

                                                                                                                                                                                                  add jQuery UI from WordPress 2020-11-01T1902+0100

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                                  automate passing version number for cache busting 2020-11-30T0646+0100

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 2.1.4 + +

                                                                                                                                                                                                  optionally enqueue an extra stylesheet 2020-12-04T2231+0100

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  Return values
                                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + run() + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Executes the Plugin.

                                                                                                                                                                                                  + + + public + run() : mixed + +
                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                  • Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution.
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.6.5 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + contributor +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  @felipelavinz

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + link +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + see +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + self::initializeWidgets() + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  Return values
                                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + initializeDashboard() + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Initializes the Dashboard of the Plugin and loads them.

                                                                                                                                                                                                  + + + private + initializeDashboard() : mixed + +
                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  Return values
                                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  + initializeTask() + +

                                                                                                                                                                                                  + + +

                                                                                                                                                                                                  Initializes the Plugin Task and registers the Task hooks.

                                                                                                                                                                                                  + + + private + initializeTask() : mixed + +
                                                                                                                                                                                                  + + + +
                                                                                                                                                                                                  + Tags + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + author +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +

                                                                                                                                                                                                  Stefan Herndler

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + since +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 1.5.0 + +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  Return values
                                                                                                                                                                                                  + mixed + — +
                                                                                                                                                                                                  + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Search results

                                                                                                                                                                                                  + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + +
                                                                                                                                                                                                    + + + + diff --git a/docs/css/base.css b/docs/css/base.css new file mode 100644 index 0000000..3fa8f23 --- /dev/null +++ b/docs/css/base.css @@ -0,0 +1,1002 @@ + +:root { + /* Typography */ + --font-primary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --font-secondary: 'Source Sans Pro', Helvetica, Arial, sans-serif; + --line-height--primary: 1.6; + --letter-spacing--primary: .05rem; + --text-base-size: 1em; + --text-scale-ratio: 1.2; + + --text-xxs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-xs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio)); + --text-sm: calc(var(--text-base-size) / var(--text-scale-ratio)); + --text-md: var(--text-base-size); + --text-lg: calc(var(--text-base-size) * var(--text-scale-ratio)); + --text-xl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + --text-xxxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio)); + + /* Colors */ + --primary-color: hsl(96, 57%, 60%); + --primary-color-darken: hsl(96, 57%, 40%); + --primary-color-darker: hsl(96, 57%, 20%); + --primary-color-lighten: hsl(96, 57%, 80%); + --primary-color-lighter: hsl(96, 57%, 97%); + --dark-gray: #d1d1d1; + --light-gray: #f0f0f0; + + --text-color: #4b3b40; + + --header-height: var(--spacing-xxxxl); + --header-bg-color: var(--primary-color); + --code-background-color: #f7faf5; + --code-border-color: #d6e7cb; + --button-border-color: var(--primary-color-darken); + --button-color: transparent; + --button-color-primary: var(--primary-color); + --button-text-color: #555; + --button-text-color-primary: white; + --popover-background-color: rgba(255, 255, 255, 0.75); + --link-color-primary: var(--primary-color-darken); + --link-hover-color-primary: var(--primary-color-darker); + --form-field-border-color: var(--dark-gray); + --form-field-color: #fff; + --admonition-success-color: var(--primary-color); + --admonition-border-color: silver; + --table-separator-color: var(--primary-color-lighten); + --title-text-color: var(--primary-color); + + --sidebar-border-color: var(--primary-color-lighten); + + /* Grid */ + --container-width: 1400px; + + /* Spacing */ + --spacing-base-size: 1rem; + --spacing-scale-ratio: 1.5; + + --spacing-xxxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-xs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio)); + --spacing-sm: calc(var(--spacing-base-size) / var(--spacing-scale-ratio)); + --spacing-md: var(--spacing-base-size); + --spacing-lg: calc(var(--spacing-base-size) * var(--spacing-scale-ratio)); + --spacing-xl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + --spacing-xxxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio)); + + --border-radius-base-size: 3px; +} + +/* Base Styles +-------------------------------------------------- */ +body { + color: var(--text-color); + font-family: var(--font-primary); + font-size: var(--text-md); + letter-spacing: var(--letter-spacing--primary); + line-height: var(--line-height--primary); +} + +.phpdocumentor h1, +.phpdocumentor h2, +.phpdocumentor h3, +.phpdocumentor h4, +.phpdocumentor h5, +.phpdocumentor h6 { + margin-bottom: var(--spacing-lg); + margin-top: var(--spacing-lg); + font-weight: 600; +} + +.phpdocumentor h1 { + font-size: var(--text-xxxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.2; + margin-top: 0; +} + +.phpdocumentor h2 { + font-size: var(--text-xxxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.25; + margin-top: 0; +} + +.phpdocumentor h3 { + font-size: var(--text-xxl); + letter-spacing: var(--letter-spacing--primary); + line-height: 1.3; +} + +.phpdocumentor h4 { + font-size: var(--text-xl); + letter-spacing: calc(var(--letter-spacing--primary) / 2); + line-height: 1.35; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor h5 { + font-size: var(--text-lg); + letter-spacing: calc(var(--letter-spacing--primary) / 4); + line-height: 1.5; + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h6 { + font-size: var(--text-md); + letter-spacing: 0; + line-height: var(--line-height--primary); + margin-bottom: var(--spacing-md); + margin-top: var(--spacing-md); +} + +.phpdocumentor h1 .headerlink, +.phpdocumentor h2 .headerlink, +.phpdocumentor h3 .headerlink, +.phpdocumentor h4 .headerlink, +.phpdocumentor h5 .headerlink, +.phpdocumentor h6 .headerlink +{ + transition: all .3s ease-in-out; + opacity: 0; + text-decoration: none; + color: silver; + font-size: 80%; +} + +.phpdocumentor h1:hover .headerlink, +.phpdocumentor h2:hover .headerlink, +.phpdocumentor h3:hover .headerlink, +.phpdocumentor h4:hover .headerlink, +.phpdocumentor h5:hover .headerlink, +.phpdocumentor h6:hover .headerlink +{ + opacity: 1; +} +.phpdocumentor p { + margin-top: 0; + margin-bottom: var(--spacing-md); +} +.phpdocumentor figure { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-line { + border-top: 1px solid #E1E1E1; + border-width: 0; + margin-bottom: var(--spacing-xxl); + margin-top: var(--spacing-xxl); +} +.phpdocumentor-section { + box-sizing: border-box; + margin: 0 auto; + max-width: var(--container-width); + padding: 0 var(--spacing-lg); + position: relative; + width: 100%; +} + +@media (min-width: 1200px) { + .phpdocumentor-section { + padding: 0; + width: 95%; + } +} +.phpdocumentor-column { + box-sizing: border-box; + float: left; + width: 100%; +} + +@media (min-width: 550px) { + .phpdocumentor-column { + margin-left: 4%; + } + + .phpdocumentor-column:first-child { + margin-left: 0; + } + + .-one.phpdocumentor-column { + width: 4.66666666667%; + } + + .-two.phpdocumentor-column { + width: 13.3333333333%; + } + + .-three.phpdocumentor-column { + width: 22%; + } + + .-four.phpdocumentor-column { + width: 30.6666666667%; + } + + .-five.phpdocumentor-column { + width: 39.3333333333%; + } + + .-six.phpdocumentor-column { + width: 48%; + } + + .-seven.phpdocumentor-column { + width: 56.6666666667%; + } + + .-eight.phpdocumentor-column { + width: 65.3333333333%; + } + + .-nine.phpdocumentor-column { + width: 74.0%; + } + + .-ten.phpdocumentor-column { + width: 82.6666666667%; + } + + .-eleven.phpdocumentor-column { + width: 91.3333333333%; + } + + .-twelve.phpdocumentor-column { + margin-left: 0; + width: 100%; + } + + .-one-third.phpdocumentor-column { + width: 30.6666666667%; + } + + .-two-thirds.phpdocumentor-column { + width: 65.3333333333%; + } + + .-one-half.phpdocumentor-column { + width: 48%; + } + + /* Offsets */ + .-offset-by-one.phpdocumentor-column { + margin-left: 8.66666666667%; + } + + .-offset-by-two.phpdocumentor-column { + margin-left: 17.3333333333%; + } + + .-offset-by-three.phpdocumentor-column { + margin-left: 26%; + } + + .-offset-by-four.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-five.phpdocumentor-column { + margin-left: 43.3333333333%; + } + + .-offset-by-six.phpdocumentor-column { + margin-left: 52%; + } + + .-offset-by-seven.phpdocumentor-column { + margin-left: 60.6666666667%; + } + + .-offset-by-eight.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-nine.phpdocumentor-column { + margin-left: 78.0%; + } + + .-offset-by-ten.phpdocumentor-column { + margin-left: 86.6666666667%; + } + + .-offset-by-eleven.phpdocumentor-column { + margin-left: 95.3333333333%; + } + + .-offset-by-one-third.phpdocumentor-column { + margin-left: 34.6666666667%; + } + + .-offset-by-two-thirds.phpdocumentor-column { + margin-left: 69.3333333333%; + } + + .-offset-by-one-half.phpdocumentor-column { + margin-left: 52%; + } +} +.phpdocumentor a { + color: var(--link-color-primary); +} + +.phpdocumentor a:hover { + color: var(--link-hover-color-primary); +} +.phpdocumentor-button { + background-color: var(--button-color); + border: 1px solid var(--button-border-color); + border-radius: var(--border-radius-base-size); + box-sizing: border-box; + color: var(--button-text-color); + cursor: pointer; + display: inline-block; + font-size: var(--text-sm); + font-weight: 600; + height: 38px; + letter-spacing: .1rem; + line-height: 38px; + padding: 0 var(--spacing-xxl); + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-button .-wide { + width: 100%; +} + +.phpdocumentor-button:hover, +.phpdocumentor-button:focus { + border-color: #888; + color: #333; + outline: 0; +} + +.phpdocumentor-button.-primary { + background-color: var(--button-color-primary); + border-color: var(--button-color-primary); + color: var(--button-text-color-primary); +} + +.phpdocumentor-button.-primary:hover, +.phpdocumentor-button.-primary:focus { + background-color: var(--link-color-primary); + border-color: var(--link-color-primary); + color: var(--button-text-color-primary); +} +.phpdocumentor form { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-field { + background-color: var(--form-field-color); + border: 1px solid var(--form-field-border-color); + border-radius: var(--border-radius-base-size); + box-shadow: none; + box-sizing: border-box; + height: 38px; + padding: var(--spacing-xxxs) var(--spacing-xxs); /* The 6px vertically centers text on FF, ignored by Webkit */ + margin-bottom: var(--spacing-md); +} + +/* Removes awkward default styles on some inputs for iOS */ +input[type="email"], +input[type="number"], +input[type="search"], +input[type="text"], +input[type="tel"], +input[type="url"], +input[type="password"], +textarea { + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; +} + +.phpdocumentor-textarea { + min-height: 65px; + padding-bottom: var(--spacing-xxxs); + padding-top: var(--spacing-xxxs); +} + +.phpdocumentor-field:focus { + border: 1px solid var(--button-color-primary); + outline: 0; +} + +.phpdocumentor-label { + display: block; + margin-bottom: var(--spacing-xs); +} + +.phpdocumentor-fieldset { + border-width: 0; + padding: 0; +} + +input[type="checkbox"].phpdocumentor-field, +input[type="radio"].phpdocumentor-field { + display: inline; +} +div.phpdocumentor-list > ul, +ul.phpdocumentor-list { + list-style: circle inside; +} + +ol.phpdocumentor-list { + list-style: decimal inside; +} + +div.phpdocumentor-list > ul, +ol.phpdocumentor-list, +ul.phpdocumentor-list { + margin-top: 0; + padding-left: 0; + margin-bottom: var(--spacing-md); +} + +dl { + margin-bottom: var(--spacing-md); +} + +div.phpdocumentor-list > ul ul, +ul.phpdocumentor-list ul.phpdocumentor-list, +ul.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ol.phpdocumentor-list, +ol.phpdocumentor-list ul.phpdocumentor-list { + font-size: var(--text-sm); + margin: var(--spacing-xs) 0 var(--spacing-xs) calc(var(--spacing-xs) * 2); +} + +li.phpdocumentor-list { + margin-bottom: var(--spacing-md); +} +.phpdocumentor pre { + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-code { + background: var(--code-background-color); + border: 1px solid var(--code-border-color); + border-radius: var(--border-radius-base-size); + font-size: var(--text-sm); + padding: var(--spacing-sm) var(--spacing-md); + width: 100%; + box-sizing: border-box; +} + +pre > .phpdocumentor-code { + display: block; + white-space: pre; +} +.phpdocumentor blockquote { + border-left: 4px solid var(--primary-color); + margin: var(--spacing-md) 0; + padding: var(--spacing-xs) var(--spacing-sm); + color: var(--primary-color-darker); + font-style: italic; + font-size: var(--text-sm); +} +.phpdocumentor table { + margin-bottom: var(--spacing-md); +} + +th.phpdocumentor-heading, +td.phpdocumentor-cell { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) var(--spacing-md); + text-align: left; +} + +th.phpdocumentor-heading:first-child, +td.phpdocumentor-cell:first-child { + padding-left: 0; +} + +th.phpdocumentor-heading:last-child, +td.phpdocumentor-cell:last-child { + padding-right: 0; +} + +.phpdocumentor-header { + display: flex; + flex-direction: row; + align-items: stretch; + flex-wrap: wrap; + justify-content: space-between; + height: auto; + padding: var(--spacing-md) var(--spacing-md); +} + +.phpdocumentor-header__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-header__menu-icon { + font-size: 2rem; + color: var(--primary-color); +} + +.phpdocumentor-header__menu-button:checked ~ .phpdocumentor-topnav { + max-height: 250px; + padding-top: var(--spacing-md); +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + flex-direction: row; + padding: var(--spacing-lg) var(--spacing-lg); + min-height: var(--header-height); + } + + .phpdocumentor-header__menu-icon { + display: none; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-header { + padding-top: 0; + padding-bottom: 0; + } +} +@media (min-width: 1200px) { + .phpdocumentor-header { + padding: 0; + } +} +.phpdocumentor-title { + box-sizing: border-box; + color: var(--title-text-color); + font-size: var(--text-xxl); + letter-spacing: .05rem; + font-weight: normal; + width: auto; + margin: 0; + display: flex; + align-items: center; +} + +.phpdocumentor-title.-without-divider { + border: none; +} + +.phpdocumentor-title__link { + transition: all .3s ease-out; + display: flex; + color: var(--title-text-color); + text-decoration: none; + font-weight: normal; + white-space: nowrap; + transform: scale(.75); + transform-origin: left; +} + +.phpdocumentor-title__link:hover { + transform: perspective(15rem) translateX(.5rem); + font-weight: 600; +} + +@media (min-width: 1000px) { + .phpdocumentor-title { + width: 30.6666666667%; + border-right: var(--sidebar-border-color) solid 1px; + } + + .phpdocumentor-title__link { + transform-origin: left; + } +} + +@media (min-width: 1000px) { + .phpdocumentor-title__link { + transform: scale(.85); + } +} + +@media (min-width: 1200px) { + .phpdocumentor-title__link { + transform: scale(1); + } +} +.phpdocumentor-topnav { + display: flex; + align-items: center; + margin: 0; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s ease-out; + flex-basis: 100%; +} + +.phpdocumentor-topnav__menu { + text-align: right; + list-style: none; + margin: 0; + padding: 0; + flex: 1; + display: flex; + flex-flow: row wrap; + justify-content: center; +} + +.phpdocumentor-topnav__menu-item { + margin: 0; + width: 100%; + display: inline-block; + text-align: center; + padding: var(--spacing-sm) 0 +} + +.phpdocumentor-topnav__menu-item.-social { + width: auto; + padding: var(--spacing-sm) +} + +.phpdocumentor-topnav__menu-item a { + display: inline-block; + color: var(--text-color); + text-decoration: none; + font-size: var(--text-lg); + transition: all .3s ease-out; + border-bottom: 1px dotted transparent; + line-height: 1; +} + +.phpdocumentor-topnav__menu-item a:hover { + transform: perspective(15rem) translateY(.1rem); + border-bottom: 1px dotted var(--text-color); +} + +@media (min-width: 1000px) { + .phpdocumentor-topnav { + max-height: none; + overflow: visible; + flex-basis: auto; + } + + .phpdocumentor-topnav__menu { + display: flex; + flex-flow: row wrap; + justify-content: flex-end; + } + + .phpdocumentor-topnav__menu-item, + .phpdocumentor-topnav__menu-item.-social { + width: auto; + display: inline; + text-align: right; + padding: 0 0 0 var(--spacing-md) + } +} +.phpdocumentor-sidebar { + margin: 0; + overflow: hidden; + max-height: 0; +} + +.phpdocumentor .phpdocumentor-sidebar .phpdocumentor-list { + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + list-style: none; +} + +.phpdocumentor .phpdocumentor-sidebar li { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + padding: 0 0 var(--spacing-xxxs) var(--spacing-md); +} + +.phpdocumentor .phpdocumentor-sidebar abbr, +.phpdocumentor .phpdocumentor-sidebar a { + text-decoration: none; + border-bottom: none; + color: var(--text-color); + font-size: var(--text-md); + padding-left: 0; + transition: padding-left .4s ease-out; +} + +.phpdocumentor .phpdocumentor-sidebar a:hover { + padding-left: 5px; + font-weight: 600; +} + +.phpdocumentor .phpdocumentor-sidebar__category > * { + border-left: 1px solid var(--primary-color-lighten); +} + +.phpdocumentor .phpdocumentor-sidebar__category { + margin-bottom: var(--spacing-lg); +} + +.phpdocumentor .phpdocumentor-sidebar__category-header { + font-size: var(--text-md); + margin-bottom: var(--spacing-xs); + color: var(--link-color-primary); + font-weight: 600; + border-left: 0; +} + +.phpdocumentor .phpdocumentor-sidebar__root-package, +.phpdocumentor .phpdocumentor-sidebar__root-namespace { + font-size: var(--text-md); + margin: 0; + padding-top: var(--spacing-xs); + padding-left: var(--spacing-md); + color: var(--text-color); + font-weight: normal; +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + border-right: var(--sidebar-border-color) solid 1px; + } +} + +.phpdocumentor-sidebar__menu-button { + position: absolute; + top: -100%; + left: -100%; +} + +.phpdocumentor-sidebar__menu-icon { + font-size: var(--text-md); + font-weight: 600; + background: var(--primary-color); + color: white; + margin: 0 0 var(--spacing-lg); + display: block; + padding: var(--spacing-sm); + text-align: center; + border-radius: 3px; + text-transform: uppercase; + letter-spacing: .15rem; +} + +.phpdocumentor-sidebar__menu-button:checked ~ .phpdocumentor-sidebar { + max-height: 100%; + padding-top: var(--spacing-md); +} + +@media (min-width: 550px) { + .phpdocumentor-sidebar { + overflow: visible; + max-height: 100%; + } + + .phpdocumentor-sidebar__menu-icon { + display: none; + } +} +.phpdocumentor-admonition { + border: 1px solid var(--admonition-border-color); + border-radius: var(--border-radius-base-size); + border-color: var(--primary-color-lighten); + background-color: var(--primary-color-lighter); + font-size: 85%; + padding: .5rem; + margin: 2rem 0; + display: flex; + flex-direction: row; +} + +.phpdocumentor-admonition--success { + border-color: var(--admonition-success-color); +} + +.phpdocumentor-admonition__icon { + font-size: 2rem; + margin: .75rem 0.75rem 1.25rem 0.5rem; + color: var(--primary-color); +} +.phpdocumentor ul.phpdocumentor-breadcrumbs { + font-size: var(--text-md); + list-style: none; + margin: 0; + padding: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs a { + color: var(--text-color); + text-decoration: none; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li { + display: inline-block; + margin: 0; +} + +.phpdocumentor ul.phpdocumentor-breadcrumbs > li + li:before { + color: var(--dark-gray); + content: "\\\A0"; + padding: 0; +} +.phpdocumentor .phpdocumentor-back-to-top { + position: fixed; + bottom: 2rem; + font-size: 2.5rem; + opacity: .25; + transition: all .3s ease-in-out; + right: 2rem; +} + +.phpdocumentor .phpdocumentor-back-to-top:hover { + color: var(--link-color-primary); + opacity: 1; +} +.phpdocumentor-search { + position: relative; + display: none; /** disable by default for non-js flow */ + opacity: .3; /** white-out default for loading indication */ + transition: opacity .3s, background .3s; + margin: var(--spacing-sm) 0; + flex: 1; + min-width: 100%; +} + +.phpdocumentor-search label { + display: flex; + align-items: center; + flex: 1; +} + +.phpdocumentor-search__icon { + color: var(--primary-color); + margin-right: var(--spacing-sm); + width: 1rem; + height: 1rem; +} + +.phpdocumentor-search--enabled { + display: flex; +} + +.phpdocumentor-search--active { + opacity: 1; +} + +.phpdocumentor-search input:disabled { + background-color: lightgray; +} + +.phpdocumentor-search__field:focus, +.phpdocumentor-search__field { + margin-bottom: 0; + border: 0; + border-bottom: 2px solid var(--primary-color); + padding: 0; + border-radius: 0; + flex: 1; +} + +@media (min-width: 1000px) { + .phpdocumentor-search { + min-width: auto; + max-width: 20rem; + margin: 0 0 0 auto; + } +} +.phpdocumentor-content { + position: relative; +} + +.phpdocumentor-search-results { + backdrop-filter: blur(5px); + background: var(--popover-background-color); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + padding: 0; + opacity: 1; + pointer-events: all; + + transition: opacity .3s, background .3s; +} + +.phpdocumentor-search-results--hidden { + background: transparent; + backdrop-filter: blur(0); + opacity: 0; + pointer-events: none; +} + +.phpdocumentor-search-results__dialog { + width: 100%; + background: white; + max-height: 100%; + display: flex; + flex-direction: column; +} + +.phpdocumentor-search-results__body { + overflow: auto; +} + +.phpdocumentor-search-results__header { + padding: var(--spacing-lg); + display: flex; + justify-content: space-between; + background: var(--primary-color-darken); + color: white; + align-items: center; +} + +.phpdocumentor-search-results__close { + font-size: var(--text-xl); + background: none; + border: none; + padding: 0; + margin: 0; +} + +.phpdocumentor .phpdocumentor-search-results__title { + font-size: var(--text-xl); + margin-bottom: 0; +} + +.phpdocumentor-search-results__entries { + list-style: none; + padding: 0 var(--spacing-lg); + margin: 0; +} + +.phpdocumentor-search-results__entry { + border-bottom: 1px solid var(--table-separator-color); + padding: var(--spacing-sm) 0; + text-align: left; +} + +.phpdocumentor-search-results__entry a { + display: block; +} + +.phpdocumentor-search-results__entry small { + margin-top: var(--spacing-xs); + margin-bottom: var(--spacing-md); + color: var(--primary-color-darker); + display: block; + word-break: break-word; +} + +.phpdocumentor-search-results__entry h3 { + font-size: var(--text-lg); + margin: 0; +} + +@media (min-width: 550px) { + .phpdocumentor-search-results { + padding: 0 var(--spacing-lg); + } + + .phpdocumentor-search-results__entry h3 { + font-size: var(--text-xxl); + } + + .phpdocumentor-search-results__dialog { + margin: var(--spacing-xl) auto; + max-width: 40rem; + background: white; + border: 1px solid silver; + box-shadow: 0 2px 5px silver; + max-height: 40rem; + border-radius: 3px; + } +} + +/* Used for screen readers and such */ +.visually-hidden { + display: none; +} diff --git a/docs/css/normalize.css b/docs/css/normalize.css new file mode 100644 index 0000000..46f646a --- /dev/null +++ b/docs/css/normalize.css @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/docs/css/template.css b/docs/css/template.css new file mode 100644 index 0000000..fb905f3 --- /dev/null +++ b/docs/css/template.css @@ -0,0 +1,169 @@ +.phpdocumentor-summary { + font-style: italic; +} +.phpdocumentor-description { + margin-bottom: var(--spacing-md); +} +.phpdocumentor-element { + position: relative; +} + +.phpdocumentor .phpdocumentor-element__name { + line-height: 1; +} + +.phpdocumentor-element__package, +.phpdocumentor-element__extends, +.phpdocumentor-element__implements { + display: block; + font-size: var(--text-xxs); + font-weight: normal; + opacity: .7; +} + +.phpdocumentor-element__package .phpdocumentor-breadcrumbs { + display: inline; +} + +.phpdocumentor-element:not(:last-child) { + border-bottom: 1px solid var(--primary-color-lighten); + padding-bottom: var(--spacing-lg); +} + +.phpdocumentor-element.-deprecated .phpdocumentor-element__name { + text-decoration: line-through; +} + +.phpdocumentor-element__modifier { + font-size: var(--text-xxs); + padding: calc(var(--spacing-base-size) / 4) calc(var(--spacing-base-size) / 2); + color: var(--text-color); + background-color: var(--light-gray); + border-radius: 3px; + text-transform: uppercase; +} +.phpdocumentor-signature { + display: inline-block; + font-size: var(--text-sm); + margin-bottom: var(--spacing-md); +} + +.phpdocumentor-signature.-deprecated .phpdocumentor-signature__name { + text-decoration: line-through; +} +.phpdocumentor-table-of-contents { +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry { + padding-top: var(--spacing-xs); + margin-left: 2rem; + display: flex; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > a { + flex: 0 1 auto; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > span { + flex: 1; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:after { + content: ''; + height: 12px; + width: 12px; + left: 16px; + position: absolute; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-private:after { + background: url('data:image/svg+xml;utf8,') no-repeat; +} +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-protected:after { + left: 13px; + background: url('data:image/svg+xml;utf8,') no-repeat; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:before { + width: 1.25rem; + height: 1.25rem; + line-height: 1.25rem; + background: transparent url('data:image/svg+xml;utf8,') no-repeat center center; + content: ''; + position: absolute; + left: 0; + border-radius: 50%; + font-weight: 600; + color: white; + text-align: center; + font-size: .75rem; + margin-top: .2rem; +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-method:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-function:before { + content: 'M'; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-property:before { + content: 'P' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-constant:before { + content: 'C'; + background-color: transparent; + background-image: url('data:image/svg+xml;utf8,'); +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-class:before { + content: 'C' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-interface:before { + content: 'I' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-trait:before { + content: 'T' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-namespace:before { + content: 'N' +} + +.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-package:before { + content: 'P' +} + +.phpdocumentor-table-of-contents dd { + font-style: italic; + margin-left: 2rem; +} +.phpdocumentor-element-found-in { + position: absolute; + top: 0; + right: 0; + font-size: var(--text-sm); + color: gray; +} +.phpdocumentor-class-graph { + width: 100%; height: 600px; border:1px solid black; overflow: hidden +} + +.phpdocumentor-class-graph__graph { + width: 100%; +} +.phpdocumentor-tag-list__definition { + display: flex; +} + +.phpdocumentor-tag-link { + margin-right: var(--spacing-sm); +} diff --git a/docs/files/class-config.html b/docs/files/class-config.html new file mode 100644 index 0000000..27fa852 --- /dev/null +++ b/docs/files/class-config.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    Documentation

                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                    + + +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    config.php

                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                    + Interfaces, Classes and Traits + +

                                                                                                                                                                                                    + +
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    MCI_Footnotes_Config
                                                                                                                                                                                                    +
                                                                                                                                                                                                    Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                                                                    + +
                                                                                                                                                                                                    + + + + + + + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +

                                                                                                                                                                                                    Search results

                                                                                                                                                                                                    + +
                                                                                                                                                                                                    +
                                                                                                                                                                                                    +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + +
                                                                                                                                                                                                      + + + + diff --git a/docs/files/class-convert.html b/docs/files/class-convert.html new file mode 100644 index 0000000..332a478 --- /dev/null +++ b/docs/files/class-convert.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Documentation

                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                      + + +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      convert.php

                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                      + Interfaces, Classes and Traits + +

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      MCI_Footnotes_Convert
                                                                                                                                                                                                      +
                                                                                                                                                                                                      Converts data types and Footnotes specific values.
                                                                                                                                                                                                      + +
                                                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +

                                                                                                                                                                                                      Search results

                                                                                                                                                                                                      + +
                                                                                                                                                                                                      +
                                                                                                                                                                                                      +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + +
                                                                                                                                                                                                        + + + + diff --git a/docs/files/class-dashboard-init.html b/docs/files/class-dashboard-init.html new file mode 100644 index 0000000..b64a13d --- /dev/null +++ b/docs/files/class-dashboard-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Documentation

                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                        + + +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        init.php

                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                        + Interfaces, Classes and Traits + +

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        MCI_Footnotes_Layout_Init
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Handles the Settings interface of the Plugin.
                                                                                                                                                                                                        + +
                                                                                                                                                                                                        + + + + + + + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +

                                                                                                                                                                                                        Search results

                                                                                                                                                                                                        + +
                                                                                                                                                                                                        +
                                                                                                                                                                                                        +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + +
                                                                                                                                                                                                          + + + + diff --git a/docs/files/class-dashboard-layout.html b/docs/files/class-dashboard-layout.html new file mode 100644 index 0000000..18778f8 --- /dev/null +++ b/docs/files/class-dashboard-layout.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Documentation

                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                          + + +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          layout.php

                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                          + Interfaces, Classes and Traits + +

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          MCI_Footnotes_LayoutEngine
                                                                                                                                                                                                          +
                                                                                                                                                                                                          Layout Engine for the administration dashboard.
                                                                                                                                                                                                          + +
                                                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Search results

                                                                                                                                                                                                          + +
                                                                                                                                                                                                          +
                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + +
                                                                                                                                                                                                            + + + + diff --git a/docs/files/class-dashboard-subpage-diagnostics.html b/docs/files/class-dashboard-subpage-diagnostics.html new file mode 100644 index 0000000..e6ed92b --- /dev/null +++ b/docs/files/class-dashboard-subpage-diagnostics.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            Documentation

                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                            + + +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            subpage-diagnostics.php

                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                                                                            +
                                                                                                                                                                                                            Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                                                                            + +
                                                                                                                                                                                                            + + + + + + + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +

                                                                                                                                                                                                            Search results

                                                                                                                                                                                                            + +
                                                                                                                                                                                                            +
                                                                                                                                                                                                            +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + +
                                                                                                                                                                                                              + + + + diff --git a/docs/files/class-dashboard-subpage-main.html b/docs/files/class-dashboard-subpage-main.html new file mode 100644 index 0000000..62a90fc --- /dev/null +++ b/docs/files/class-dashboard-subpage-main.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Documentation

                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                              + + +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              subpage-main.php

                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                              + Interfaces, Classes and Traits + +

                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              MCI_Footnotes_Layout_Settings
                                                                                                                                                                                                              +
                                                                                                                                                                                                              Displays and handles all Settings of the Plugin.
                                                                                                                                                                                                              + +
                                                                                                                                                                                                              + + + + + + + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +

                                                                                                                                                                                                              Search results

                                                                                                                                                                                                              + +
                                                                                                                                                                                                              +
                                                                                                                                                                                                              +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                + + + + diff --git a/docs/files/class-hooks.html b/docs/files/class-hooks.html new file mode 100644 index 0000000..b57ef84 --- /dev/null +++ b/docs/files/class-hooks.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                Documentation

                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                hooks.php

                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                + +
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                MCI_Footnotes_Hooks
                                                                                                                                                                                                                +
                                                                                                                                                                                                                Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                                                                                + +
                                                                                                                                                                                                                + + + + + + + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +

                                                                                                                                                                                                                Search results

                                                                                                                                                                                                                + +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                  + + + + diff --git a/docs/files/class-init.html b/docs/files/class-init.html new file mode 100644 index 0000000..27020fe --- /dev/null +++ b/docs/files/class-init.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Documentation

                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  init.php

                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                  + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  MCI_Footnotes
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  + + + + + + + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +

                                                                                                                                                                                                                  Search results

                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                    + + + + diff --git a/docs/files/class-language.html b/docs/files/class-language.html new file mode 100644 index 0000000..db941a6 --- /dev/null +++ b/docs/files/class-language.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Documentation

                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    language.php

                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                    + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    MCI_Footnotes_Language
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    Loads text domain of current or default language for localization.
                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    + + + + + + + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +

                                                                                                                                                                                                                    Search results

                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                      + + + + diff --git a/docs/files/class-settings.html b/docs/files/class-settings.html new file mode 100644 index 0000000..910ad5e --- /dev/null +++ b/docs/files/class-settings.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Documentation

                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      settings.php

                                                                                                                                                                                                                      + + + +

                                                                                                                                                                                                                      + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      MCI_Footnotes_Settings
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Loads the settings values, sets to default values if undefined.
                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      + + + + + + + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +

                                                                                                                                                                                                                      Search results

                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                        + + + + diff --git a/docs/files/class-task.html b/docs/files/class-task.html new file mode 100644 index 0000000..d4b6618 --- /dev/null +++ b/docs/files/class-task.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Documentation

                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        task.php

                                                                                                                                                                                                                        + + + +

                                                                                                                                                                                                                        + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        MCI_Footnotes_Task
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Searches and replaces the footnotes.
                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        + + + + + + + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +

                                                                                                                                                                                                                        Search results

                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                          + + + + diff --git a/docs/files/class-template.html b/docs/files/class-template.html new file mode 100644 index 0000000..09b8714 --- /dev/null +++ b/docs/files/class-template.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Documentation

                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          template.php

                                                                                                                                                                                                                          + + + +

                                                                                                                                                                                                                          + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          MCI_Footnotes_Template
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          + + + + + + + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +

                                                                                                                                                                                                                          Search results

                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                          +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            + + + + diff --git a/docs/files/class-widgets-base.html b/docs/files/class-widgets-base.html new file mode 100644 index 0000000..edfbc18 --- /dev/null +++ b/docs/files/class-widgets-base.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Documentation

                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            base.php

                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            MCI_Footnotes_WidgetBase
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            + + + + + + + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +

                                                                                                                                                                                                                            Search results

                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              + + + + diff --git a/docs/files/class-widgets-reference-container.html b/docs/files/class-widgets-reference-container.html new file mode 100644 index 0000000..9553b8a --- /dev/null +++ b/docs/files/class-widgets-reference-container.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Documentation

                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              reference-container.php

                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                              + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              + + + + + + + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +

                                                                                                                                                                                                                              Search results

                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                + + + + diff --git a/docs/files/class-wysiwyg.html b/docs/files/class-wysiwyg.html new file mode 100644 index 0000000..59d1315 --- /dev/null +++ b/docs/files/class-wysiwyg.html @@ -0,0 +1,121 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Documentation

                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                wysiwyg.php

                                                                                                                                                                                                                                + + + +

                                                                                                                                                                                                                                + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                MCI_Footnotes_WYSIWYG
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                + + + + + + + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                Search results

                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  + + + + diff --git a/docs/files/footnotes.html b/docs/files/footnotes.html new file mode 100644 index 0000000..132a72c --- /dev/null +++ b/docs/files/footnotes.html @@ -0,0 +1,110 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Documentation

                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  footnotes.php

                                                                                                                                                                                                                                  + + + + + + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Search results

                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    + + + + diff --git a/docs/files/includes.html b/docs/files/includes.html new file mode 100644 index 0000000..de8700d --- /dev/null +++ b/docs/files/includes.html @@ -0,0 +1,190 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Documentation

                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    includes.php

                                                                                                                                                                                                                                    + + + + + +

                                                                                                                                                                                                                                    + Table of Contents + +

                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    + Functions + +

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                                                                                                    + + +

                                                                                                                                                                                                                                    Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                                                                                                    + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    Parameters
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + $p_str_Directory + : string +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Absolute Directory path to lookup for *.php files

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    + Tags + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + author +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                    Stefan Herndler

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + since +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + 1.5.0 + +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                    Search results

                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                      + + + + diff --git a/docs/graphs/classes.html b/docs/graphs/classes.html new file mode 100644 index 0000000..f77584f --- /dev/null +++ b/docs/graphs/classes.html @@ -0,0 +1,97 @@ + + + + + Documentation + + + + + + + + +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Documentation

                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                      Search results

                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..003b277 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,223 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Documentation

                                                                                                                                                                                                                                        + + + + + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + + + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Documentation

                                                                                                                                                                                                                                        + + + + +

                                                                                                                                                                                                                                        + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        MCI_Footnotes_Config
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Convert
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Converts data types and Footnotes specific values.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Layout_Init
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Handles the Settings interface of the Plugin.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_LayoutEngine
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Layout Engine for the administration dashboard.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Layout_Settings
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Displays and handles all Settings of the Plugin.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Hooks
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Language
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Loads text domain of current or default language for localization.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Settings
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Loads the settings values, sets to default values if undefined.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Task
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Searches and replaces the footnotes.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Template
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_WidgetBase
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        MCI_Footnotes_WYSIWYG
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                        + Table of Contents + +

                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        + + + +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        + Functions + +

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                                                                                                        + + +

                                                                                                                                                                                                                                        Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                                                                                                        + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        Parameters
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + $p_str_Directory + : string +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Absolute Directory path to lookup for *.php files

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        + Tags + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + author +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +

                                                                                                                                                                                                                                        Stefan Herndler

                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + since +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + 1.5.0 + +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +

                                                                                                                                                                                                                                        Search results

                                                                                                                                                                                                                                        + +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + +
                                                                                                                                                                                                                                          + + + + diff --git a/docs/indices/files.html b/docs/indices/files.html new file mode 100644 index 0000000..7ac73fe --- /dev/null +++ b/docs/indices/files.html @@ -0,0 +1,142 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Documentation

                                                                                                                                                                                                                                          + + + + + +
                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + + + +
                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          Files

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          B

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          C

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          F

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          H

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          I

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          L

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          R

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          S

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          T

                                                                                                                                                                                                                                          + +

                                                                                                                                                                                                                                          W

                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Search results

                                                                                                                                                                                                                                          + +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            + + + + diff --git a/docs/js/search.js b/docs/js/search.js new file mode 100644 index 0000000..a7e3595 --- /dev/null +++ b/docs/js/search.js @@ -0,0 +1,173 @@ +// Search module for phpDocumentor +// +// This module is a wrapper around fuse.js that will use a given index and attach itself to a +// search form and to a search results pane identified by the following data attributes: +// +// 1. data-search-form +// 2. data-search-results +// +// The data-search-form is expected to have a single input element of type 'search' that will trigger searching for +// a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated +// with rendered results. +// +// The search has various stages, upon loading this stage the data-search-form receives the CSS class +// 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended +// to hide the form by default and show it when it receives this class to achieve progressive enhancement for this +// feature. +// +// After loading this module, it is expected to load a search index asynchronously, for example: +// +// +// +// In this script the generated index should attach itself to the search module using the `appendIndex` function. By +// doing it like this the page will continue loading, unhindered by the loading of the search. +// +// After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will +// be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this +// point, the input field will also have it's 'disabled' attribute removed. +var Search = (function () { + var fuse; + var index = []; + var options = { + shouldSort: true, + threshold: 0.6, + location: 0, + distance: 100, + maxPatternLength: 32, + minMatchCharLength: 1, + keys: [ + "fqsen", + "name", + "summary", + "url" + ] + }; + + // Credit David Walsh (https://davidwalsh.name/javascript-debounce-function) + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. If `immediate` is passed, trigger the function on the + // leading edge, instead of the trailing. + function debounce(func, wait, immediate) { + var timeout; + + return function executedFunction() { + var context = this; + var args = arguments; + + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; + } + + function close() { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + const scrollY = document.body.style.top; + document.body.style.position = ''; + document.body.style.top = ''; + window.scrollTo(0, parseInt(scrollY || '0') * -1); + // End scroll prevention + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + + form.classList.toggle('phpdocumentor-search--has-results', false); + searchResults.classList.add('phpdocumentor-search-results--hidden'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + searchField.blur(); + } + + function search(event) { + // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + document.body.style.position = 'fixed'; + document.body.style.top = `-${window.scrollY}px`; + // End scroll prevention + + // prevent enter's from autosubmitting + event.stopPropagation(); + + var form = document.querySelector('[data-search-form]'); + var searchResults = document.querySelector('[data-search-results]'); + var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries'); + + searchResultEntries.innerHTML = ''; + + if (!event.target.value) { + close(); + return; + } + + form.classList.toggle('phpdocumentor-search--has-results', true); + searchResults.classList.remove('phpdocumentor-search-results--hidden'); + var results = fuse.search(event.target.value, {limit: 25}); + + results.forEach(function (result) { + var entry = document.createElement("li"); + entry.classList.add("phpdocumentor-search-results__entry"); + entry.innerHTML += '

                                                                                                                                                                                                                                            ' + result.name + "

                                                                                                                                                                                                                                            \n"; + entry.innerHTML += '' + result.fqsen + "\n"; + entry.innerHTML += '
                                                                                                                                                                                                                                            ' + result.summary + '
                                                                                                                                                                                                                                            '; + searchResultEntries.appendChild(entry) + }); + } + + function appendIndex(added) { + index = index.concat(added); + + // re-initialize search engine when appending an index after initialisation + if (typeof fuse !== 'undefined') { + fuse = new Fuse(index, options); + } + } + + function init() { + fuse = new Fuse(index, options); + + var form = document.querySelector('[data-search-form]'); + var searchField = document.querySelector('[data-search-form] input[type="search"]'); + + var closeButton = document.querySelector('.phpdocumentor-search-results__close'); + closeButton.addEventListener('click', function() { close() }.bind(this)); + + var searchResults = document.querySelector('[data-search-results]'); + searchResults.addEventListener('click', function() { close() }.bind(this)); + + form.classList.add('phpdocumentor-search--active'); + + searchField.setAttribute('placeholder', 'Search (Press "/" to focus)'); + searchField.removeAttribute('disabled'); + searchField.addEventListener('keyup', debounce(search, 300)); + + window.addEventListener('keyup', function (event) { + if (event.key === '/') { + searchField.focus(); + } + if (event.code === 'Escape') { + close(); + } + }.bind(this)); + } + + return { + appendIndex, + init + } +})(); + +window.addEventListener('DOMContentLoaded', function () { + var form = document.querySelector('[data-search-form]'); + + // When JS is supported; show search box. Must be before including the search for it to take effect immediately + form.classList.add('phpdocumentor-search--enabled'); +}); + +window.addEventListener('load', function () { + Search.init(); +}); diff --git a/docs/js/searchIndex.js b/docs/js/searchIndex.js new file mode 100644 index 0000000..ca8f2cc --- /dev/null +++ b/docs/js/searchIndex.js @@ -0,0 +1,1419 @@ +Search.appendIndex( + [ + { + "fqsen": "\\MCI_Footnotes_Config", + "name": "MCI_Footnotes_Config", + "summary": "Contains\u0020all\u0020Plugin\u0020Constants.\u0020Contains\u0020no\u0020Method\u0020or\u0020Property.", + "url": "classes/MCI-Footnotes-Config.html" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_NAME", + "name": "C_STR_PLUGIN_NAME", + "summary": "Internal\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_PUBLIC_NAME", + "name": "C_STR_PLUGIN_PUBLIC_NAME", + "summary": "Public\u0020Plugin\u0020name.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_PUBLIC_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_PLUGIN_HEADING_NAME", + "name": "C_STR_PLUGIN_HEADING_NAME", + "summary": "Public\u0020Plugin\u0020name\u0020for\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_PLUGIN_HEADING_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL", + "name": "C_STR_LOVE_SYMBOL", + "summary": "Html\u0020tag\u0020for\u0020the\u0020LOVE\u0020symbol.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_LOVE_SYMBOL_HEADING", + "name": "C_STR_LOVE_SYMBOL_HEADING", + "summary": "HTML\u0020code\u0020for\u0020the\u0020\u0027love\u0027\u0020symbol\u0020used\u0020in\u0020dashboard\u0020heading", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_LOVE_SYMBOL_HEADING" + }, { + "fqsen": "\\MCI_Footnotes_Config\u003A\u003AC_STR_NO_LOVE_SLUG", + "name": "C_STR_NO_LOVE_SLUG", + "summary": "Short\u0020code\u0020to\u0020DON\u0027T\u0020display\u0020the\u0020\u0027LOVE\u0020ME\u0027\u0020slug\u0020on\u0020certain\u0020pages.", + "url": "classes/MCI-Footnotes-Config.html#constant_C_STR_NO_LOVE_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Convert", + "name": "MCI_Footnotes_Convert", + "summary": "Converts\u0020data\u0020types\u0020and\u0020Footnotes\u0020specific\u0020values.", + "url": "classes/MCI-Footnotes-Convert.html" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AIndex\u0028\u0029", + "name": "Index", + "summary": "Converts\u0020a\u0020integer\u0020into\u0020the\u0020user\u002Ddefined\u0020counter\u0020style\u0020for\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Convert.html#method_Index" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoLatin\u0028\u0029", + "name": "toLatin", + "summary": "Converts\u0020an\u0020integer\u0020into\u0020latin\u0020ascii\u0020characters,\u0020either\u0020lower\u0020or\u0020upper\u002Dcase.", + "url": "classes/MCI-Footnotes-Convert.html#method_toLatin" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoArabicLeading\u0028\u0029", + "name": "toArabicLeading", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020leading\u002D0\u0020integer.", + "url": "classes/MCI-Footnotes-Convert.html#method_toArabicLeading" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoRomanic\u0028\u0029", + "name": "toRomanic", + "summary": "Converts\u0020an\u0020integer\u0020to\u0020a\u0020romanic\u0020letter.", + "url": "classes/MCI-Footnotes-Convert.html#method_toRomanic" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AtoBool\u0028\u0029", + "name": "toBool", + "summary": "Converts\u0020a\u0020string\u0020depending\u0020on\u0020its\u0020value\u0020to\u0020a\u0020boolean.", + "url": "classes/MCI-Footnotes-Convert.html#method_toBool" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003AgetArrow\u0028\u0029", + "name": "getArrow", + "summary": "Get\u0020a\u0020html\u0020Array\u0020short\u0020code\u0020depending\u0020on\u0020Arrow\u002DArray\u0020key\u0020index.", + "url": "classes/MCI-Footnotes-Convert.html#method_getArrow" + }, { + "fqsen": "\\MCI_Footnotes_Convert\u003A\u003Adebug\u0028\u0029", + "name": "debug", + "summary": "Displays\u0020a\u0020Variable.", + "url": "classes/MCI-Footnotes-Convert.html#method_debug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init", + "name": "MCI_Footnotes_Layout_Init", + "summary": "Handles\u0020the\u0020Settings\u0020interface\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Initializes\u0020all\u0020WordPress\u0020hooks\u0020for\u0020the\u0020Plugin\u0020Settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AinitializeSettings\u0028\u0029", + "name": "initializeSettings", + "summary": "Initializes\u0020all\u0020sub\u0020pages\u0020and\u0020registers\u0020the\u0020settings.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_initializeSettings" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterMainMenu\u0028\u0029", + "name": "registerMainMenu", + "summary": "Registers\u0020the\u0020new\u0020main\u0020menu\u0020for\u0020the\u0020WordPress\u0020dashboard.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerMainMenu" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AregisterSubPages\u0028\u0029", + "name": "registerSubPages", + "summary": "Registers\u0020all\u0020SubPages\u0020for\u0020this\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_registerSubPages" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AdisplayOtherPlugins\u0028\u0029", + "name": "displayOtherPlugins", + "summary": "Displays\u0020other\u0020Plugins\u0020from\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_displayOtherPlugins" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AgetPluginMetaInformation\u0028\u0029", + "name": "getPluginMetaInformation", + "summary": "AJAX\u0020call.\u0020returns\u0020a\u0020JSON\u0020string\u0020containing\u0020meta\u0020information\u0020about\u0020a\u0020specific\u0020WordPress\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Init.html#method_getPluginMetaInformation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_SLUG", + "name": "C_STR_MAIN_MENU_SLUG", + "summary": "Slug\u0020for\u0020the\u0020Plugin\u0020main\u0020menu.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003AC_STR_MAIN_MENU_TITLE", + "name": "C_STR_MAIN_MENU_TITLE", + "summary": "Plugin\u0020main\u0020menu\u0020name.", + "url": "classes/MCI-Footnotes-Layout-Init.html#constant_C_STR_MAIN_MENU_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Init\u003A\u003A\u0024a_arr_SubPageClasses", + "name": "a_arr_SubPageClasses", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Init.html#property_a_arr_SubPageClasses" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine", + "name": "MCI_Footnotes_LayoutEngine", + "summary": "Layout\u0020Engine\u0020for\u0020the\u0020administration\u0020dashboard.", + "url": "classes/MCI-Footnotes-LayoutEngine.html" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSection\u0028\u0029", + "name": "addSection", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020sub\u0020page\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddMetaBox\u0028\u0029", + "name": "addMetaBox", + "summary": "Returns\u0020an\u0020array\u0020describing\u0020a\u0020meta\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addMetaBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSubPage\u0028\u0029", + "name": "registerSubPage", + "summary": "Registers\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSubPage" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterSections\u0028\u0029", + "name": "registerSections", + "summary": "Registers\u0020all\u0020sections\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerSections" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AregisterMetaBoxes\u0028\u0029", + "name": "registerMetaBoxes", + "summary": "Registers\u0020all\u0020Meta\u0020boxes\u0020for\u0020a\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_registerMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AappendScripts\u0028\u0029", + "name": "appendScripts", + "summary": "Append\u0020javascript\u0020and\u0020css\u0020files\u0020for\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_appendScripts" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AdisplayContent\u0028\u0029", + "name": "displayContent", + "summary": "Displays\u0020the\u0020content\u0020of\u0020specific\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_displayContent" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AsaveSettings\u0028\u0029", + "name": "saveSettings", + "summary": "Save\u0020all\u0020Plugin\u0020settings.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_saveSettings" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ADescription\u0028\u0029", + "name": "Description", + "summary": "Output\u0020the\u0020Description\u0020of\u0020a\u0020section.\u0020May\u0020be\u0020overwritten\u0020in\u0020any\u0020section.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_Description" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003ALoadSetting\u0028\u0029", + "name": "LoadSetting", + "summary": "Loads\u0020specific\u0020setting\u0020and\u0020returns\u0020an\u0020array\u0020with\u0020the\u0020keys\u0020\u005Bid,\u0020name,\u0020value\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_LoadSetting" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNewline\u0028\u0029", + "name": "addNewline", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020start\u0020a\u0020new\u0020line.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNewline" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLineSpace\u0028\u0029", + "name": "addLineSpace", + "summary": "Returns\u0020a\u0020line\u0020break\u0020to\u0020have\u0020a\u0020space\u0020between\u0020two\u0020lines.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLineSpace" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddText\u0028\u0029", + "name": "addText", + "summary": "Returns\u0020a\u0020simple\u0020text\u0020inside\u0020html\u0020\u003Cspan\u003E\u0020text.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addText" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddLabel\u0028\u0029", + "name": "addLabel", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\/select\u0020label.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addLabel" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextBox\u0028\u0029", + "name": "addTextBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddCheckbox\u0028\u0029", + "name": "addCheckbox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020checkbox\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addCheckbox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddSelectBox\u0028\u0029", + "name": "addSelectBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020select\u0020box.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addSelectBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddTextArea\u0028\u0029", + "name": "addTextArea", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020a\u0020text\u0020area.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addTextArea" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddColorSelection\u0028\u0029", + "name": "addColorSelection", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020text\u005D\u0020with\u0020color\u0020selection\u0020class.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addColorSelection" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003AaddNumBox\u0028\u0029", + "name": "addNumBox", + "summary": "Returns\u0020the\u0020html\u0020tag\u0020for\u0020an\u0020input\u0020\u005Btype\u0020\u003D\u0020num\u005D.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#method_addNumBox" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_str_SubPageHook", + "name": "a_str_SubPageHook", + "summary": "Stores\u0020the\u0020Hook\u0020connection\u0020string\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_str_SubPageHook" + }, { + "fqsen": "\\MCI_Footnotes_LayoutEngine\u003A\u003A\u0024a_arr_Sections", + "name": "a_arr_Sections", + "summary": "Stores\u0020all\u0020Sections\u0020for\u0020the\u0020child\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-LayoutEngine.html#property_a_arr_Sections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics", + "name": "MCI_Footnotes_Layout_Diagnostics", + "summary": "Displays\u0020Diagnostics\u0020of\u0020the\u0020web\u0020server,\u0020PHP\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Diagnostics\u003A\u003ADiagnostics\u0028\u0029", + "name": "Diagnostics", + "summary": "Displays\u0020a\u0020diagnostics\u0020about\u0020the\u0020web\u0020server,\u0020php\u0020and\u0020WordPress.", + "url": "classes/MCI-Footnotes-Layout-Diagnostics.html#method_Diagnostics" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings", + "name": "MCI_Footnotes_Layout_Settings", + "summary": "Displays\u0020and\u0020handles\u0020all\u0020Settings\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetPriority\u0028\u0029", + "name": "getPriority", + "summary": "Returns\u0020a\u0020Priority\u0020index.\u0020Lower\u0020numbers\u0020have\u0020a\u0020higher\u0020Priority.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getPriority" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageSlug\u0028\u0029", + "name": "getSubPageSlug", + "summary": "Returns\u0020the\u0020unique\u0020slug\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageSlug" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSubPageTitle\u0028\u0029", + "name": "getSubPageTitle", + "summary": "Returns\u0020the\u0020title\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSubPageTitle" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetSections\u0028\u0029", + "name": "getSections", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020sections\u0020for\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getSections" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AgetMetaBoxes\u0028\u0029", + "name": "getMetaBoxes", + "summary": "Returns\u0020an\u0020array\u0020of\u0020all\u0020registered\u0020meta\u0020boxes\u0020for\u0020each\u0020section\u0020of\u0020the\u0020sub\u0020page.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_getMetaBoxes" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AStartEnd\u0028\u0029", + "name": "StartEnd", + "summary": "Displays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020start\u0020and\u0020end\u0020tag\u0020short\u0020codes\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020footnotes\u0020numbering\nDisplays\u0020all\u0020options\u0020for\u0020the\u0020scrolling\u0020behavior", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_StartEnd" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ANumbering\u0028\u0029", + "name": "Numbering", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Numbering" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AScrolling\u0028\u0029", + "name": "Scrolling", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Scrolling" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALove\u0028\u0029", + "name": "Love", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020\u0027I\u0020love\u0020Footnotes\u0027.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Love" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AExcerpts\u0028\u0029", + "name": "Excerpts", + "summary": "Displays\u0020the\u0020excerpt\u0020setting", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Excerpts" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ASuperscript\u0028\u0029", + "name": "Superscript", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnote\u0020referrers", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Superscript" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBox\u0028\u0029", + "name": "MouseOverBox", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020footnotes\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBox" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxPosition\u0028\u0029", + "name": "MouseOverBoxPosition", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxPosition" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxDimensions\u0028\u0029", + "name": "MouseOverBoxDimensions", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxDimensions" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTiming\u0028\u0029", + "name": "MouseOverBoxTiming", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTiming" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxTruncation\u0028\u0029", + "name": "MouseOverBoxTruncation", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxTruncation" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxText\u0028\u0029", + "name": "MouseOverBoxText", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxText" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AMouseOverBoxAppearance\u0028\u0029", + "name": "MouseOverBoxAppearance", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_MouseOverBoxAppearance" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHyperlinkArrow\u0028\u0029", + "name": "HyperlinkArrow", + "summary": "Displays\u0020all\u0020settings\u0020for\u0020the\u0020prepended\u0020symbol", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_HyperlinkArrow" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSS\u0028\u0029", + "name": "CustomCSS", + "summary": "Displays\u0020the\u0020custom\u0020css\u0020box.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSS" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSMigration\u0028\u0029", + "name": "CustomCSSMigration", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSMigration" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ACustomCSSNew\u0028\u0029", + "name": "CustomCSSNew", + "summary": "", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_CustomCSSNew" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ALookupHooks\u0028\u0029", + "name": "LookupHooks", + "summary": "Displays\u0020available\u0020Hooks\u0020to\u0020look\u0020for\u0020Footnote\u0020short\u0020codes.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_LookupHooks" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003AHelp\u0028\u0029", + "name": "Help", + "summary": "Displays\u0020a\u0020short\u0020introduction\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Help" + }, { + "fqsen": "\\MCI_Footnotes_Layout_Settings\u003A\u003ADonate\u0028\u0029", + "name": "Donate", + "summary": "Displays\u0020all\u0020Donate\u0020button\u0020to\u0020support\u0020the\u0020developers.", + "url": "classes/MCI-Footnotes-Layout-Settings.html#method_Donate" + }, { + "fqsen": "\\MCI_Footnotes_Hooks", + "name": "MCI_Footnotes_Hooks", + "summary": "Registers\u0020all\u0020WordPress\u0020Hooks\u0020and\u0020executes\u0020them\u0020on\u0020demand.", + "url": "classes/MCI-Footnotes-Hooks.html" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Registers\u0020all\u0020WordPress\u0020hooks.", + "url": "classes/MCI-Footnotes-Hooks.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AactivatePlugin\u0028\u0029", + "name": "activatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020activated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_activatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AdeactivatePlugin\u0028\u0029", + "name": "deactivatePlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020deactivated.", + "url": "classes/MCI-Footnotes-Hooks.html#method_deactivatePlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003AuninstallPlugin\u0028\u0029", + "name": "uninstallPlugin", + "summary": "Executed\u0020when\u0020the\u0020Plugin\u0020gets\u0020uninstalled.", + "url": "classes/MCI-Footnotes-Hooks.html#method_uninstallPlugin" + }, { + "fqsen": "\\MCI_Footnotes_Hooks\u003A\u003APluginLinks\u0028\u0029", + "name": "PluginLinks", + "summary": "Add\u0020Links\u0020to\u0020the\u0020Plugin\u0020in\u0020the\u0020\u0022installed\u0020Plugins\u0022\u0020page.", + "url": "classes/MCI-Footnotes-Hooks.html#method_PluginLinks" + }, { + "fqsen": "\\MCI_Footnotes", + "name": "MCI_Footnotes", + "summary": "Entry\u0020point\u0020of\u0020the\u0020Plugin.\u0020Loads\u0020the\u0020Dashboard\u0020and\u0020executes\u0020the\u0020Task.", + "url": "classes/MCI-Footnotes.html" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003Arun\u0028\u0029", + "name": "run", + "summary": "Executes\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_run" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeWidgets\u0028\u0029", + "name": "initializeWidgets", + "summary": "Initializes\u0020all\u0020Widgets\u0020of\u0020the\u0020Plugin.", + "url": "classes/MCI-Footnotes.html#method_initializeWidgets" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeDashboard\u0028\u0029", + "name": "initializeDashboard", + "summary": "Initializes\u0020the\u0020Dashboard\u0020of\u0020the\u0020Plugin\u0020and\u0020loads\u0020them.", + "url": "classes/MCI-Footnotes.html#method_initializeDashboard" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AinitializeTask\u0028\u0029", + "name": "initializeTask", + "summary": "Initializes\u0020the\u0020Plugin\u0020Task\u0020and\u0020registers\u0020the\u0020Task\u0020hooks.", + "url": "classes/MCI-Footnotes.html#method_initializeTask" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003AregisterPublic\u0028\u0029", + "name": "registerPublic", + "summary": "Registers\u0020and\u0020enqueues\u0020scripts\u0020and\u0020stylesheets\u0020to\u0020the\u0020public\u0020pages.", + "url": "classes/MCI-Footnotes.html#method_registerPublic" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_obj_Task", + "name": "a_obj_Task", + "summary": "Reference\u0020to\u0020the\u0020Plugin\u0020Task\u0020object.", + "url": "classes/MCI-Footnotes.html#property_a_obj_Task" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020and\u0020script\u0020\/\u0020stylesheet\u0020load\u0020optimization.", + "url": "classes/MCI-Footnotes.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Language", + "name": "MCI_Footnotes_Language", + "summary": "Loads\u0020text\u0020domain\u0020of\u0020current\u0020or\u0020default\u0020language\u0020for\u0020localization.", + "url": "classes/MCI-Footnotes-Language.html" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hook.", + "url": "classes/MCI-Footnotes-Language.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003AloadTextDomain\u0028\u0029", + "name": "loadTextDomain", + "summary": "Loads\u0020the\u0020text\u0020domain\u0020for\u0020current\u0020WordPress\u0020language\u0020if\u0020exists.", + "url": "classes/MCI-Footnotes-Language.html#method_loadTextDomain" + }, { + "fqsen": "\\MCI_Footnotes_Language\u003A\u003Aload\u0028\u0029", + "name": "load", + "summary": "Loads\u0020a\u0020specific\u0020text\u0020domain.", + "url": "classes/MCI-Footnotes-Language.html#method_load" + }, { + "fqsen": "\\MCI_Footnotes_Settings", + "name": "MCI_Footnotes_Settings", + "summary": "Loads\u0020the\u0020settings\u0020values,\u0020sets\u0020to\u0020default\u0020values\u0020if\u0020undefined.", + "url": "classes/MCI-Footnotes-Settings.html" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Loads\u0020all\u0020Settings\u0020from\u0020each\u0020WordPress\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Ainstance\u0028\u0029", + "name": "instance", + "summary": "Returns\u0020a\u0020singleton\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#method_instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetContainer\u0028\u0029", + "name": "getContainer", + "summary": "Returns\u0020the\u0020name\u0020of\u0020a\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getContainer" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AgetDefaults\u0028\u0029", + "name": "getDefaults", + "summary": "Returns\u0020the\u0020default\u0020values\u0020of\u0020a\u0020specific\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_getDefaults" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AloadAll\u0028\u0029", + "name": "loadAll", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_loadAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ALoad\u0028\u0029", + "name": "Load", + "summary": "Loads\u0020all\u0020Settings\u0020from\u0020specified\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_Load" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AsaveOptions\u0028\u0029", + "name": "saveOptions", + "summary": "Updates\u0020a\u0020whole\u0020Settings\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#method_saveOptions" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "Returns\u0020the\u0020value\u0020of\u0020specified\u0020Settings\u0020name.", + "url": "classes/MCI-Footnotes-Settings.html#method_get" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AClearAll\u0028\u0029", + "name": "ClearAll", + "summary": "Deletes\u0020each\u0020Settings\u0020Container\u0020and\u0020loads\u0020the\u0020default\u0020values\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#method_ClearAll" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003ARegisterSettings\u0028\u0029", + "name": "RegisterSettings", + "summary": "Register\u0020all\u0020Settings\u0020Container\u0020for\u0020the\u0020Plugin\u0020Settings\u0020Page\u0020in\u0020the\u0020Dashboard.", + "url": "classes/MCI-Footnotes-Settings.html#method_RegisterSettings" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_NAME", + "name": "C_STR_REFERENCE_CONTAINER_NAME", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_NAME" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "name": "C_BOOL_REFERENCE_CONTAINER_COLLAPSE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020collapse\u0020the\u0020reference\u0020container\u0020by\u0020default.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_COLLAPSE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION", + "name": "C_STR_REFERENCE_CONTAINER_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020position\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "name": "C_BOOL_COMBINE_IDENTICAL_FOOTNOTES", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020combining\u0020identical\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_COMBINE_IDENTICAL_FOOTNOTES" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020short\u0020code\u0020of\u0020the\u0020footnote\u2019s\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020start.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "name": "C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020short\u0020code\u0020of\u0020the\u0020footnotes\u0020end.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_COUNTER_STYLE", + "name": "C_STR_FOOTNOTES_COUNTER_STYLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020counter\u0020style\u0020of\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_COUNTER_STYLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_LOVE", + "name": "C_STR_FOOTNOTES_LOVE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020\u0027I\u0020love\u0020footnotes\u0027\u0020text.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_LOVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_IN_EXCERPT", + "name": "C_BOOL_FOOTNOTES_IN_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020look\u0020for\u0020footnotes\u0020in\u0020post\u0020excerpts.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_IN_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_EXPERT_MODE", + "name": "C_BOOL_FOOTNOTES_EXPERT_MODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Expert\u0020mode.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_EXPERT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_BEFORE", + "name": "C_STR_FOOTNOTES_STYLING_BEFORE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020before\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_BEFORE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_STYLING_AFTER", + "name": "C_STR_FOOTNOTES_STYLING_AFTER", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020string\u0020after\u0020the\u0020footnote\u0020referrer.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_STYLING_AFTER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020mouse\u002Dover\u0020box.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020alternative\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "name": "C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020tooltip\u0020truncation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020length\u0020of\u0020the\u0020enabled\u0020excerpt.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020position.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028x\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020offset\u0020\u0028y\u0029.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020background\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020border\u0020radius.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "name": "C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020max.\u0020width.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "name": "C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020mouse\u002Dover\u0020box\u0020to\u0020define\u0020the\u0020box\u002Dshadow\u0020color.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW", + "name": "C_STR_HYPERLINK_ARROW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020backlink\u0020symbol\u0020selection.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HYPERLINK_ARROW_USER_DEFINED", + "name": "C_STR_HYPERLINK_ARROW_USER_DEFINED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020user\u002Ddefined\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HYPERLINK_ARROW_USER_DEFINED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS", + "name": "C_STR_CUSTOM_CSS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_CUSTOM_CSS_NEW", + "name": "C_STR_CUSTOM_CSS_NEW", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020Custom\u0020CSS\u0020migrated\u0020to\u0020a\u0020dedicated\u0020tab.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_CUSTOM_CSS_NEW" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "name": "C_BOOL_CUSTOM_CSS_LEGACY_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020display\u0020of\u0020legacy\u0020Custom\u0020CSS\u0020metaboxes.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_CUSTOM_CSS_LEGACY_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_THE_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_CONTENT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_content\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_CONTENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "name": "C_BOOL_EXPERT_LOOKUP_THE_EXCERPT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027the_excerpt\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_THE_EXCERPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_title\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "name": "C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020\u0027widget_text\u0027\u0020hook.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "name": "C_STR_FOOTNOTES_TOOLTIP_READON_LABEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020label\u0020of\u0020the\u0020Read\u002Don\u0020button\u0020in\u0020truncated\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_READON_LABEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "name": "C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020the\u0020referrer\u0020element.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020display\u0020of\u0020a\u0020backlink\u0020symbol.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020not\u0020display\u0020the\u0020reference\u0020container\u0020on\u0020the\u0020homepage.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020enable\u0020the\u0020legacy\u0020layout\u0020of\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "name": "C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH", + "summary": "Settings\u0020Container\u0020Key\u0020to\u0020get\u0020the\u0020backlink\u0020symbol\u0020switch\u0020side.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027the_content\u0027\u0020hook\u0020priority\u0020level.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020\u0027\u0027\u0020hook\u0020priority\u0020level", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "name": "C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_LINK_ELEMENT_ENABLED", + "name": "C_BOOL_LINK_ELEMENT_ENABLED", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020the\u0020link\u0020element\u0020option\nSettings\u0020Container\u0020Keys\u0020for\u0020backlink\u0020typography\u0020and\u0020layout\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020font\u0020size\nSettings\u0020Container\u0020Keys\u0020for\u0020page\u0020layout\u0020support\nSettings\u0020Container\u0020Keys\u0020for\u0020scroll\u0020offset\u0020and\u0020duration\nSettings\u0020Container\u0020Keys\u0020for\u0020tooltip\u0020display\u0020durations", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_LINK_ELEMENT_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_SEPARATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_SEPARATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_OPTION", + "name": "C_STR_BACKLINKS_SEPARATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_SEPARATOR_CUSTOM", + "name": "C_STR_BACKLINKS_SEPARATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_SEPARATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "name": "C_BOOL_BACKLINKS_TERMINATOR_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_TERMINATOR_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_OPTION", + "name": "C_STR_BACKLINKS_TERMINATOR_OPTION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_OPTION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_TERMINATOR_CUSTOM", + "name": "C_STR_BACKLINKS_TERMINATOR_CUSTOM", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_TERMINATOR_CUSTOM" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "name": "C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "name": "C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "name": "C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "name": "C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "name": "C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "name": "C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "name": "C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "name": "C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_OFFSET", + "name": "C_INT_FOOTNOTES_SCROLL_OFFSET", + "summary": "Scroll\u0020offset\u0020and\u0020duration", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_OFFSET" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_SCROLL_DURATION", + "name": "C_INT_FOOTNOTES_SCROLL_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_SCROLL_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "name": "C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "name": "C_BOOL_FOOTNOTE_URL_WRAP_ENABLED", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020URL\u0020wrap\u0020option", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_URL_WRAP_ENABLED" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "name": "C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020reference\u0020container\u0020position\u0020shortcode", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "name": "C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION", + "summary": "Settings\u0020Container\u0020Keys\u0020for\u0020alternative\u0020tooltip\u0020position\nSettings\u0020Container\u0020Keys\u0020for\u0020reference\u0020container\u0020label\u0020element,\u0020thanks\u0020to\u0020\u0040markhillyer", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "name": "C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "name": "C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "name": "C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "name": "C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE", + "summary": "Settings\u0020Container\u0020Key\u0020for\u0020table\u0020cell\u0020borders,\u0020thanks\u0020to\u0020\u0040noobishh", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_TOP_MARGIN", + "summary": "Settings\u0020container\u0020keys\u0020for\u0020reference\u0020container\u0020top\u0020and\u0020bottom\u0020margins\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020enabling\nSettings\u0020container\u0020keys\u0020for\u0020hard\u0020link\u0020anchors\u0020in\u0020referrers\u0020and\u0020footnotes", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_TOP_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "name": "C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "name": "C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_REFERRER_FRAGMENT_ID_SLUG", + "name": "C_STR_REFERRER_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_REFERRER_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "name": "C_STR_FOOTNOTE_FRAGMENT_ID_SLUG", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_FRAGMENT_ID_SLUG" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_HARD_LINK_IDS_SEPARATOR", + "name": "C_STR_HARD_LINK_IDS_SEPARATOR", + "summary": "", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_HARD_LINK_IDS_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "name": "C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020for\u0020shortcode\u0020syntax\u0020validation.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "name": "C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020backlink\u0020tooltips.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "name": "C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020backlink\u0020tooltip.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020delimiter.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "name": "C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020mirroring\u0020the\u0020tooltip\u0020excerpt\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "name": "C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR", + "summary": "Settings\u0020container\u0020key\u0020to\u0020configure\u0020the\u0020tooltip\u0020excerpt\u0020separator\u0020in\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "name": "C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT", + "summary": "Settings\u0020container\u0020key\u0020to\u0020enable\u0020superscript\u0020style\u0020normalization.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003AC_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "name": "C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE", + "summary": "Settings\u0020container\u0020key\u0020to\u0020select\u0020the\u0020script\u0020mode\u0020for\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Settings.html#constant_C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_obj_Instance", + "name": "a_obj_Instance", + "summary": "Stores\u0020a\u0020singleton\u0020reference\u0020of\u0020this\u0020class.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_obj_Instance" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Container", + "name": "a_arr_Container", + "summary": "Contains\u0020all\u0020Settings\u0020Container\u0020names.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Container" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Default", + "name": "a_arr_Default", + "summary": "Contains\u0020all\u0020Default\u0020Settings\u0020for\u0020each\u0020Settings\u0020Container.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Default" + }, { + "fqsen": "\\MCI_Footnotes_Settings\u003A\u003A\u0024a_arr_Settings", + "name": "a_arr_Settings", + "summary": "Contains\u0020all\u0020Settings\u0020from\u0020each\u0020Settings\u0020container\u0020as\u0020soon\u0020as\u0020this\u0020class\u0020is\u0020initialized.", + "url": "classes/MCI-Footnotes-Settings.html#property_a_arr_Settings" + }, { + "fqsen": "\\MCI_Footnotes_Task", + "name": "MCI_Footnotes_Task", + "summary": "Searches\u0020and\u0020replaces\u0020the\u0020footnotes.", + "url": "classes/MCI-Footnotes-Task.html" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "Register\u0020WordPress\u0020Hooks\u0020to\u0020replace\u0020Footnotes\u0020in\u0020the\u0020content\u0020of\u0020a\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_head\u0028\u0029", + "name": "wp_head", + "summary": "Outputs\u0020the\u0020custom\u0020css\u0020to\u0020the\u0020header\u0020of\u0020the\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_head" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awp_footer\u0028\u0029", + "name": "wp_footer", + "summary": "Displays\u0020the\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020slug\u0020if\u0020enabled.", + "url": "classes/MCI-Footnotes-Task.html#method_wp_footer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_title\u0028\u0029", + "name": "the_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020post\/page\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_the_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_content\u0028\u0029", + "name": "the_content", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_content" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_excerpt\u0028\u0029", + "name": "the_excerpt", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020excerpt\u0020of\u0020the\u0020current\u0020page\/post.", + "url": "classes/MCI-Footnotes-Task.html#method_the_excerpt" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_title\u0028\u0029", + "name": "widget_title", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020widget\u0020title.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_title" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Awidget_text\u0028\u0029", + "name": "widget_text", + "summary": "Replaces\u0020footnotes\u0020in\u0020the\u0020content\u0020of\u0020the\u0020current\u0020widget.", + "url": "classes/MCI-Footnotes-Task.html#method_widget_text" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Athe_post\u0028\u0029", + "name": "the_post", + "summary": "Replaces\u0020footnotes\u0020in\u0020each\u0020Content\u0020var\u0020of\u0020the\u0020current\u0020Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_the_post" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AreplacePostObject\u0028\u0029", + "name": "replacePostObject", + "summary": "Replace\u0020all\u0020Footnotes\u0020in\u0020a\u0020WP_Post\u0020object.", + "url": "classes/MCI-Footnotes-Task.html#method_replacePostObject" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Aexec\u0028\u0029", + "name": "exec", + "summary": "Replaces\u0020all\u0020footnotes\u0020that\u0020occur\u0020in\u0020the\u0020given\u0020content.", + "url": "classes/MCI-Footnotes-Task.html#method_exec" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003Asearch\u0028\u0029", + "name": "search", + "summary": "Replaces\u0020all\u0020footnotes\u0020in\u0020the\u0020given\u0020content\u0020and\u0020appends\u0020them\u0020to\u0020the\u0020static\u0020property.", + "url": "classes/MCI-Footnotes-Task.html#method_search" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003AReferenceContainer\u0028\u0029", + "name": "ReferenceContainer", + "summary": "Generates\u0020the\u0020reference\u0020container.", + "url": "classes/MCI-Footnotes-Task.html#method_ReferenceContainer" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_arr_Footnotes", + "name": "a_arr_Footnotes", + "summary": "Contains\u0020all\u0020footnotes\u0020found\u0020on\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_arr_Footnotes" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AllowLoveMe", + "name": "a_bool_AllowLoveMe", + "summary": "Flag\u0020if\u0020the\u0020display\u0020of\u0020\u0027LOVE\u0020FOOTNOTES\u0027\u0020is\u0020allowed\u0020on\u0020the\u0020current\u0020public\u0020page.", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AllowLoveMe" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_Prefix", + "name": "a_str_Prefix", + "summary": "Prefix\u0020for\u0020the\u0020Footnote\u0020html\u0020element\u0020ID.", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_Prefix" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_PostId", + "name": "a_int_PostId", + "summary": "Infinite\u0020scroll\u0020\/\u0020autoload\u0020or\u0020archive\u0020view", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_PostId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ReferenceContainerId", + "name": "a_int_ReferenceContainerId", + "summary": "Multiple\u0020reference\u0020containers\u0020in\u0020content\u0020and\u0020widgets", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ReferenceContainerId" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_TooltipsEnabled", + "name": "a_bool_TooltipsEnabled", + "summary": "Template\u0020process\u0020optimization", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_TooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_AlternativeTooltipsEnabled", + "name": "a_bool_AlternativeTooltipsEnabled", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_AlternativeTooltipsEnabled" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_HardLinksEnable", + "name": "a_bool_HardLinksEnable", + "summary": "Hard\u0020links\u0020for\u0020AMP\u0020compatibility", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_HardLinksEnable" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_ReferrerLinkSlug", + "name": "a_str_ReferrerLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_ReferrerLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_FootnoteLinkSlug", + "name": "a_str_FootnoteLinkSlug", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_FootnoteLinkSlug" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkIdsSeparator", + "name": "a_str_LinkIdsSeparator", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkIdsSeparator" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_PostContainerIdCompound", + "name": "a_str_PostContainerIdCompound", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_PostContainerIdCompound" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_ScrollOffset", + "name": "a_int_ScrollOffset", + "summary": "Scroll\u0020offset", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_ScrollOffset" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkSpan", + "name": "a_str_LinkSpan", + "summary": "Optional\u0020link\u0020element\u0020for\u0020footnote\u0020referrers\u0020and\u0020backlinks", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkSpan" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkOpenTag", + "name": "a_str_LinkOpenTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkOpenTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_LinkCloseTag", + "name": "a_str_LinkCloseTag", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_LinkCloseTag" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_MirrorTooltipText", + "name": "a_bool_MirrorTooltipText", + "summary": "Dedicated\u0020tooltip\u0020text", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_MirrorTooltipText" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_str_TooltipShortcode", + "name": "a_str_TooltipShortcode", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_str_TooltipShortcode" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_int_TooltipShortcodeLength", + "name": "a_int_TooltipShortcodeLength", + "summary": "", + "url": "classes/MCI-Footnotes-Task.html#property_a_int_TooltipShortcodeLength" + }, { + "fqsen": "\\MCI_Footnotes_Task\u003A\u003A\u0024a_bool_SyntaxErrorFlag", + "name": "a_bool_SyntaxErrorFlag", + "summary": "Footnote\u0020delimiter\u0020syntax\u0020validation", + "url": "classes/MCI-Footnotes-Task.html#property_a_bool_SyntaxErrorFlag" + }, { + "fqsen": "\\MCI_Footnotes_Template", + "name": "MCI_Footnotes_Template", + "summary": "Handles\u0020each\u0020Template\u0020file\u0020for\u0020the\u0020Plugin\u0020Frontend\u0020\u0028e.g.\u0020Settings\u0020Dashboard,\u0020Public\u0020pages,\u0020...\u0029.", + "url": "classes/MCI-Footnotes-Template.html" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Reads\u0020and\u0020loads\u0020the\u0020template\u0020file\u0020without\u0020replace\u0020any\u0020placeholder.", + "url": "classes/MCI-Footnotes-Template.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areplace\u0028\u0029", + "name": "replace", + "summary": "Replace\u0020all\u0020placeholders\u0020specified\u0020in\u0020array.", + "url": "classes/MCI-Footnotes-Template.html#method_replace" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Areload\u0028\u0029", + "name": "reload", + "summary": "Reloads\u0020the\u0020original\u0020content\u0020of\u0020the\u0020template\u0020file.", + "url": "classes/MCI-Footnotes-Template.html#method_reload" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AgetContent\u0028\u0029", + "name": "getContent", + "summary": "Returns\u0020the\u0020content\u0020of\u0020the\u0020template\u0020file\u0020with\u0020replaced\u0020placeholders.", + "url": "classes/MCI-Footnotes-Template.html#method_getContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aprocess_template\u0028\u0029", + "name": "process_template", + "summary": "Process\u0020template\u0020file", + "url": "classes/MCI-Footnotes-Template.html#method_process_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003Aget_template\u0028\u0029", + "name": "get_template", + "summary": "Get\u0020the\u0020template", + "url": "classes/MCI-Footnotes-Template.html#method_get_template" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_DASHBOARD", + "name": "C_STR_DASHBOARD", + "summary": "Directory\u0020name\u0020for\u0020dashboard\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_DASHBOARD" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003AC_STR_PUBLIC", + "name": "C_STR_PUBLIC", + "summary": "Directory\u0020name\u0020for\u0020public\u0020templates.", + "url": "classes/MCI-Footnotes-Template.html#constant_C_STR_PUBLIC" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_OriginalContent", + "name": "a_str_OriginalContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_OriginalContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024a_str_ReplacedContent", + "name": "a_str_ReplacedContent", + "summary": "Contains\u0020the\u0020content\u0020of\u0020the\u0020template\u0020after\u0020initialize\u0020with\u0020replaced\u0020place\u0020holders.", + "url": "classes/MCI-Footnotes-Template.html#property_a_str_ReplacedContent" + }, { + "fqsen": "\\MCI_Footnotes_Template\u003A\u003A\u0024plugin_directory", + "name": "plugin_directory", + "summary": "Plugin\u0020Directory", + "url": "classes/MCI-Footnotes-Template.html#property_plugin_directory" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase", + "name": "MCI_Footnotes_WidgetBase", + "summary": "Base\u0020Class\u0020for\u0020all\u0020Plugin\u0020Widgets.\u0020Registers\u0020each\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020child\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003AgetWidgetWidth\u0028\u0029", + "name": "getWidgetWidth", + "summary": "Returns\u0020the\u0020width\u0020of\u0020the\u0020Widget.\u0020Default\u0020width\u0020is\u0020250\u0020pixel.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method_getWidgetWidth" + }, { + "fqsen": "\\MCI_Footnotes_WidgetBase\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "Class\u0020Constructor.\u0020Registers\u0020the\u0020child\u0020Widget\u0020to\u0020WordPress.", + "url": "classes/MCI-Footnotes-WidgetBase.html#method___construct" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer", + "name": "MCI_Footnotes_Widget_ReferenceContainer", + "summary": "Registers\u0020a\u0020Widget\u0020to\u0020put\u0020the\u0020Reference\u0020Container\u0020to\u0020the\u0020widget\u0020area.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetID\u0028\u0029", + "name": "getID", + "summary": "Returns\u0020an\u0020unique\u0020ID\u0020as\u0020string\u0020used\u0020for\u0020the\u0020Widget\u0020Base\u0020ID.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getID" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetName\u0028\u0029", + "name": "getName", + "summary": "Returns\u0020the\u0020Public\u0020name\u0020of\u0020the\u0020Widget\u0020to\u0020be\u0020displayed\u0020in\u0020the\u0020Configuration\u0020page.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getName" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003AgetDescription\u0028\u0029", + "name": "getDescription", + "summary": "Returns\u0020the\u0020Description\u0020of\u0020the\u0020child\u0020widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_getDescription" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Aform\u0028\u0029", + "name": "form", + "summary": "Outputs\u0020the\u0020Settings\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_form" + }, { + "fqsen": "\\MCI_Footnotes_Widget_ReferenceContainer\u003A\u003Awidget\u0028\u0029", + "name": "widget", + "summary": "Outputs\u0020the\u0020Content\u0020of\u0020the\u0020Widget.", + "url": "classes/MCI-Footnotes-Widget-ReferenceContainer.html#method_widget" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG", + "name": "MCI_Footnotes_WYSIWYG", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AregisterHooks\u0028\u0029", + "name": "registerHooks", + "summary": "", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_registerHooks" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewVisualEditorButton\u0028\u0029", + "name": "newVisualEditorButton", + "summary": "Append\u0020a\u0020new\u0020Button\u0020to\u0020the\u0020WYSIWYG\u0020editor\u0020of\u0020Posts\u0020and\u0020Pages.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newVisualEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AnewPlainTextEditorButton\u0028\u0029", + "name": "newPlainTextEditorButton", + "summary": "Add\u0020a\u0020new\u0020button\u0020to\u0020the\u0020plain\u0020text\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_newPlainTextEditorButton" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AincludeScripts\u0028\u0029", + "name": "includeScripts", + "summary": "Includes\u0020the\u0020Plugins\u0020WYSIWYG\u0020editor\u0020script.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_includeScripts" + }, { + "fqsen": "\\MCI_Footnotes_WYSIWYG\u003A\u003AajaxCallback\u0028\u0029", + "name": "ajaxCallback", + "summary": "AJAX\u0020Callback\u0020function\u0020when\u0020the\u0020Footnotes\u0020Button\u0020is\u0020clicked.\u0020Either\u0020in\u0020the\u0020Plain\u0020text\u0020or\u0020Visual\u0020editor.", + "url": "classes/MCI-Footnotes-WYSIWYG.html#method_ajaxCallback" + }, { + "fqsen": "\\MCI_Footnotes_requirePhpFiles\u0028\u0029", + "name": "MCI_Footnotes_requirePhpFiles", + "summary": "Requires\u0020\u0028require_once\u0029\u0020all\u0020\u002A.php\u0020files\u0020inside\u0020a\u0020specific\u0020Directory.", + "url": "namespaces/default.html#function_MCI_Footnotes_requirePhpFiles" + }, { + "fqsen": "\\", + "name": "\\", + "summary": "", + "url": "namespaces/default.html" + } ] +); diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html new file mode 100644 index 0000000..c9f9b75 --- /dev/null +++ b/docs/namespaces/default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Documentation

                                                                                                                                                                                                                                            + + + + + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            API Documentation

                                                                                                                                                                                                                                            + + + +

                                                                                                                                                                                                                                            + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            MCI_Footnotes_Config
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Convert
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Converts data types and Footnotes specific values.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Layout_Init
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Handles the Settings interface of the Plugin.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_LayoutEngine
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Layout Engine for the administration dashboard.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Layout_Settings
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Displays and handles all Settings of the Plugin.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Hooks
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Language
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Loads text domain of current or default language for localization.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Settings
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Loads the settings values, sets to default values if undefined.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Task
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Searches and replaces the footnotes.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Template
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_WidgetBase
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            MCI_Footnotes_WYSIWYG
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                            + Table of Contents + +

                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            + + + +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            + Functions + +

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                                                                                                            + + +

                                                                                                                                                                                                                                            Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                                                                                                            + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            Parameters
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + $p_str_Directory + : string +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Absolute Directory path to lookup for *.php files

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            + Tags + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + author +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +

                                                                                                                                                                                                                                            Stefan Herndler

                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + since +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + 1.5.0 + +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                            Search results

                                                                                                                                                                                                                                            + +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              + + + + diff --git a/docs/packages/Default.html b/docs/packages/Default.html new file mode 100644 index 0000000..d4680ea --- /dev/null +++ b/docs/packages/Default.html @@ -0,0 +1,227 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Documentation

                                                                                                                                                                                                                                              + + + + + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Default

                                                                                                                                                                                                                                              + + + +

                                                                                                                                                                                                                                              + Interfaces, Classes and Traits + +

                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              MCI_Footnotes_Config
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Contains all Plugin Constants. Contains no Method or Property.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Convert
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Converts data types and Footnotes specific values.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Layout_Init
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Handles the Settings interface of the Plugin.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_LayoutEngine
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Layout Engine for the administration dashboard.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Layout_Diagnostics
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Displays Diagnostics of the web server, PHP and WordPress.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Layout_Settings
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Displays and handles all Settings of the Plugin.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Hooks
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Registers all WordPress Hooks and executes them on demand.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Entry point of the Plugin. Loads the Dashboard and executes the Task.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Language
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Loads text domain of current or default language for localization.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Settings
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Loads the settings values, sets to default values if undefined.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Task
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Searches and replaces the footnotes.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Template
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Handles each Template file for the Plugin Frontend (e.g. Settings Dashboard, Public pages, ...).
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_WidgetBase
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Base Class for all Plugin Widgets. Registers each Widget to WordPress.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_Widget_ReferenceContainer
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Registers a Widget to put the Reference Container to the widget area.
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              MCI_Footnotes_WYSIWYG
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                              + Table of Contents + +

                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + MCI_Footnotes_requirePhpFiles() + +  : mixed +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              Requires (require_once) all *.php files inside a specific Directory.
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              + + + +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + Functions + +

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              + MCI_Footnotes_requirePhpFiles() + +

                                                                                                                                                                                                                                              + + +

                                                                                                                                                                                                                                              Requires (require_once) all *.php files inside a specific Directory.

                                                                                                                                                                                                                                              + + + + MCI_Footnotes_requirePhpFiles(string $p_str_Directory) : mixed + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              Parameters
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + $p_str_Directory + : string +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Absolute Directory path to lookup for *.php files

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              + Tags + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + author +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +

                                                                                                                                                                                                                                              Stefan Herndler

                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + since +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + 1.5.0 + +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +

                                                                                                                                                                                                                                              Search results

                                                                                                                                                                                                                                              + +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + +
                                                                                                                                                                                                                                                + + + + diff --git a/docs/packages/default.html b/docs/packages/default.html new file mode 100644 index 0000000..3d3e60c --- /dev/null +++ b/docs/packages/default.html @@ -0,0 +1,116 @@ + + + + + Documentation + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Documentation

                                                                                                                                                                                                                                                + + + + + +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                API Documentation

                                                                                                                                                                                                                                                + +

                                                                                                                                                                                                                                                + Packages + +

                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                Default
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                + + + + + + + + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +

                                                                                                                                                                                                                                                Search results

                                                                                                                                                                                                                                                + +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  + + + + diff --git a/docs/reports/deprecated.html b/docs/reports/deprecated.html new file mode 100644 index 0000000..31e5420 --- /dev/null +++ b/docs/reports/deprecated.html @@ -0,0 +1,106 @@ + + + + + Documentation » Deprecated elements + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Documentation

                                                                                                                                                                                                                                                  + + + + + +
                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  + + + + +
                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                  + + +
                                                                                                                                                                                                                                                  + No deprecated elements have been found in this project. +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                  Search results

                                                                                                                                                                                                                                                  + +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    + + + + diff --git a/docs/reports/errors.html b/docs/reports/errors.html new file mode 100644 index 0000000..340516e --- /dev/null +++ b/docs/reports/errors.html @@ -0,0 +1,174 @@ + + + + + Documentation » Compilation errors + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Documentation

                                                                                                                                                                                                                                                    + + + + + +
                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    + + + + +
                                                                                                                                                                                                                                                    + + +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Errors

                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    Table of Contents

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    class/dashboard/subpage-main.php1
                                                                                                                                                                                                                                                    class/language.php1
                                                                                                                                                                                                                                                    class/settings.php1
                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                    subpage-main.php

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    TypeLineDescription
                                                                                                                                                                                                                                                    ERROR0Tag "see" with body "@see templates/dashboard/customize-css.html + 2020-12-09T1113+0100" has error "\templates/dashboard/customize-css.html" is not a valid Fqsen.
                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    language.php

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    TypeLineDescription
                                                                                                                                                                                                                                                    ERROR0Tag "see" with body "@see wp-includes/l10n.php:857" has error "\wp-includes/l10n.php:857" is not a valid Fqsen.
                                                                                                                                                                                                                                                    + +

                                                                                                                                                                                                                                                    settings.php

                                                                                                                                                                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                    TypeLineDescription
                                                                                                                                                                                                                                                    ERROR0Tag "since" with body "@since ditched trimming whitespace from text box content in response to user request." has error
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                    Search results

                                                                                                                                                                                                                                                    + +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      + + + + diff --git a/docs/reports/markers.html b/docs/reports/markers.html new file mode 100644 index 0000000..67e0a4e --- /dev/null +++ b/docs/reports/markers.html @@ -0,0 +1,128 @@ + + + + + Documentation » Markers + + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Documentation

                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      + + + + +
                                                                                                                                                                                                                                                      + + +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Markers

                                                                                                                                                                                                                                                      + +

                                                                                                                                                                                                                                                      Table of Contents

                                                                                                                                                                                                                                                      + + + + + +
                                                                                                                                                                                                                                                      class/settings.php1
                                                                                                                                                                                                                                                      + + +

                                                                                                                                                                                                                                                      settings.php

                                                                                                                                                                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                                                                                                                                                                      TypeLineDescription
                                                                                                                                                                                                                                                      TODO89Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +

                                                                                                                                                                                                                                                      Search results

                                                                                                                                                                                                                                                      + +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        +
                                                                                                                                                                                                                                                        + + +
                                                                                                                                                                                                                                                        + + + + From 7e2fa7e85a0c36ee67478e13c51085cf3ed823e7 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 19:56:10 +0000 Subject: [PATCH 110/144] Add .phpdoc/ to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fdc234 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.phpdoc/ From 280f6c15fc824aee1ca1af93edaa22c58a539656 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 07:52:09 +0000 Subject: [PATCH 111/144] Create LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 00556c1c848daf736d7586a087498ae1a0e99b12 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:45:57 +0000 Subject: [PATCH 112/144] Rename dashboard files --- class/dashboard/{layout.php => abstract-engine.php} | 0 class/dashboard/{subpage-diagnostics.php => diagnostics.php} | 0 class/dashboard/{subpage-main.php => settings.php} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename class/dashboard/{layout.php => abstract-engine.php} (100%) rename class/dashboard/{subpage-diagnostics.php => diagnostics.php} (100%) rename class/dashboard/{subpage-main.php => settings.php} (100%) diff --git a/class/dashboard/layout.php b/class/dashboard/abstract-engine.php similarity index 100% rename from class/dashboard/layout.php rename to class/dashboard/abstract-engine.php diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/diagnostics.php similarity index 100% rename from class/dashboard/subpage-diagnostics.php rename to class/dashboard/diagnostics.php diff --git a/class/dashboard/subpage-main.php b/class/dashboard/settings.php similarity index 100% rename from class/dashboard/subpage-main.php rename to class/dashboard/settings.php From 3d8719f65359ef09bc5adfa6c5e83680ad97d887 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:47:39 +0000 Subject: [PATCH 113/144] Add temp file --- class/layout/foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 class/layout/foo diff --git a/class/layout/foo b/class/layout/foo new file mode 100644 index 0000000..e69de29 From 2dc096f1f6a7e0396727da3e9c19cb3d9730c419 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 16:48:21 +0000 Subject: [PATCH 114/144] Rename `dashboard/` to `layout/`. --- class/{dashboard => layout}/abstract-engine.php | 0 class/{dashboard => layout}/diagnostics.php | 0 class/layout/foo | 0 class/{dashboard => layout}/init.php | 0 class/{dashboard => layout}/settings.php | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename class/{dashboard => layout}/abstract-engine.php (100%) rename class/{dashboard => layout}/diagnostics.php (100%) delete mode 100644 class/layout/foo rename class/{dashboard => layout}/init.php (100%) rename class/{dashboard => layout}/settings.php (100%) diff --git a/class/dashboard/abstract-engine.php b/class/layout/abstract-engine.php similarity index 100% rename from class/dashboard/abstract-engine.php rename to class/layout/abstract-engine.php diff --git a/class/dashboard/diagnostics.php b/class/layout/diagnostics.php similarity index 100% rename from class/dashboard/diagnostics.php rename to class/layout/diagnostics.php diff --git a/class/layout/foo b/class/layout/foo deleted file mode 100644 index e69de29..0000000 diff --git a/class/dashboard/init.php b/class/layout/init.php similarity index 100% rename from class/dashboard/init.php rename to class/layout/init.php diff --git a/class/dashboard/settings.php b/class/layout/settings.php similarity index 100% rename from class/dashboard/settings.php rename to class/layout/settings.php From 0b74ef065292575cb692b45439a906cd590a356f Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 23 Feb 2021 17:16:15 +0000 Subject: [PATCH 115/144] Commit composer lockfile --- composer.lock | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 composer.lock diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..9e0ee7c --- /dev/null +++ b/composer.lock @@ -0,0 +1,196 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3a147d50695956de52f7cbf827b47830", + "packages": [], + "packages-dev": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "time": "2020-05-13T23:57:56+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} From 166f79e698f65d40a671b976018990ffe4e6aa68 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 20 Feb 2021 20:55:46 +0000 Subject: [PATCH 116/144] Add getting started instructions to README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index f6a4ac9..a6ce5b3 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,21 @@ Unit tests are TODO. 1. Install [phpDocumentor](https://phpdoc.org/) 1. Run it (`phpDocumentor -d . -t docs`) +## Getting Started + +1. Read the contributing guidelines +1. Clone this repository (`git clone git@github.com:Rumperuu/footnotes.git`) +1. Install [Composer](https://getcomposer.org/download/), if you don't have it already +1. Install dependencies (`composer install`) +1. Create a new branch from `main` (`git checkout -b `) +1. When you're finished, commit your changes to the remote version of your branch + and submit a [pull request](https://github.com/Rumperuu/footnotes/pulls). + +## Updating Documentation + +1. Install [phpDocumentor](https://phpdoc.org/) +1. Run it (`phpDocumentor -d . -t docs`) + ## Main Features - Fully customizable **footnotes** start and end shortcodes; From ccb32670756864009a2c0d5c4107e40e9f5173bd Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 27 Feb 2021 08:14:09 +0000 Subject: [PATCH 117/144] Add authorsfile to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7fdc234..bff37e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .phpdoc/ + +authors.txt From 29ed93d5b84e171dc9e938cb265ff812bd4c7e61 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:18:48 +0200 Subject: [PATCH 118/144] Create symfonycorp.yml --- .github/workflows/symfonycorp.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/symfonycorp.yml diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml new file mode 100644 index 0000000..cd08568 --- /dev/null +++ b/.github/workflows/symfonycorp.yml @@ -0,0 +1,2 @@ +- name: The PHP Security Checker + uses: symfonycorp/security-checker-action@v2 From 9536c4f4b40c765200f2ea87a1a338948ec140c4 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:12:18 +0200 Subject: [PATCH 119/144] Create ossar-analysis.yml --- .github/workflows/ossar-analysis.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ossar-analysis.yml diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml new file mode 100644 index 0000000..f89b0d6 --- /dev/null +++ b/.github/workflows/ossar-analysis.yml @@ -0,0 +1,44 @@ +# This workflow integrates a collection of open source static analysis tools +# with GitHub code scanning. For documentation, or to provide feedback, visit +# https://github.com/github/ossar-action +name: OSSAR + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '39 23 * * 4' + +jobs: + OSSAR-Scan: + # OSSAR runs on windows-latest. + # ubuntu-latest and macos-latest support coming soon + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Ensure a compatible version of dotnet is installed. + # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201. + # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action. + # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped. + # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action: + # - name: Install .NET + # uses: actions/setup-dotnet@v1 + # with: + # dotnet-version: '3.1.x' + + # Run open source static analysis tools + - name: Run OSSAR + uses: github/ossar-action@v1 + id: ossar + + # Upload results to the Security tab + - name: Upload OSSAR results + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: ${{ steps.ossar.outputs.sarifFile }} From b7effb3aaf7513d6fe0ebef60dae82d824ede487 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:21:02 +0200 Subject: [PATCH 120/144] Update symfonycorp.yml --- .github/workflows/symfonycorp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml index cd08568..8e8b6af 100644 --- a/.github/workflows/symfonycorp.yml +++ b/.github/workflows/symfonycorp.yml @@ -1,2 +1,2 @@ -- name: The PHP Security Checker - uses: symfonycorp/security-checker-action@v2 +name: The PHP Security Checker +uses: symfonycorp/security-checker-action@v2 From bad1993aba786737f5d976bbadf2cc829feda922 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:21:48 +0200 Subject: [PATCH 121/144] Update symfonycorp.yml --- .github/workflows/symfonycorp.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml index 8e8b6af..bd0a0a7 100644 --- a/.github/workflows/symfonycorp.yml +++ b/.github/workflows/symfonycorp.yml @@ -1,2 +1,25 @@ -name: The PHP Security Checker -uses: symfonycorp/security-checker-action@v2 +name: 'The PHP Security Checker' +description: 'Checks composer.json for known vulnerabilities in your package dependencies' +branding: + icon: 'umbrella' + color: 'gray-dark' +inputs: + lock: + description: 'The path to composer.lock is stored (root directory by default)' + required: false + default: './composer.lock' + disable-exit-code: + description: 'Whether to fail when issues are detected (false by default)' + required: false + default: 0 +outputs: + vulns: + description: 'The detected vulnerabilities as JSON' +runs: + using: 'docker' + image: 'docker://symfonycorp/cli:latest' + args: + - check:security + - "--dir" + - ${{ inputs.lock }} + - "--disable-exit-code=${{ inputs.disable-exit-code }}" From 876a641456f9ad6d7e6f5cf7d764c5646c95d448 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:23:35 +0200 Subject: [PATCH 122/144] Delete symfonycorp.yml --- .github/workflows/symfonycorp.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/symfonycorp.yml diff --git a/.github/workflows/symfonycorp.yml b/.github/workflows/symfonycorp.yml deleted file mode 100644 index bd0a0a7..0000000 --- a/.github/workflows/symfonycorp.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: 'The PHP Security Checker' -description: 'Checks composer.json for known vulnerabilities in your package dependencies' -branding: - icon: 'umbrella' - color: 'gray-dark' -inputs: - lock: - description: 'The path to composer.lock is stored (root directory by default)' - required: false - default: './composer.lock' - disable-exit-code: - description: 'Whether to fail when issues are detected (false by default)' - required: false - default: 0 -outputs: - vulns: - description: 'The detected vulnerabilities as JSON' -runs: - using: 'docker' - image: 'docker://symfonycorp/cli:latest' - args: - - check:security - - "--dir" - - ${{ inputs.lock }} - - "--disable-exit-code=${{ inputs.disable-exit-code }}" From 47f25065501412227ee464e4f9bb075bae2d7c4d Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:29:01 +0200 Subject: [PATCH 123/144] Create php.yml --- .github/workflows/php.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..6dcf060 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,36 @@ +name: PHP Composer + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" + # Docs: https://getcomposer.org/doc/articles/scripts.md + + # - name: Run test suite + # run: composer run-script test From bdc9a694b01a0388d7ea2d933bc93c722618e240 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Sun, 4 Apr 2021 22:05:58 +0200 Subject: [PATCH 124/144] Create dependabot.yml --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a51bb0b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "composer" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" From 5d89b371dce1d415709afc98d18b2238ae52bc91 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 10 Apr 2021 20:26:30 +0100 Subject: [PATCH 125/144] fix: fix errors introduced in merge --- class/dashboard/layout.php | 4 +- class/dashboard/subpage-main.php | 235 +++++++++++++++++++++++-------- footnotes.php | 46 ------ 3 files changed, 180 insertions(+), 105 deletions(-) diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 668453a..840410a 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -211,7 +211,7 @@ abstract class MCI_Footnotes_Layout_Engine { * automated update of version number for cache busting. * No need to use '-styles' in the handle, as '-css' is appended automatically. */ - if ( C_BOOL_CSS_PRODUCTION_MODE === true ) { + if ( C_BOOL_CSS_PRODUCTION_MODE ) { wp_register_style( 'mci-footnotes-admin', @@ -232,7 +232,7 @@ abstract class MCI_Footnotes_Layout_Engine { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 2 ) ) . 'css/settings.css' ) ); diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index bfddc98..eb5fa01 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -121,7 +121,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: + * fix: logo is kept only in the label that doesn’t need to be translated: * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 * @see details in class/config.php * @@ -130,16 +130,18 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { protected function get_meta_boxes() { $l_arr_meta_boxes = array(); - // Sync box name with mirror in task.php. + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'amp-compat', __( 'AMP compatibility', 'footnotes' ), 'amp_compat' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'start-end', __( 'Footnote start and end short codes', 'footnotes' ), 'start_end' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'Numbering' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'Scrolling' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'numbering', __( 'Footnotes numbering', 'footnotes' ), 'numbering' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'scrolling', __( 'Scrolling behavior', 'footnotes' ), 'scrolling' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'hard-links', __( 'URL fragment ID configuration', 'footnotes' ), 'hard_links' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'reference-container', __( 'Reference container', 'footnotes' ), 'reference_container' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'excerpts', __( 'Footnotes in excerpts', 'footnotes' ), 'excerpts' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'Love' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'settings', 'love', MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, 'love' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'hyperlink-arrow', __( 'Backlink symbol', 'footnotes' ), 'hyperlink_arrow' ); - $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrer typesetting and formatting', 'footnotes' ), 'superscript' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'superscript', __( 'Referrers', 'footnotes' ), 'superscript' ); + $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'label-solution', __( 'Referrers in labels', 'footnotes' ), 'label_solution' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box', __( 'Tooltips', 'footnotes' ), 'mouseover_box' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-position', __( 'Tooltip position', 'footnotes' ), 'mouseover_box_position' ); $l_arr_meta_boxes[] = $this->add_meta_box( 'customize', 'mouse-over-box-dimensions', __( 'Tooltip dimensions', 'footnotes' ), 'mouseover_box_dimensions' ); @@ -164,6 +166,34 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { return $l_arr_meta_boxes; } + /** + * Displays the AMP compatibility mode option. + * + * @since 2.5.11 (draft) + * @since 2.6.0 (release) + */ + public function amp_compat() { + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-amp' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + // Translators: '%s' is the link text 'AMP-WP' linked to the plugin’s front page on WordPress.org. + 'description-1-amp' => sprintf( __( 'The official %s plugin is required when this option is enabled.', 'footnotes' ), 'AMP-WP' ), + 'label-amp' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ), + 'amp' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ), + 'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % viewport height.', 'footnotes' ), + // Translators: '%s' is the logogram of the 'Footnotes' plugin. + 'description-2-amp' => sprintf( __( '%s is becoming AMP compatible when this box is checked. Styled tooltips are displayed with fade-in/fade-out effect if enabled, and the reference container expands also on clicking a referrer if it’s collapsed by default.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + /** * Displays all settings for the reference container. * @@ -207,7 +237,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ); // Options for the terminating punctuation after backlinks. // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. - // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. $l_arr_terminators = array( 'period' => __( 'FULL STOP', 'footnotes' ), @@ -242,7 +272,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), - 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), + 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), @@ -253,7 +283,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-script' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __( 'Script mode:', 'footnotes' ) ), 'script' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_script_mode ), - 'notice-script' => __( 'The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.', 'footnotes' ), + 'notice-script' => __( 'The plain JavaScript mode will enable hard links with configurable scroll offset.', 'footnotes' ), 'label-position' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __( 'Default position:', 'footnotes' ) ), 'position' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_positions ), @@ -277,11 +307,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), - 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), + 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), - 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), + 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), @@ -313,13 +343,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), - 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), - 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), @@ -327,7 +357,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), - 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), ) ); @@ -393,8 +423,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Replace all placeholders. $l_obj_template->replace( array( - - 'description-escapement' => __( 'WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.', 'footnotes' ), + // Translators: The 2 placeholders are the <ref></ref> and <fn></fn> shortcodes. + 'description-escapement' => sprintf( __( 'The problems with shortcodes with pointy brackets have been solved. We apologize for the longlasting bugs making the %1$s and %2$s shortcodes close to unusable.', 'footnotes' ), '<ref></ref>', '<fn></fn>' ), 'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ), 'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ), @@ -417,7 +447,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), - 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), + 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), ) ); // Display template with replaced placeholders. @@ -441,12 +471,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ); // Options for the numbering style of the footnotes. $l_arr_counter_style = array( - 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', - 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', - 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', - 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', - 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', - 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', + 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', + 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', + 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', + 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', + 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', + 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', ); // Load template file. @@ -478,7 +508,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { */ public function scrolling() { - // Options for enabling hard links for AMP compat. + // Options for enabling scroll duration asymmetricity. $l_arr_enable = array( 'yes' => __( 'Yes', 'footnotes' ), 'no' => __( 'No', 'footnotes' ), @@ -490,18 +520,66 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { $l_obj_template->replace( array( + 'label-scroll-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ), + 'scroll-css' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ), + 'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ), + 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), - 'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ), + 'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ), 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), - 'notice-scroll-duration' => __( 'milliseconds; instantly if hard links are enabled and JavaScript is disabled', 'footnotes' ), + 'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ), + + // Enable scroll duration asymmetricity. + 'label-scroll-asymmetricity' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ), + 'scroll-asymmetricity' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ), + 'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ), + + 'label-scroll-down-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ), + 'scroll-down-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ), + 'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ), + + 'label-scroll-down-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ), + 'scroll-down-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ), + 'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ), + + 'label-scroll-up-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ), + 'scroll-up-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ), + 'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ), + + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } + + /** + * Displays all options for the fragment identifier configuration. + * + * @since 2.2.0 in scrolling(). + * @since 2.5.12 separate metabox. + */ + public function hard_links() { + + // Options for enabling hard links for AMP compat. + $l_arr_enable = array( + 'yes' => __( 'Yes', 'footnotes' ), + 'no' => __( 'No', 'footnotes' ), + ); + + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'settings-hard-links' ); + // Replace all placeholders. + $l_obj_template->replace( + array( - // Enable hard links for AMP compat. 'label-hard-links' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, __( 'Enable hard links:', 'footnotes' ) ), 'hard-links' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_HARD_LINKS_ENABLE, $l_arr_enable ), - 'notice-hard-links' => __( 'Hard links are indispensable for AMP compatibility and allow to link to footnotes.', 'footnotes' ), + 'notice-hard-links' => __( 'Hard links disable jQuery delays but have the same scroll offset, and allow to share footnotes (accessed if the list is not collapsed by default).', 'footnotes' ), 'label-footnote' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG, __( 'Fragment identifier slug for footnotes:', 'footnotes' ) ), 'footnote' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG ), @@ -522,7 +600,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-backlink-tooltip-text' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT, __( 'Backlink tooltip text:', 'footnotes' ) ), 'backlink-tooltip-text' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT ), - 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut, but you may wish to input a descriptive hint in your language.', 'footnotes' ), + 'notice-backlink-tooltip-text' => __( 'Default text is the keyboard shortcut; may be a localized descriptive hint.', 'footnotes' ), ) ); @@ -552,15 +630,15 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'text-5' => sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), // Translators: 2: heart symbol 1: footnotes logogram. 'text-1' => sprintf( __( 'I %2$s %1$s', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), - // Translators: %s: Plugin logo. + // Translators: %s: Footnotes plugin logo. 'text-6' => sprintf( __( 'This website uses %s.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. + // Translators: %s: Footnotes plugin logo. 'text-7' => sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), - // Translators: %s: Plugin logo. + // Translators: %s: Footnotes plugin logo. 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), 'random' => __( 'randomly determined display of either mention', 'footnotes' ), // Translators: 1: Plugin logo.2: heart symbol. - 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), ); // Load template file. @@ -568,10 +646,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Replace all placeholders. $l_obj_template->replace( array( - // Translators: %s: Plugin logo. - 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + // Translators: %s: Footnotes plugin logo. + 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), - // Translators: %s: Plugin logo. + + // Translators: %s: Footnotes plugin logo. 'label-no-love' => $this->add_text( sprintf( __( 'Shortcode to inhibit the display of the %s mention on specific pages:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), 'no-love' => $this->add_text( MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG ), ) @@ -607,9 +686,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { array( 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), - 'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ), - // Translators: %s: link to the Advanced Excerpt Plugin. - 'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), 'Advanced Excerpt' ), + 'notice-excerpts' => __( 'For this setting to be effective, the hook the_excerpt must be enabled under Scope and priority.', 'footnotes' ), + // Translators: %s: link text 'Advanced Excerpt' linked to the plugin’s WordPress.org front page. + // Translators: %s: Footnotes plugin logo. + 'description-excerpts' => sprintf( __( 'Both to display footnotes and to not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to ensure that footnotes are handled and don’t impact the excerpt length.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); // Display template with replaced placeholders. @@ -647,6 +727,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-superscript' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __( 'Display footnote referrers in superscript:', 'footnotes' ) ), 'superscript' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_enabled ), + 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), + 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), + 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), + 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), @@ -654,11 +738,36 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), + ) + ); + // Display template with replaced placeholders. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped + echo $l_obj_template->get_content(); + // phpcs:enable + } - 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), - 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), - 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), + /** + * Displays the setting for the input label issue solution. + * + * @since 2.5.12 + */ + public function label_solution() { + // Options for the input label issue solution. + $l_arr_issue_solutions = array( + 'none' => __( '0. No problem or solved otherwise', 'footnotes' ), + 'move' => __( 'A. Footnotes are moved out and appended after the label’s end (recommended)', 'footnotes' ), + 'disconnect' => __( 'B. Labels with footnotes are disconnected from input element (discouraged)', 'footnotes' ), + ); + // Load template file. + $l_obj_template = new MCI_Footnotes_Template( MCI_Footnotes_Template::C_STR_DASHBOARD, 'configure-label-solution' ); + // Replace all placeholders. + $l_obj_template->replace( + array( + 'description-1-selection' => __( 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A).', 'footnotes' ), + 'label-selection' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, __( 'Solve input label issue:', 'footnotes' ) ), + 'selection' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, $l_arr_issue_solutions ), + 'description-2-selection' => __( 'Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery ‘event.stopPropagation’ failed.)', 'footnotes' ), ) ); // Display template with replaced placeholders. @@ -696,8 +805,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-alternative' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __( 'Display alternative tooltips:', 'footnotes' ) ), 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), - // Translators: %s: Plugin logo. - 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + // Translators: %s: Footnotes plugin logo. + 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); @@ -851,7 +960,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // The feature trims back until the last full word. 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), - 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), + 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), ) @@ -941,12 +1050,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), // Translators: %s: Clear or leave empty. - 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), @@ -955,7 +1064,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), @@ -964,7 +1073,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), ) ); @@ -979,11 +1088,22 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading for v2.0.4 + * - Update: **symbol for backlinks** removed; hyperlink moved to the reference number. * - * The former 'hyperlink arrow', incompatible with combined identical footnotes, - * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics - * of the footnote number. + * @since 2.0.0 + * The former 'hyperlink arrow' is incompatible with combined identical footnotes. + * + * - Update: Reference container: clarify backlink semantics by prepended transitional up arrow, thanks to @mmallett issue report. + * + * @since 2.0.3 + * + * - Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report. + * + * @since 2.0.4 + * @date 2020-11-02T2115+0100 + * + * @reporter @mmallett + * @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037 * * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol * @since 2.2.1 and 2.2.4 back here @@ -1034,7 +1154,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // phpcs:disable Squiz.PHP.CommentedOutCode.Found // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. + // Localized notices are dropped to ease translators’ task. // "label-class-1" => ".footnote_plugin_tooltip_text",. // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. @@ -1222,13 +1342,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { array( 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), 'start' => $l_arr_footnote_starting_tag['value'], - 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), + 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), 'end' => $l_arr_footnote_ending_tag['value'], 'example-code' => $l_str_example, 'example-string' => '
                                                                                                                                                                                                                                                        ' . __( 'will be displayed as:', 'footnotes' ), 'example' => $g_obj_mci_footnotes->a_obj_task->exec( $l_str_example, true ), // Translators: 1: ; 2: . - 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), + 'information' => sprintf( __( 'For further information please check out our %1$ssupport forum%2$s on WordPress.org.', 'footnotes' ), '', '' ), ) ); // Call wp_head function to get the Styling of the mouse-over box. @@ -1259,3 +1379,4 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // phpcs:enable } } + diff --git a/footnotes.php b/footnotes.php index e2a9b75..5917208 100755 --- a/footnotes.php +++ b/footnotes.php @@ -14,52 +14,6 @@ */ /** - * Package Version number for stylesheet cache busting. - * - * Please keep this string in sync with the PACKAGE Version ('Package V.'). - * Please mirror the 'Version' (NOT 'Package V.') in js/wysiwyg-editor.js. - * - * @since 2.1.4 - * @since 2.5.3 (Hungarian) - * @var str - * @lastmodified 2021-04-01T0721+0200 - */ -define( 'C_STR_PACKAGE_VERSION', '2.6.5' ); -/** - * Enables toggling the stylesheet enqueuing mode from production (true) to development (false). - * - * @see Full docblock below next. - */ -define( 'C_BOOL_CSS_PRODUCTION_MODE', true ); - -/** - * Version numbers in WordPress plugin readme.txt and main PHP headers. - * - * - Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header. - * - Adding: Documentation: Readme.txt: informative 'Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag. - * - Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration. - * - * @since 2.5.11 - * @see readme.txt - * @link https://meta.trac.wordpress.org/ticket/5652 - * - * Package Version Actual version string, informative only. - * May identify a development version. - * A 'd' series is suffixed to incremented bugfix version. - * Used for style sheet cache busting. - * - * Version Parsed in the main PHP file header for update configuration. - * Refers to the latest tag. - * Typically the best available version. - * May not be released, due to release frequency concerns. - * - * Stable Tag Parsed in the readme.txt in trunk/ for release configuration. - * May be smaller than Version, avoiding too frequent releases. - * - * WordPress plugin readmes are usually lacking the version number of the package. - * In Footnotes, this has been included after the stable tag had been mistaken for - * the package version, given that state-of-the-art readmes have that information. - * * - Bugfix: Codebase: revert to 2.5.8, thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports. * * @version 2.5.10 (reversion to @version 2.5.8) From 0c75e12a99f018cedc62e3a89f4d553384ad60c4 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 10 Apr 2021 20:35:36 +0100 Subject: [PATCH 126/144] fix: fix call to renamed function --- class/dashboard/subpage-main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index eb5fa01..ba26c16 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -1352,7 +1352,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ) ); // Call wp_head function to get the Styling of the mouse-over box. - $g_obj_mci_footnotes->a_obj_task->wp_head(); + $g_obj_mci_footnotes->a_obj_task->footnotes_output_head(); // Display template with replaced placeholders. // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped echo $l_obj_template->get_content(); From 705901d9e01c0df1b153878fc943f9937726f638 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sat, 10 Apr 2021 21:00:39 +0100 Subject: [PATCH 127/144] update composer lockfile --- composer.lock | 4931 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4923 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 9e0ee7c..b1a01a4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,82 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a147d50695956de52f7cbf827b47830", + "content-hash": "96b80176526406b01227fcaef2a4c2fc", "packages": [], "packages-dev": [ + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-11T10:22:58+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.1", @@ -78,17 +151,2130 @@ "time": "2020-12-07T18:04:37+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "3.5.8", + "name": "doctrine/event-manager", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", - "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, + { + "name": "friendsofphp/proxy-manager-lts", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "shasum": "" + }, + "require": { + "laminas/laminas-code": "~3.4.1|^4.0", + "php": ">=7.1", + "symfony/filesystem": "^4.4.17|^5.0" + }, + "conflict": { + "laminas/laminas-stdlib": "<3.2.1", + "zendframework/zend-stdlib": "<3.2.1" + }, + "replace": { + "ocramius/proxy-manager": "^2.1" + }, + "require-dev": { + "ext-phar": "*", + "symfony/phpunit-bridge": "^5.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "ocramius/proxy-manager", + "url": "https://github.com/Ocramius/ProxyManager" + } + }, + "autoload": { + "psr-4": { + "ProxyManager\\": "src/ProxyManager" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.io/" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", + "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", + "keywords": [ + "aop", + "lazy loading", + "proxy", + "proxy pattern", + "service proxies" + ], + "support": { + "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.3" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", + "type": "tidelift" + } + ], + "time": "2021-01-14T21:52:44+00:00" + }, + { + "name": "jawira/plantuml", + "version": "v1.54.0", + "source": { + "type": "git", + "url": "https://github.com/jawira/plantuml.git", + "reference": "d313d5373618fef6a6c09eeae9676538c38da6a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jawira/plantuml/zipball/d313d5373618fef6a6c09eeae9676538c38da6a9", + "reference": "d313d5373618fef6a6c09eeae9676538c38da6a9", + "shasum": "" + }, + "suggest": { + "pds/skeleton": "Standard PHP package skeleton", + "phing/phing": "PHP Build Tool" + }, + "bin": [ + "bin/plantuml" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "Jawira Portugal" + } + ], + "description": "Provides PlantUML integration: plantuml executable and plantuml.jar", + "keywords": [ + "diagram", + "plantuml", + "plantuml.jar", + "uml" + ], + "support": { + "issues": "https://github.com/jawira/plantuml/issues", + "source": "https://github.com/jawira/plantuml/tree/v1.54.0" + }, + "time": "2021-04-09T13:05:56+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", + "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8.0", + "php": "^7.0|^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^8.5|^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + }, + "time": "2021-02-04T16:20:16+00:00" + }, + { + "name": "laminas/laminas-code", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-code.git", + "reference": "5b553c274b94af3f880cbaaf8fbab047f279a31c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/5b553c274b94af3f880cbaaf8fbab047f279a31c", + "reference": "5b553c274b94af3f880cbaaf8fbab047f279a31c", + "shasum": "" + }, + "require": { + "laminas/laminas-eventmanager": "^3.3", + "php": "^7.4 || ~8.0.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "replace": { + "zendframework/zend-code": "self.version" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "ext-phar": "*", + "laminas/laminas-coding-standard": "^2.1.4", + "laminas/laminas-stdlib": "^3.3.0", + "phpunit/phpunit": "^9.4.2", + "psalm/plugin-phpunit": "^0.14.0", + "vimeo/psalm": "^4.3.1" + }, + "suggest": { + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", + "laminas/laminas-stdlib": "Laminas\\Stdlib component", + "laminas/laminas-zendframework-bridge": "A bridge with Zend Framework" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Code\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", + "homepage": "https://laminas.dev", + "keywords": [ + "code", + "laminas", + "laminasframework" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-code/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-code/issues", + "rss": "https://github.com/laminas/laminas-code/releases.atom", + "source": "https://github.com/laminas/laminas-code" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-03-27T13:55:31+00:00" + }, + { + "name": "laminas/laminas-eventmanager", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-eventmanager.git", + "reference": "966c859b67867b179fde1eff0cd38df51472ce4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/966c859b67867b179fde1eff0cd38df51472ce4a", + "reference": "966c859b67867b179fde1eff0cd38df51472ce4a", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ^8.0" + }, + "replace": { + "zendframework/zend-eventmanager": "^3.2.1" + }, + "require-dev": { + "container-interop/container-interop": "^1.1", + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0", + "phpbench/phpbench": "^0.17.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "container-interop/container-interop": "^1.1, to use the lazy listeners feature", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://laminas.dev", + "keywords": [ + "event", + "eventmanager", + "events", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-eventmanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-eventmanager/issues", + "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", + "source": "https://github.com/laminas/laminas-eventmanager" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-03-08T15:24:29+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-02-25T21:54:58+00:00" + }, + { + "name": "league/commonmark", + "version": "1.5.8", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", + "reference": "08fa59b8e4e34ea8a773d55139ae9ac0e0aecbaf", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.2", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "support": { + "docs": "https://commonmark.thephpleague.com/", + "issues": "https://github.com/thephpleague/commonmark/issues", + "rss": "https://github.com/thephpleague/commonmark/releases.atom", + "source": "https://github.com/thephpleague/commonmark" + }, + "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" + }, + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", + "type": "tidelift" + } + ], + "time": "2021-03-28T18:51:39+00:00" + }, + { + "name": "league/flysystem", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.x" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2020-08-23T07:39:11+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2021-01-18T20:58:21+00:00" + }, + { + "name": "league/pipeline", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/pipeline.git", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/pipeline/zipball/aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "leanphp/phpspec-code-coverage": "^4.2", + "phpspec/phpspec": "^4.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net", + "role": "Author" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "role": "Maintainer" + } + ], + "description": "A plug and play pipeline implementation.", + "keywords": [ + "composition", + "design pattern", + "pattern", + "pipeline", + "sequential" + ], + "support": { + "issues": "https://github.com/thephpleague/pipeline/issues", + "source": "https://github.com/thephpleague/pipeline/tree/master" + }, + "time": "2018-06-05T21:06:51+00:00" + }, + { + "name": "league/tactician", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician.git", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician/zipball/e79f763170f3d5922ec29e85cffca0bac5cd8975", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^9.3.8", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck", + "homepage": "http://tactician.thephpleague.com" + } + ], + "description": "A small, flexible command bus. Handy for building service layers.", + "keywords": [ + "command", + "command bus", + "service layer" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician/issues", + "source": "https://github.com/thephpleague/tactician/tree/v1.1.0" + }, + "time": "2021-02-14T15:29:04+00:00" + }, + { + "name": "league/tactician-bundle", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-bundle.git", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-bundle/zipball/89c51277423ac485b62580c38322426c3ec6ad47", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "league/tactician-container": "^2.0", + "league/tactician-logger": "^0.10.0", + "php": ">=7.2", + "symfony/config": "^3.4|^4.4|^5.0", + "symfony/dependency-injection": "^3.4|^4.4|^5.0", + "symfony/http-kernel": "^3.4|^4.4|^5.0", + "symfony/yaml": "^3.4|^4.4|^5.0" + }, + "require-dev": { + "matthiasnoback/symfony-config-test": "^4.2.1", + "matthiasnoback/symfony-dependency-injection-test": "^4.2.1", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~8.5", + "symfony/console": "^3.4|^4.4|^5.0", + "symfony/framework-bundle": "^3.4.31|^4.4|^5.0", + "symfony/security-bundle": "^3.4|^4.4|^5.0", + "symfony/security-core": "^3.4|^4.4|^5.0", + "symfony/validator": "^3.4|^4.4|^5.0" + }, + "suggest": { + "league/tactician-doctrine": "For doctrine transaction middleware", + "symfony/console": "For debugging command-to-handler routing using the tactician:debug console command", + "symfony/security": "For command security middleware", + "symfony/validator": "For command validator middleware" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\Bundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rafael Dohms", + "homepage": "http://doh.ms" + }, + { + "name": "Richard Tuin", + "homepage": "http://www.rtuin.nl/" + }, + { + "name": "Xander Smalbil", + "email": "xander@videofunk.nl" + }, + { + "name": "Ross Tuck", + "email": "me@rosstuck.com" + } + ], + "description": "Bundle to integrate Tactician with Symfony projects", + "keywords": [ + "bundle", + "symfony", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-bundle/issues", + "source": "https://github.com/thephpleague/tactician-bundle/tree/v1.3.0" + }, + "time": "2021-01-31T17:06:29+00:00" + }, + { + "name": "league/tactician-container", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-container.git", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-container/zipball/d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5", + "psr/container": "^1.0" + }, + "require-dev": { + "league/container": "~2.3", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nigel Greenway", + "homepage": "http://futurepixels.co.uk" + } + ], + "description": "Tactician integration for any container implementing PSR-11", + "keywords": [ + "container", + "container-interop", + "di", + "interoperable", + "league", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-container/issues", + "source": "https://github.com/thephpleague/tactician-container/tree/master" + }, + "time": "2017-04-13T06:27:12+00:00" + }, + { + "name": "league/tactician-logger", + "version": "v0.10.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-logger.git", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-logger/zipball/3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5.0", + "psr/log": "~1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9", + "phpunit/phpunit": "4.*", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Logger\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck" + } + ], + "description": "Adds PSR-3 logging support to the Tactician command bus", + "homepage": "https://github.com/thephpleague/tactician-logger", + "keywords": [ + "log", + "logging", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-logger/issues", + "source": "https://github.com/thephpleague/tactician-logger/tree/master" + }, + "time": "2016-08-23T05:50:38+00:00" + }, + { + "name": "league/uri", + "version": "6.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "09da64118eaf4c5d52f9923a1e6a5be1da52fd9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/09da64118eaf4c5d52f9923a1e6a5be1da52fd9a", + "reference": "09da64118eaf4c5d52f9923a1e6a5be1da52fd9a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.1", + "php": ">=7.2", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^8.0 || ^9.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "http://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.4.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2020-11-22T14:29:11+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "667f150e589d65d79c89ffe662e426704f84224f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/667f150e589d65d79c89ffe662e426704f84224f", + "reference": "667f150e589d65d79c89ffe662e426704f84224f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2020-10-31T13:45:51+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7", + "graylog2/gelf-php": "^1.4.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpspec/prophecy": "^1.6.1", + "phpstan/phpstan": "^0.12.59", + "phpunit/phpunit": "^8.5", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3", + "ruflin/elastica": ">=0.90 <7.0.1", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-12-14T13:15:25+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.4", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" + }, + { + "name": "phpdocumentor/flyfinder", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/FlyFinder.git", + "reference": "0443e747872cc4a4d8f4b830d16a0357c14df7a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/FlyFinder/zipball/0443e747872cc4a4d8f4b830d16a0357c14df7a6", + "reference": "0443e747872cc4a4d8f4b830d16a0357c14df7a6", + "shasum": "" + }, + "require": { + "league/flysystem": "^1.0", + "php": "^7.2" + }, + "require-dev": { + "league/flysystem-memory": "~1", + "mockery/mockery": "^1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Flyfinder\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Flysystem plugin to add file finding capabilities to the Filesystem entity", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "Flysystem", + "phpdoc" + ], + "support": { + "issues": "https://github.com/phpDocumentor/FlyFinder/issues", + "source": "https://github.com/phpDocumentor/FlyFinder/tree/1.0.0" + }, + "time": "2020-03-13T14:02:28+00:00" + }, + { + "name": "phpdocumentor/graphviz", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/GraphViz.git", + "reference": "929e97b4ab6765fc4eb2f944b091a4a02807ee5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/929e97b4ab6765fc4eb2f944b091a4a02807ee5d", + "reference": "929e97b4ab6765fc4eb2f944b091a4a02807ee5d", + "shasum": "" + }, + "require": { + "php": "^7.2 || 8.0.*" + }, + "require-dev": { + "ext-simplexml": "*", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.2 || ^9.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\GraphViz\\": "src/phpDocumentor/GraphViz", + "phpDocumentor\\GraphViz\\PHPStan\\": "./src/phpDocumentor/PHPStan" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "description": "Wrapper for Graphviz", + "support": { + "issues": "https://github.com/phpDocumentor/GraphViz/issues", + "source": "https://github.com/phpDocumentor/GraphViz/tree/2.0.0" + }, + "time": "2021-02-02T20:48:43+00:00" + }, + { + "name": "phpdocumentor/phpdocumentor", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/phpDocumentor.git", + "reference": "405da431bdc7ca02512cb6aa15f4ed43ffca8175" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor/zipball/405da431bdc7ca02512cb6aa15f4ed43ffca8175", + "reference": "405da431bdc7ca02512cb6aa15f4ed43ffca8175", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1.1", + "ext-ctype": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "jawira/plantuml": "^1.27", + "jean85/pretty-package-versions": "^1.2", + "league/commonmark": "^1.5", + "league/flysystem": "^1.0", + "league/pipeline": "^1.0", + "league/tactician": "^1.0", + "league/tactician-bundle": "^1.2", + "league/uri": "^6.0", + "league/uri-interfaces": "^2.0", + "php": ">=7.2.5", + "phpdocumentor/flyfinder": "^1.0", + "phpdocumentor/graphviz": "^2.0@dev", + "phpdocumentor/reflection": "^4.0", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/reflection-docblock": "^5.0", + "phpdocumentor/type-resolver": "^1.0", + "psr/cache": "^1.0", + "psr/log": "^1.1", + "scrivo/highlight.php": "^9.17", + "symfony/cache": "^5.0", + "symfony/config": "^5.0", + "symfony/console": "^5.0", + "symfony/contracts": "^2.0", + "symfony/dependency-injection": "^5.0", + "symfony/dom-crawler": "5.1.*", + "symfony/dotenv": "^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/expression-language": "^5.0", + "symfony/filesystem": "^5.0", + "symfony/finder": "5.1.*", + "symfony/flex": "^1.3.1", + "symfony/framework-bundle": "^5.0", + "symfony/http-foundation": "^5.0.7", + "symfony/http-kernel": "^5.0.8", + "symfony/monolog-bundle": "^3.0", + "symfony/process": "5.1.*", + "symfony/proxy-manager-bridge": "^5.0", + "symfony/routing": "^5.0", + "symfony/stopwatch": "^5.0", + "symfony/string": "5.1.*", + "symfony/yaml": "^5.0", + "twig/twig": "~2.0", + "webmozart/assert": "^1.3" + }, + "conflict": { + "symfony/symfony": "*" + }, + "replace": { + "paragonie/random_compat": "2.*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php56": "*", + "symfony/polyfill-php70": "*", + "symfony/polyfill-php71": "*", + "symfony/polyfill-php72": "*" + }, + "require-dev": { + "fzaninotto/faker": "^1.9", + "mikey179/vfsstream": "^1.2", + "mockery/mockery": "^1.0" + }, + "bin": [ + "bin/phpdoc.php", + "bin/phpdoc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "symfony": { + "id": "01C32VS9393M1CP9R8TEJMH62G", + "allow-contrib": false, + "require": "^5.0" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Guides\\": "src/Guides/", + "phpDocumentor\\": [ + "src/phpDocumentor/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Documentation Generator for PHP", + "homepage": "https://www.phpdoc.org", + "keywords": [ + "api", + "application", + "dga", + "documentation", + "phpdoc" + ], + "support": { + "issues": "https://github.com/phpDocumentor/phpDocumentor/issues", + "source": "https://github.com/phpDocumentor/phpDocumentor/tree/v3.0.0" + }, + "time": "2020-10-27T20:24:27+00:00" + }, + { + "name": "phpdocumentor/reflection", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Reflection.git", + "reference": "447928a45710d6313e68774cf12b5f730b909baa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/447928a45710d6313e68774cf12b5f730b909baa", + "reference": "447928a45710d6313e68774cf12b5f730b909baa", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.0", + "php": ">=7.2", + "phpdocumentor/reflection-common": "^2.0", + "phpdocumentor/reflection-docblock": "^5", + "phpdocumentor/type-resolver": "^1.0", + "psr/log": "~1.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.2", + "mockery/mockery": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-4.x": "4.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\": "src/phpDocumentor" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Reflection library to do Static Analysis for PHP Projects", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/Reflection/issues", + "source": "https://github.com/phpDocumentor/Reflection/tree/4.x" + }, + "time": "2020-06-19T18:26:14+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, + "time": "2020-03-23T09:12:05+00:00" + }, + { + "name": "scrivo/highlight.php", + "version": "v9.18.1.6", + "source": { + "type": "git", + "url": "https://github.com/scrivo/highlight.php.git", + "reference": "44a3d4136edb5ad8551590bf90f437db80b2d466" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/44a3d4136edb5ad8551590bf90f437db80b2d466", + "reference": "44a3d4136edb5ad8551590bf90f437db80b2d466", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.7", + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" + }, + "type": "library", + "autoload": { + "psr-0": { + "Highlight\\": "", + "HighlightUtilities\\": "" + }, + "files": [ + "HighlightUtilities/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Geert Bergman", + "homepage": "http://www.scrivo.org/", + "role": "Project Author" + }, + { + "name": "Vladimir Jimenez", + "homepage": "https://allejo.io", + "role": "Maintainer" + }, + { + "name": "Martin Folkers", + "homepage": "https://twobrain.io", + "role": "Contributor" + } + ], + "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", + "keywords": [ + "code", + "highlight", + "highlight.js", + "highlight.php", + "syntax" + ], + "support": { + "issues": "https://github.com/scrivo/highlight.php/issues", + "source": "https://github.com/scrivo/highlight.php" + }, + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2020-12-22T19:20:29+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", "shasum": "" }, "require": { @@ -131,7 +2317,2736 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2020-10-23T02:01:07+00:00" + "time": "2021-04-09T00:54:41+00:00" + }, + { + "name": "symfony/cache", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "093d69bb10c959553c8beb828b8d4ea250a247dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/093d69bb10c959553c8beb828b8d4ea250a247dd", + "reference": "093d69bb10c959553c8beb828b8d4ea250a247dd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/cache": "^1.0|^2.0", + "psr/log": "^1.1", + "symfony/cache-contracts": "^1.1.7|^2", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "conflict": { + "doctrine/dbal": "<2.10", + "symfony/dependency-injection": "<4.4", + "symfony/http-kernel": "<4.4", + "symfony/var-dumper": "<4.4" + }, + "provide": { + "psr/cache-implementation": "1.0|2.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0|2.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "^1.6", + "doctrine/dbal": "^2.10|^3.0", + "predis/predis": "^1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/filesystem": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an extended PSR-6, PSR-16 (and tags) implementation", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-16T09:10:13+00:00" + }, + { + "name": "symfony/config", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "212d54675bf203ff8aef7d8cee8eecfb72f4a263" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/212d54675bf203ff8aef7d8cee8eecfb72f4a263", + "reference": "212d54675bf203ff8aef7d8cee8eecfb72f4a263", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/finder": "<4.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/messenger": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-23T23:58:19+00:00" + }, + { + "name": "symfony/console", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/35f039df40a3b335ebf310f244cb242b3a83ac8d", + "reference": "35f039df40a3b335ebf310f244cb242b3a83ac8d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-28T09:42:18+00:00" + }, + { + "name": "symfony/contracts", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "f7783bdec14b06c323d30a5f74ba70a17ec0ce81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/f7783bdec14b06c323d30a5f74ba70a17ec0ce81", + "reference": "f7783bdec14b06c323d30a5f74ba70a17ec0ce81", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/cache": "^1.0", + "psr/container": "^1.0", + "psr/event-dispatcher": "^1.0" + }, + "replace": { + "symfony/cache-contracts": "self.version", + "symfony/deprecation-contracts": "self.version", + "symfony/event-dispatcher-contracts": "self.version", + "symfony/http-client-contracts": "self.version", + "symfony/service-contracts": "self.version", + "symfony/translation-contracts": "self.version" + }, + "require-dev": { + "symfony/polyfill-intl-idn": "^1.10" + }, + "suggest": { + "symfony/cache-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-implementation": "", + "symfony/service-implementation": "", + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-version": "2.3", + "branch-alias": { + "dev-main": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "files": [ + "Deprecation/function.php" + ], + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/contracts/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-14T17:08:19+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "1e66194bed2a69fa395d26bf1067e5e34483afac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1e66194bed2a69fa395d26bf1067e5e34483afac", + "reference": "1e66194bed2a69fa395d26bf1067e5e34483afac", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1.6|^2" + }, + "conflict": { + "symfony/config": "<5.1", + "symfony/finder": "<4.4", + "symfony/proxy-manager-bridge": "<4.4", + "symfony/yaml": "<4.4" + }, + "provide": { + "psr/container-implementation": "1.0", + "symfony/service-implementation": "1.0|2.0" + }, + "require-dev": { + "symfony/config": "^5.1", + "symfony/expression-language": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-22T11:10:24+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "5d89ceb53ec65e1973a555072fac8ed5ecad3384" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5d89ceb53ec65e1973a555072fac8ed5ecad3384", + "reference": "5d89ceb53ec65e1973a555072fac8ed5ecad3384", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "masterminds/html5": "<2.6" + }, + "require-dev": { + "masterminds/html5": "^2.6", + "symfony/css-selector": "^4.4|^5.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/783f12027c6b40ab0e93d6136d9f642d1d67cd6b", + "reference": "783f12027c6b40ab0e93d6136d9f642d1d67cd6b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1" + }, + "require-dev": { + "symfony/process": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "source": "https://github.com/symfony/dotenv/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "bdb7fb4188da7f4211e4b88350ba0dfdad002b03" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/bdb7fb4188da7f4211e4b88350ba0dfdad002b03", + "reference": "bdb7fb4188da7f4211e4b88350ba0dfdad002b03", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "^1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/var-dumper": "^4.4|^5.0" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.1", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-16T09:07:47+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "d08d6ec121a425897951900ab692b612a61d6240" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d08d6ec121a425897951900ab692b612a61d6240", + "reference": "d08d6ec121a425897951900ab692b612a61d6240", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-18T17:12:37+00:00" + }, + { + "name": "symfony/expression-language", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/expression-language.git", + "reference": "3fc560e62bc5121751b792b11505db03a12cf83c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/3fc560e62bc5121751b792b11505db03a12cf83c", + "reference": "3fc560e62bc5121751b792b11505db03a12cf83c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/cache": "^4.4|^5.0", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ExpressionLanguage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an engine that can compile and evaluate expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/expression-language/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-12T10:38:38+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "8c86a82f51658188119e62cff0a050a12d09836f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/8c86a82f51658188119e62cff0a050a12d09836f", + "reference": "8c86a82f51658188119e62cff0a050a12d09836f", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-28T14:30:26+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e", + "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/flex", + "version": "v1.12.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "e472606b4b3173564f0edbca8f5d32b52fc4f2c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/e472606b4b3173564f0edbca8f5d32b52fc4f2c9", + "reference": "e472606b4b3173564f0edbca8f5d32b52fc4f2c9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=7.1" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "symfony/dotenv": "^4.4|^5.0", + "symfony/filesystem": "^4.4|^5.0", + "symfony/phpunit-bridge": "^4.4|^5.0", + "symfony/process": "^3.4|^4.4|^5.0" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-main": "1.12-dev" + }, + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v1.12.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-16T14:05:05+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "8889da18c6faa76c6149a90e6542be4afe723f2f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/8889da18c6faa76c6149a90e6542be4afe723f2f", + "reference": "8889da18c6faa76c6149a90e6542be4afe723f2f", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "php": ">=7.2.5", + "symfony/cache": "^5.2", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^5.2", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4.1|^5.0.1", + "symfony/event-dispatcher": "^5.1", + "symfony/filesystem": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/http-foundation": "^5.2.1", + "symfony/http-kernel": "^5.2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15", + "symfony/routing": "^5.2" + }, + "conflict": { + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "phpunit/phpunit": "<5.4.3", + "symfony/asset": "<5.1", + "symfony/browser-kit": "<4.4", + "symfony/console": "<5.2.5", + "symfony/dom-crawler": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/form": "<5.2", + "symfony/http-client": "<4.4", + "symfony/lock": "<4.4", + "symfony/mailer": "<5.2", + "symfony/messenger": "<4.4", + "symfony/mime": "<4.4", + "symfony/property-access": "<5.2", + "symfony/property-info": "<4.4", + "symfony/serializer": "<5.2", + "symfony/stopwatch": "<4.4", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<4.4", + "symfony/twig-bundle": "<4.4", + "symfony/validator": "<5.2", + "symfony/web-profiler-bundle": "<4.4", + "symfony/workflow": "<5.2" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "doctrine/cache": "~1.0", + "doctrine/persistence": "^1.3|^2.0", + "paragonie/sodium_compat": "^1.8", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.1", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/console": "^5.2", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/dotenv": "^5.1", + "symfony/expression-language": "^4.4|^5.0", + "symfony/form": "^5.2", + "symfony/http-client": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/mailer": "^5.2", + "symfony/messenger": "^5.2", + "symfony/mime": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^4.4|^5.0", + "symfony/property-info": "^4.4|^5.0", + "symfony/security-bundle": "^5.1", + "symfony/security-core": "^4.4|^5.2", + "symfony/security-csrf": "^4.4|^5.0", + "symfony/security-http": "^4.4|^5.0", + "symfony/serializer": "^5.2", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/string": "^5.0", + "symfony/translation": "^5.0", + "symfony/twig-bundle": "^4.4|^5.0", + "symfony/validator": "^5.2", + "symfony/web-link": "^4.4|^5.0", + "symfony/workflow": "^5.2", + "symfony/yaml": "^4.4|^5.0", + "twig/twig": "^2.10|^3.0" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-22T14:43:01+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/54499baea7f7418bce7b5ec92770fd0799e8e9bf", + "reference": "54499baea7f7418bce7b5ec92770fd0799e8e9bf", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-25T17:16:57+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "f34de4c61ca46df73857f7f36b9a3805bdd7e3b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f34de4c61ca46df73857f7f36b9a3805bdd7e3b2", + "reference": "f34de4c61ca46df73857f7f36b9a3805bdd7e3b2", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/log": "~1.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/error-handler": "^4.4|^5.0", + "symfony/event-dispatcher": "^5.0", + "symfony/http-client-contracts": "^1.1|^2", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/browser-kit": "<4.4", + "symfony/cache": "<5.0", + "symfony/config": "<5.0", + "symfony/console": "<4.4", + "symfony/dependency-injection": "<5.1.8", + "symfony/doctrine-bridge": "<5.0", + "symfony/form": "<5.0", + "symfony/http-client": "<5.0", + "symfony/mailer": "<5.0", + "symfony/messenger": "<5.0", + "symfony/translation": "<5.0", + "symfony/twig-bridge": "<5.0", + "symfony/validator": "<5.0", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/config": "^5.0", + "symfony/console": "^4.4|^5.0", + "symfony/css-selector": "^4.4|^5.0", + "symfony/dependency-injection": "^5.1.8", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/routing": "^4.4|^5.0", + "symfony/stopwatch": "^4.4|^5.0", + "symfony/translation": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-29T05:16:58+00:00" + }, + { + "name": "symfony/monolog-bridge", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "8a330ab86c4bdf3983b26abf64bf85574edf0d52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/8a330ab86c4bdf3983b26abf64bf85574edf0d52", + "reference": "8a330ab86c4bdf3983b26abf64bf85574edf0d52", + "shasum": "" + }, + "require": { + "monolog/monolog": "^1.25.1|^2", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/http-kernel": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2" + }, + "conflict": { + "symfony/console": "<4.4", + "symfony/http-foundation": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/mailer": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0", + "symfony/security-core": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.", + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", + "symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler." + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Monolog\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Monolog with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/monolog-bridge/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/4054b2e940a25195ae15f0a49ab0c51718922eb4", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.22 || ~2.0", + "php": ">=7.1.3", + "symfony/config": "~4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/http-kernel": "~4.4 || ^5.0", + "symfony/monolog-bridge": "~4.4 || ^5.0" + }, + "require-dev": { + "symfony/console": "~4.4 || ^5.0", + "symfony/phpunit-bridge": "^5.1", + "symfony/yaml": "~4.4 || ^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony MonologBundle", + "homepage": "https://symfony.com", + "keywords": [ + "log", + "logging" + ], + "support": { + "issues": "https://github.com/symfony/monolog-bundle/issues", + "source": "https://github.com/symfony/monolog-bundle/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-31T07:20:47+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5601e09b69f26c1828b13b6bb87cb07cddba3170", + "reference": "5601e09b69f26c1828b13b6bb87cb07cddba3170", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/43a0283138253ed1d48d352ab6d0bdb3f809f248", + "reference": "43a0283138253ed1d48d352ab6d0bdb3f809f248", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/process", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "d279ae7f2d6e0e4e45f66de7d76006246ae00e4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/d279ae7f2d6e0e4e45f66de7d76006246ae00e4d", + "reference": "d279ae7f2d6e0e4e45f66de7d76006246ae00e4d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/proxy-manager-bridge", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/proxy-manager-bridge.git", + "reference": "fd6bb40190b1719abbe831be09adf38e0744d5f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/fd6bb40190b1719abbe831be09adf38e0744d5f5", + "reference": "fd6bb40190b1719abbe831be09adf38e0744d5f5", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8", + "friendsofphp/proxy-manager-lts": "^1.0.2", + "php": ">=7.2.5", + "symfony/dependency-injection": "^5.0" + }, + "require-dev": { + "symfony/config": "^4.4|^5.0" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\ProxyManager\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for ProxyManager with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/proxy-manager-bridge/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/routing", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "31fba555f178afd04d54fd26953501b2c3f0c6e6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/31fba555f178afd04d54fd26953501b2c3f0c6e6", + "reference": "31fba555f178afd04d54fd26953501b2c3f0c6e6", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/config": "<5.0", + "symfony/dependency-injection": "<4.4", + "symfony/yaml": "<4.4" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4", + "psr/log": "~1.0", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-14T13:53:33+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b12274acfab9d9850c52583d136a24398cdf1a0c", + "reference": "b12274acfab9d9850c52583d136a24398cdf1a0c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:15:41+00:00" + }, + { + "name": "symfony/string", + "version": "v5.1.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "83bbb92d34881744b8021452a76532b28283dbfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/83bbb92d34881744b8021452a76532b28283dbfb", + "reference": "83bbb92d34881744b8021452a76532b28283dbfb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.1.11" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-25T14:41:58+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "89412a68ea2e675b4e44f260a5666729f77f668e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/89412a68ea2e675b4e44f260a5666729f77f668e", + "reference": "89412a68ea2e675b4e44f260a5666729f77f668e", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<4.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v5.2.6" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-28T09:42:18+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v5.2.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "5aed4875ab514c8cb9b6ff4772baa25fa4c10307" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/5aed4875ab514c8cb9b6ff4772baa25fa4c10307", + "reference": "5aed4875ab514c8cb9b6ff4772baa25fa4c10307", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "require-dev": { + "symfony/var-dumper": "^4.4.9|^5.0.9" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v5.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-27T10:01:46+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "298a08ddda623485208506fcee08817807a251dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/298a08ddda623485208506fcee08817807a251dd", + "reference": "298a08ddda623485208506fcee08817807a251dd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<4.4" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-06T07:59:01+00:00" + }, + { + "name": "twig/twig", + "version": "v2.14.4", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "0b4ba691fb99ec7952d25deb36c0a83061b93bbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/0b4ba691fb99ec7952d25deb36c0a83061b93bbf", + "reference": "0b4ba691fb99ec7952d25deb36c0a83061b93bbf", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.14-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v2.14.4" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2021-03-10T10:05:55+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" }, { "name": "wp-coding-standards/wpcs", From 50115fb6c9d4a871aefdfce3a2a62479fcf63a38 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Mon, 12 Apr 2021 21:10:23 +0100 Subject: [PATCH 128/144] fix: fix bug that caused footnotes to not be processed (#75) --- class/task.php | 9 ++++++--- readme.txt | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/class/task.php b/class/task.php index e61b155..d895f27 100644 --- a/class/task.php +++ b/class/task.php @@ -2161,7 +2161,6 @@ class MCI_Footnotes_Task { * - Bugfix: Fixed occasional bug where footnote ordering could be out of sequence * * @since 1.6.4 - * @date 2016-06-29T0054+0000 * @committer @dartiss * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1445718 @dartiss’ class/task.php * @link https://plugins.trac.wordpress.org/log/footnotes/trunk/class/task.php?rev=1445718 @dartiss re-added class/task.php @@ -2169,7 +2168,6 @@ class MCI_Footnotes_Task { * @link https://plugins.trac.wordpress.org/changeset/1445711/footnotes/trunk/class @dartiss deleted class/task.php * @link https://plugins.trac.wordpress.org/browser/footnotes/trunk/class/task.php?rev=1026210 @aricura’s latest class/task.php * - * * - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. * * @reporter @rumperuu @@ -2185,9 +2183,14 @@ class MCI_Footnotes_Task { * A bug disturbing the order of the footnotes depending on the text before the first * footnote, the length of the first footnote and the length of the templates for the * footnote and the tooltip. Moreover, it was causing non-trivial process garbage. + * + * @since 2.6.6 + * Fix bug that caused some footnotes to not be processed. + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/problem-since-footnotes-2-5-14/ */ // Add offset to the new starting position. - $l_int_pos_start += $l_int_length + strlen( self::$a_str_end_tag ); + $l_int_pos_start += strlen( $l_str_footnote_replace_text ); } while ( true ); diff --git a/readme.txt b/readme.txt index a34ed60..4a9b795 100644 --- a/readme.txt +++ b/readme.txt @@ -77,6 +77,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.6.6 = +- Bugfix: Process: fix issue that caused some footnotes to not be processed, thanks to @docteurfitness bug report. + = 2.6.5 = - Bugfix: Editor buttons: debug button by reverting name change in PHP file while JS file and HTML template remained unsynced, thanks to @gova bug report. - Bugfix: Hooks: default-disable the_excerpt hook with respect to theme-specific excerpt handling, thanks to @mmallett bug reports. From 5fa3e1403e577a69a1fd8c05c27dcc48710760b1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Mon, 12 Apr 2021 21:14:13 +0100 Subject: [PATCH 129/144] chore: add php-commitizen (#76) Adds PHP Commitizen for automated commit message formatting. fix #39 --- .distignore | 1 + .php-commitizen.php | 30 ++++++++++ CONTRIBUTING.md | 26 +++++---- composer.json | 5 +- composer.lock | 130 +++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 180 insertions(+), 12 deletions(-) create mode 100644 .php-commitizen.php diff --git a/.distignore b/.distignore index 30128dd..46ab074 100644 --- a/.distignore +++ b/.distignore @@ -29,3 +29,4 @@ node_modules *.zip authors.txt composer.* +.php-commitizen.php diff --git a/.php-commitizen.php b/.php-commitizen.php new file mode 100644 index 0000000..70ae02f --- /dev/null +++ b/.php-commitizen.php @@ -0,0 +1,30 @@ + [ + 'lengthMin' => 1, // Min length of the type + 'lengthMax' => 8, // Max length of the type + 'acceptExtra' => false, // Allow adding types not listed in 'values' key + 'values' => ['feat', 'fix', 'refactor', 'style', 'docs', 'chore', 'test', 'perf', 'build', 'ci'], // All the values usable as type + ], + 'scope' => [ + 'lengthMin' => 0, // Min length of the scope + 'lengthMax' => 10, // Max length of the scope + 'acceptExtra' => true, // Allow adding scopes not listed in 'values' key + 'values' => [], // All the values usable as scope + ], + 'description' => [ + 'lengthMin' => 1, // Min length of the description + 'lengthMax' => 44, // Max length of the description + ], + 'subject' => [ + 'lengthMin' => 1, // Min length of the subject + 'lengthMax' => 50, // Max length of the subject + ], + 'body' => [ + 'wrap' => 72, // Wrap the body at 72 characters + ], + 'footer' => [ + 'wrap' => 72, // Wrap the footer at 72 characters + ], +]; diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83e6a64..b08e8d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,33 +5,39 @@ request the best chance of being accepted: # Requesting Features/Reporting Bugs -- To request a new feature or to report a bug, create an - [Issue](https://github.com/markcheret/footnotes/issues/new/choose) and choose - the correct template +- To request a new feature or to report a bug, create an [Issue][new-issue] and + choose the correct template # Contributing Code -- **footnotes** uses [GitHub Flow](https://githubflow.github.io/) +- **footnotes** uses [GitHub Flow][github-flow] - branch off of `main` to start developing (`git checkout -b `) - ensure that your new branch has a descriptive name - create a remote copy of your new branch (`git push`) -- create a draft [pull request](https://github.com/markcheret/footnotes/compare) - to merge your branch with `main` — tag any related Issues, and if they are - assigned to a Project board, this will automatically move them into the - ‘In Progress’ bucket +- create a draft [pull request][pull-request] to merge your branch with `main` — + tag any related Issues, and if they are assigned to a Project board, this will + automatically move them into the ‘In Progress’ bucket - when you think you're finished, un-draft your pull request — if the PR is assigned to a Project board, this will automatically move it and any related Issues into the ‘Review in progress’ bucket # Commits -- **footnotes** uses [Conventional Commits](https://www.conventionalcommits.org) +- **footnotes** uses [Conventional Commits][conventional-commits] +- we use [PHP Commitizen][php-commitizen] to automate this - use `composer commit` - keep individual commits as small as possible # Versioning -- **footnotes** uses [Semantic Versioning](https://semver.org/) +- **footnotes** uses [Semantic Versioning][semver] # Translating - Translations are welcome! + +[new-issue]: https://github.com/markcheret/footnotes/issues/new/choose +[github-flow]: https://githubflow.github.io/ +[pull-request]: https://github.com/markcheret/footnotes/compare +[conventional-commits]: https://www.conventionalcommits.org +[php-commitizen]: https://github.com/conventional-commits/php-commitizen +[semver]: https://semver.org/ diff --git a/composer.json b/composer.json index 134107f..4b3354c 100644 --- a/composer.json +++ b/composer.json @@ -11,11 +11,14 @@ "lint-css": "echo TODO", "lint-js": "echo TODO", "docs": "./vendor/bin/phpdoc -d . -t ./docs --ignore vendor/", + "commit": "./vendor/bin/php-commitizen commit -- ./.php-commitizen.php", "post-install-cmd": "./_tools/setup.sh" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "wp-coding-standards/wpcs": "^2.3", - "phpdocumentor/phpdocumentor": "^3.0" + "phpdocumentor/phpdocumentor": "^3.0", + "damianopetrungaro/php-commitizen": "^0.2.0", + "marcocesarato/php-conventional-changelog": "^1.9" } } diff --git a/composer.lock b/composer.lock index b1a01a4..040a599 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "96b80176526406b01227fcaef2a4c2fc", + "content-hash": "c15a58a62ba5d8b2d7f3273717a8381a", "packages": [], "packages-dev": [ { @@ -80,6 +80,61 @@ ], "time": "2020-11-11T10:22:58+00:00" }, + { + "name": "damianopetrungaro/php-commitizen", + "version": "v0.2.0", + "source": { + "type": "git", + "url": "https://github.com/conventional-commits/php-commitizen.git", + "reference": "985283538f013c37146b2ec83812eeef2ff9d73c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/conventional-commits/php-commitizen/zipball/985283538f013c37146b2ec83812eeef2ff9d73c", + "reference": "985283538f013c37146b2ec83812eeef2ff9d73c", + "shasum": "" + }, + "require": { + "symfony/console": "^4 || ^5" + }, + "require-dev": { + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9" + }, + "bin": [ + "php-commitizen" + ], + "type": "library", + "autoload": { + "psr-4": { + "Damianopetrungaro\\PHPCommitizen\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Damiano Petrungaro", + "email": "damianopetrungaro@gmail.com" + } + ], + "description": "Help writing Git commit following conventional commit specs", + "keywords": [ + "atomic", + "atomic commit", + "commit", + "conventional commit", + "conventionalcommit", + "git" + ], + "support": { + "issues": "https://github.com/conventional-commits/php-commitizen/issues", + "source": "https://github.com/conventional-commits/php-commitizen/tree/v0.2.0" + }, + "time": "2020-07-15T23:51:42+00:00" + }, { "name": "dealerdirect/phpcodesniffer-composer-installer", "version": "v0.7.1", @@ -1343,6 +1398,79 @@ ], "time": "2020-10-31T13:45:51+00:00" }, + { + "name": "marcocesarato/php-conventional-changelog", + "version": "v1.9.9", + "source": { + "type": "git", + "url": "https://github.com/marcocesarato/php-conventional-changelog.git", + "reference": "072ca71c733cf82dae8e6523aa40f4133c288f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/072ca71c733cf82dae8e6523aa40f4133c288f8c", + "reference": "072ca71c733cf82dae8e6523aa40f4133c288f8c", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/console": "^4 || ^5" + }, + "require-dev": { + "brainmaestro/composer-git-hooks": "^2.8", + "friendsofphp/php-cs-fixer": "^2.18" + }, + "bin": [ + "conventional-changelog" + ], + "type": "library", + "extra": { + "hooks": { + "pre-commit": "composer fix-cs", + "pre-push": "composer check-cs", + "post-merge": "composer install" + } + }, + "autoload": { + "psr-4": { + "ConventionalChangelog\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0-or-later" + ], + "authors": [ + { + "name": "Marco Cesarato", + "email": "cesarato.developer@gmail.com" + } + ], + "description": "Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org", + "keywords": [ + "changelog", + "commit", + "commits", + "convention", + "conventional", + "conventional-changelog", + "conventional-changelog-preset", + "conventional-commit", + "conventional-commits", + "conventionalcommits", + "generation", + "git", + "history", + "php", + "readme", + "tag" + ], + "support": { + "issues": "https://github.com/marcocesarato/php-conventional-changelog/issues", + "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.9.9" + }, + "time": "2021-04-02T12:29:26+00:00" + }, { "name": "monolog/monolog", "version": "2.2.0", From 531ed14d0e294780b062f4aef1287689001a9332 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Apr 2021 07:47:32 +0000 Subject: [PATCH 130/144] Bump marcocesarato/php-conventional-changelog from 1.9.9 to 1.9.10 Bumps [marcocesarato/php-conventional-changelog](https://github.com/marcocesarato/php-conventional-changelog) from 1.9.9 to 1.9.10. - [Release notes](https://github.com/marcocesarato/php-conventional-changelog/releases) - [Changelog](https://github.com/marcocesarato/php-conventional-changelog/blob/main/CHANGELOG.md) - [Commits](https://github.com/marcocesarato/php-conventional-changelog/compare/v1.9.9...v1.9.10) Signed-off-by: dependabot[bot] --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 040a599..ddd8915 100644 --- a/composer.lock +++ b/composer.lock @@ -1400,16 +1400,16 @@ }, { "name": "marcocesarato/php-conventional-changelog", - "version": "v1.9.9", + "version": "v1.9.10", "source": { "type": "git", "url": "https://github.com/marcocesarato/php-conventional-changelog.git", - "reference": "072ca71c733cf82dae8e6523aa40f4133c288f8c" + "reference": "ecf53957bd84126f024f261c4b2fef4a889aafd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/072ca71c733cf82dae8e6523aa40f4133c288f8c", - "reference": "072ca71c733cf82dae8e6523aa40f4133c288f8c", + "url": "https://api.github.com/repos/marcocesarato/php-conventional-changelog/zipball/ecf53957bd84126f024f261c4b2fef4a889aafd2", + "reference": "ecf53957bd84126f024f261c4b2fef4a889aafd2", "shasum": "" }, "require": { @@ -1467,9 +1467,9 @@ ], "support": { "issues": "https://github.com/marcocesarato/php-conventional-changelog/issues", - "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.9.9" + "source": "https://github.com/marcocesarato/php-conventional-changelog/tree/v1.9.10" }, - "time": "2021-04-02T12:29:26+00:00" + "time": "2021-04-13T19:48:52+00:00" }, { "name": "monolog/monolog", From 35d8b820086d472bc4f3f2790c6c00b040899163 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 17:27:15 +0100 Subject: [PATCH 131/144] chore: fix character misencodings (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Various characters had been replaced by â€s. Fix #77 --- class/dashboard/subpage-main.php | 68 ++++++++++++++++---------------- readme.txt | 1 + 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index ba26c16..ddb8e3a 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -121,7 +121,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 2.0.4 to reflect changes in meta box label display since WPv5.5 * spans need position:fixed and become unlocalizable - * fix: logo is kept only in the label that doesn’t need to be translated: + * fix: logo is kept only in the label that doesn't need to be translated: * Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5 * @see details in class/config.php * @@ -179,13 +179,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Replace all placeholders. $l_obj_template->replace( array( - // Translators: '%s' is the link text 'AMP-WP' linked to the plugin’s front page on WordPress.org. + // Translators: '%s' is the link text 'AMP-WP' linked to the plugin's front page on WordPress.org. 'description-1-amp' => sprintf( __( 'The official %s plugin is required when this option is enabled.', 'footnotes' ), 'AMP-WP' ), 'label-amp' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ), 'amp' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ), 'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % viewport height.', 'footnotes' ), // Translators: '%s' is the logogram of the 'Footnotes' plugin. - 'description-2-amp' => sprintf( __( '%s is becoming AMP compatible when this box is checked. Styled tooltips are displayed with fade-in/fade-out effect if enabled, and the reference container expands also on clicking a referrer if it’s collapsed by default.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + 'description-2-amp' => sprintf( __( '%s is becoming AMP compatible when this box is checked. Styled tooltips are displayed with fade-in/fade-out effect if enabled, and the reference container expands also on clicking a referrer if it\'s collapsed by default.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); // Display template with replaced placeholders. @@ -237,7 +237,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ); // Options for the terminating punctuation after backlinks. // The Unicode name of RIGHT PARENTHESIS was originally more accurate because. - // This character is bidi-mirrored. Let’s use the Unicode 1.0 name. + // This character is bidi-mirrored. Let's use the Unicode 1.0 name. // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. $l_arr_terminators = array( 'period' => __( 'FULL STOP', 'footnotes' ), @@ -272,7 +272,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-name' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __( 'Heading:', 'footnotes' ) ), 'name' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME ), - 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading’s HTML element:', 'footnotes' ) ), + 'label-element' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, __( 'Heading\'s HTML element:', 'footnotes' ) ), 'element' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT, $l_arr_label_element ), 'label-border' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __( 'Border under the heading:', 'footnotes' ) ), @@ -307,11 +307,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-page-layout' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __( 'Apply basic responsive page layout:', 'footnotes' ) ), 'page-layout' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_page_layout_options ), - 'notice-page-layout' => __( 'Most themes don’t need this fix.', 'footnotes' ), + 'notice-page-layout' => __( 'Most themes don\'t need this fix.', 'footnotes' ), 'label-url-wrap' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, __( 'Allow URLs to line-wrap anywhere:', 'footnotes' ) ), 'url-wrap' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_enabled ), - 'notice-url-wrap' => __( 'Unicode-conformant browsers don’t need this fix.', 'footnotes' ), + 'notice-url-wrap' => __( 'Unicode-conformant browsers don\'t need this fix.', 'footnotes' ), 'label-symbol' => $this->add_label( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __( 'Display a backlink symbol:', 'footnotes' ) ), 'symbol-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_enabled ), @@ -343,13 +343,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_enabled ), 'width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true ), 'width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_width_units ), - 'notice-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + 'notice-width' => __( 'Absolute width in pixels doesn\'t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), 'label-max-width' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __( 'Set backlinks column maximum width:', 'footnotes' ) ), 'max-width-enable' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_enabled ), 'max-width-scalar' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true ), 'max-width-unit' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_width_units ), - 'notice-max-width' => __( 'Absolute width in pixels doesn’t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), + 'notice-max-width' => __( 'Absolute width in pixels doesn\'t need to be accurate to the tenth, but relative width in rem or em may.', 'footnotes' ), 'label-line-break' => $this->add_label( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, __( 'Stack backlinks when enumerating:', 'footnotes' ) ), 'line-break' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_enabled ), @@ -357,7 +357,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), 'link' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, $l_arr_enabled ), - 'notice-link' => __( 'The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'notice-link' => __( 'The link element is needed to apply the theme\'s link color.', 'footnotes' ), 'description-link' => __( 'If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.', 'footnotes' ), ) ); @@ -447,7 +447,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'syntax' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_enable ), 'notice-syntax' => __( 'In the presence of a lone start tag shortcode, a warning displays below the post title.', 'footnotes' ), - 'description-syntax' => __( 'If the start tag short code is ‘((’ or ‘(((’, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), + 'description-syntax' => __( 'If the start tag short code is \'((\' or \'(((\', it will not be reported as unbalanced if the following string contains braces hinting that it is a script.', 'footnotes' ), ) ); // Display template with replaced placeholders. @@ -471,12 +471,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { ); // Options for the numbering style of the footnotes. $l_arr_counter_style = array( - 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, …', - 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, …', - 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, …', - 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, …', - 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, …', - 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, …', + 'arabic_plain' => __( 'plain Arabic numbers', 'footnotes' ) . $l_str_space . '1, 2, 3, 4, 5, ...', + 'arabic_leading' => __( 'zero-padded Arabic numbers', 'footnotes' ) . $l_str_space . '01, 02, 03, 04, 05, ...', + 'latin_low' => __( 'lowercase Latin letters', 'footnotes' ) . $l_str_space . 'a, b, c, d, e, ...', + 'latin_high' => __( 'uppercase Latin letters', 'footnotes' ) . $l_str_space . 'A, B, C, D, E, ...', + 'romanic' => __( 'uppercase Roman numerals', 'footnotes' ) . $l_str_space . 'I, II, III, IV, V, ...', + 'roman_low' => __( 'lowercase Roman numerals', 'footnotes' ) . $l_str_space . 'i, ii, iii, iv, v, ...', ); // Load template file. @@ -638,7 +638,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'text-2' => sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ), 'random' => __( 'randomly determined display of either mention', 'footnotes' ), // Translators: 1: Plugin logo.2: heart symbol. - 'no' => sprintf( __( 'no display of any “%1$s %2$s” mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), + 'no' => sprintf( __( 'no display of any "%1$s %2$s" mention in the footer', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ), ); // Load template file. @@ -647,7 +647,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { $l_obj_template->replace( array( // Translators: %s: Footnotes plugin logo. - 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you’re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), + 'label-love' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf( __( 'Tell the world you\'re using %s:', 'footnotes' ), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME ) ), 'love' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_love ), // Translators: %s: Footnotes plugin logo. @@ -687,9 +687,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ), 'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ), 'notice-excerpts' => __( 'For this setting to be effective, the hook the_excerpt must be enabled under Scope and priority.', 'footnotes' ), - // Translators: %s: link text 'Advanced Excerpt' linked to the plugin’s WordPress.org front page. + // Translators: %s: link text 'Advanced Excerpt' linked to the plugin's WordPress.org front page. // Translators: %s: Footnotes plugin logo. - 'description-excerpts' => sprintf( __( 'Both to display footnotes and to not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to ensure that footnotes are handled and don’t impact the excerpt length.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + 'description-excerpts' => sprintf( __( 'Both to display footnotes and to not display footnotes in excerpts, the %s plugin generates excerpts on the basis of the posts to ensure that footnotes are handled and don\'t impact the excerpt length.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); // Display template with replaced placeholders. @@ -729,7 +729,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-normalize' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __( 'Normalize vertical alignment and font size:', 'footnotes' ) ), 'normalize' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_normalize_superscript ), - 'notice-normalize' => __( 'Most themes don’t need this fix.', 'footnotes' ), + 'notice-normalize' => __( 'Most themes don\'t need this fix.', 'footnotes' ), 'label-before' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __( 'At the start of the footnote referrers:', 'footnotes' ) ), 'before' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE ), @@ -738,7 +738,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'after' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER ), 'label-link' => $this->add_label( MCI_Footnotes_Settings::C_STR_LINK_ELEMENT_ENABLED, __( 'Use the link element for referrers and backlinks:', 'footnotes' ) ), - 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.', 'footnotes' ), + 'notice-link' => __( 'Please find this setting at the end of the reference container settings. The link element is needed to apply the theme\'s link color.', 'footnotes' ), ) ); // Display template with replaced placeholders. @@ -756,7 +756,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Options for the input label issue solution. $l_arr_issue_solutions = array( 'none' => __( '0. No problem or solved otherwise', 'footnotes' ), - 'move' => __( 'A. Footnotes are moved out and appended after the label’s end (recommended)', 'footnotes' ), + 'move' => __( 'A. Footnotes are moved out and appended after the label\'s end (recommended)', 'footnotes' ), 'disconnect' => __( 'B. Labels with footnotes are disconnected from input element (discouraged)', 'footnotes' ), ); // Load template file. @@ -764,10 +764,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // Replace all placeholders. $l_obj_template->replace( array( - 'description-1-selection' => __( 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A).', 'footnotes' ), + 'description-1-selection' => __( 'Clicking a footnote referrer in an input element label toggles the input except when hard links are enabled. In jQuery mode, the recommended solution is to move footnotes and append them after the label (option A).', 'footnotes' ), 'label-selection' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, __( 'Solve input label issue:', 'footnotes' ) ), 'selection' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION, $l_arr_issue_solutions ), - 'description-2-selection' => __( 'Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery ‘event.stopPropagation’ failed.)', 'footnotes' ), + 'description-2-selection' => __( 'Option B is discouraged because disconnecting a label from its input element may compromise accessibility. This option is a last resort in case footnotes must absolutely stay inside the label. (Using jQuery \'event.stopPropagation\' failed.)', 'footnotes' ), ) ); // Display template with replaced placeholders. @@ -806,7 +806,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'alternative' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_enabled ), 'notice-alternative' => __( 'Intended to work around a configuration-related tooltip outage.', 'footnotes' ), // Translators: %s: Footnotes plugin logo. - 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), + 'description-alternative' => sprintf( __( '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. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.', 'footnotes' ), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '' ), ) ); @@ -960,7 +960,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // The feature trims back until the last full word. 'notice-max-length' => __( 'No weird cuts.', 'footnotes' ), - 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '‘Read on’ button label:', 'footnotes' ) ), + 'label-readon' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __( '\'Read on\' button label:', 'footnotes' ) ), 'readon' => $this->add_text_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ), ) @@ -1050,12 +1050,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __( 'Text color:', 'footnotes' ) ), 'color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-color' => sprintf( __( 'To use the current theme’s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-color' => sprintf( __( 'To use the current theme\'s default text color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-background' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __( 'Background color:', 'footnotes' ) ), 'background' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND ), // Translators: %s: Clear or leave empty. - 'notice-background' => sprintf( __( 'To use the current theme’s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-background' => sprintf( __( 'To use the current theme\'s default background color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-width' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __( 'Border width:', 'footnotes' ) ), 'border-width' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true ), @@ -1064,7 +1064,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-border-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __( 'Border color:', 'footnotes' ) ), 'border-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-border-color' => sprintf( __( 'To use the current theme’s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-border-color' => sprintf( __( 'To use the current theme\'s default border color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), 'label-border-radius' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __( 'Rounded corner radius:', 'footnotes' ) ), 'border-radius' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500 ), @@ -1073,7 +1073,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { 'label-box-shadow-color' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __( 'Box shadow color:', 'footnotes' ) ), 'box-shadow-color' => $this->add_color_selection( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR ), // Translators: %s: Clear or leave empty. - 'notice-box-shadow-color' => sprintf( __( 'To use the current theme’s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), + 'notice-box-shadow-color' => sprintf( __( 'To use the current theme\'s default box shadow color: %s', 'footnotes' ), __( 'Clear or leave empty.', 'footnotes' ) ), ) ); @@ -1154,7 +1154,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { // phpcs:disable Squiz.PHP.CommentedOutCode.Found // CSS classes are listed in the template. - // Localized notices are dropped to ease translators’ task. + // Localized notices are dropped to ease translators' task. // "label-class-1" => ".footnote_plugin_tooltip_text",. // "class-1" => $this->add_text(__("superscript, Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),. @@ -1342,7 +1342,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { array( 'label-start' => __( 'Start your footnote with the following short code:', 'footnotes' ), 'start' => $l_arr_footnote_starting_tag['value'], - 'label-end' => __( '…and end your footnote with this short code:', 'footnotes' ), + 'label-end' => __( '...and end your footnote with this short code:', 'footnotes' ), 'end' => $l_arr_footnote_ending_tag['value'], 'example-code' => $l_str_example, 'example-string' => '
                                                                                                                                                                                                                                                        ' . __( 'will be displayed as:', 'footnotes' ), diff --git a/readme.txt b/readme.txt index 4a9b795..7988cbd 100644 --- a/readme.txt +++ b/readme.txt @@ -79,6 +79,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.6.6 = - Bugfix: Process: fix issue that caused some footnotes to not be processed, thanks to @docteurfitness bug report. +- Bugfix: Display: fix characters that had been mis-encoded. = 2.6.5 = - Bugfix: Editor buttons: debug button by reverting name change in PHP file while JS file and HTML template remained unsynced, thanks to @gova bug report. From 7128ef42821e4e87b35fe8a804ce820787aa0581 Mon Sep 17 00:00:00 2001 From: Mark Cheret Date: Wed, 14 Apr 2021 23:36:21 +0200 Subject: [PATCH 132/144] Update php.yml #73 #70 --- .github/workflows/php.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 6dcf060..f20ca38 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,6 +13,9 @@ jobs: steps: - uses: actions/checkout@v2 + + - name: Update composer.lock + run: composer update - name: Validate composer.json and composer.lock run: composer validate --strict From e76a4e0bb181993e7dd0cd8ae622df950849fc61 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 22:39:16 +0100 Subject: [PATCH 133/144] fix: add separate prod/dev cache-busters --- class/dashboard/layout.php | 37 ++++++++++--------------------------- class/init.php | 6 +----- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 840410a..a38b88a 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -211,33 +211,16 @@ abstract class MCI_Footnotes_Layout_Engine { * automated update of version number for cache busting. * No need to use '-styles' in the handle, as '-css' is appended automatically. */ - if ( C_BOOL_CSS_PRODUCTION_MODE ) { - - wp_register_style( - 'mci-footnotes-admin', - plugins_url( 'footnotes/css/settings.min.css' ), - array(), - filemtime( - plugin_dir_path( - dirname( __FILE__ ) - ) . 'css/settings.min.css' - ) - ); - - } else { - - wp_register_style( - 'mci-footnotes-admin', - plugins_url( 'footnotes/css/settings.css' ), - array(), - filemtime( - plugin_dir_path( - dirname( __FILE__, 2 ) - ) . 'css/settings.css' - ) - ); - - } + wp_register_style( + 'mci-footnotes-admin', + plugins_url( 'footnotes/css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' ), + array(), + ( C_BOOL_CSS_PRODUCTION_MODE ) ? C_STR_PACKAGE_VERSION : filemtime( + plugin_dir_path( + dirname( __FILE__ ) + ) . 'css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' + ) + ); wp_enqueue_style( 'mci-footnotes-admin' ); } diff --git a/class/init.php b/class/init.php index af20d85..6e70d9c 100644 --- a/class/init.php +++ b/class/init.php @@ -416,11 +416,7 @@ class MCI_Footnotes { MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'brpl' . $l_str_layout_mode . '.min.css' ), array(), - filemtime( - plugin_dir_path( - dirname( __FILE__ ) - ) . 'css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css' - ), + C_STR_PACKAGE_VERSION, 'all' ); From b824a44541644885054839e5238eb2de3c7f9acc Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 22:47:44 +0100 Subject: [PATCH 134/144] style: rename production flag variable Renames the current production flag variable to be shorter, non-Hungarian (presaging changes to come in #35) and not specifically CSS_-related. See #80 --- _tools/build.sh | 2 +- class/dashboard/layout.php | 6 +++--- class/init.php | 2 +- class/layout/abstract-engine.php | 2 +- footnotes.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_tools/build.sh b/_tools/build.sh index e4b908b..aa89c41 100755 --- a/_tools/build.sh +++ b/_tools/build.sh @@ -12,7 +12,7 @@ cp -t dist/img img/fn-wysiwyg.png img/main-menu.png echo "Copying files..." cp -t dist features.txt license.txt readme.txt includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md echo "Setting production flag..." -sed "s/'C_BOOL_CSS_PRODUCTION_MODE', false/'C_BOOL_CSS_PRODUCTION_MODE', true/g" footnotes.php > dist/footnotes.php +sed "s/'PRODUCTION_ENV', false/'PRODUCTION_ENV', true/g" footnotes.php > dist/footnotes.php echo "Production flag set." # TODO: once automatic minification is implemented, this should handle that. diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index a38b88a..61c9934 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -213,12 +213,12 @@ abstract class MCI_Footnotes_Layout_Engine { */ wp_register_style( 'mci-footnotes-admin', - plugins_url( 'footnotes/css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' ), + plugins_url( 'footnotes/css/settings' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.css' ), array(), - ( C_BOOL_CSS_PRODUCTION_MODE ) ? C_STR_PACKAGE_VERSION : filemtime( + ( PRODUCTION_ENV ) ? C_STR_PACKAGE_VERSION : filemtime( plugin_dir_path( dirname( __FILE__ ) - ) . 'css/settings' . ( ( C_BOOL_CSS_PRODUCTION_MODE ) ? '.min' : '' ) . '.css' + ) . 'css/settings' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.css' ) ); diff --git a/class/init.php b/class/init.php index 6e70d9c..5939040 100644 --- a/class/init.php +++ b/class/init.php @@ -339,7 +339,7 @@ class MCI_Footnotes { * The Boolean may be set at the bottom of the plugin’s main PHP file. * @see footnotes.php */ - if ( C_BOOL_CSS_PRODUCTION_MODE ) { + if ( PRODUCTION_ENV ) { /** * Enqueues a minified united external stylesheet in production. diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index 143ad96..b1826e6 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -211,7 +211,7 @@ abstract class MCI_Footnotes_Layout_Engine { * automated update of version number for cache busting. * No need to use '-styles' in the handle, as '-css' is appended automatically. */ - if ( true === C_BOOL_CSS_PRODUCTION_MODE ) { + if ( true === PRODUCTION_ENV ) { wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_PACKAGE_VERSION ); diff --git a/footnotes.php b/footnotes.php index 5917208..b6ab661 100755 --- a/footnotes.php +++ b/footnotes.php @@ -103,4 +103,4 @@ $g_obj_mci_footnotes->run(); * Developing stylesheets is meant to be easier when this is set to false. * WARNING: This facility designed for development must NOT be used in production. */ -define( 'C_BOOL_CSS_PRODUCTION_MODE', false ); +define( 'PRODUCTION_ENV', false ); From eb34f30880c12b3b0cc8698b7295ef8305dfb7f7 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 22:52:56 +0100 Subject: [PATCH 135/144] fix: correct relative filepaths --- class/dashboard/layout.php | 2 +- class/init.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 61c9934..16d492e 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -217,7 +217,7 @@ abstract class MCI_Footnotes_Layout_Engine { array(), ( PRODUCTION_ENV ) ? C_STR_PACKAGE_VERSION : filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 2 ) ) . 'css/settings' . ( ( PRODUCTION_ENV ) ? '.min' : '' ) . '.css' ) ); diff --git a/class/init.php b/class/init.php index 5939040..ce57b02 100644 --- a/class/init.php +++ b/class/init.php @@ -436,7 +436,7 @@ class MCI_Footnotes { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 1 ) ) . 'css/dev-common.css' ) ); @@ -446,7 +446,7 @@ class MCI_Footnotes { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 1 ) ) . 'css/dev-tooltips.css' ) ); @@ -458,7 +458,7 @@ class MCI_Footnotes { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 1 ) ) . 'css/dev-amp-tooltips.css' ) ); @@ -471,7 +471,7 @@ class MCI_Footnotes { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 1 ) ) . 'css/dev-tooltips-alternative.css' ) ); @@ -487,7 +487,7 @@ class MCI_Footnotes { array(), filemtime( plugin_dir_path( - dirname( __FILE__ ) + dirname( __FILE__, 1 ) ) . 'css/dev-layout-' . $l_str_page_layout_option . '.css' ), 'all' From 3d4286952cadced10178e9ddeb80825762b2d6e5 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:20:42 +0100 Subject: [PATCH 136/144] chore: update linting commands, correct license --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 4b3354c..6813f67 100644 --- a/composer.json +++ b/composer.json @@ -1,15 +1,15 @@ { "name": "markcheret/footnotes", "description": "footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.", - "license": "GPL-3.0-or-later", + "license": "GPL-3.0", "scripts": { "release": "./_tools/release.sh", "release:commit": "composer run release -- -c", "build": "./_tools/build.sh", - "lint-php": "./vendor/bin/phpcs --standard='WordPress' --colors --encoding=utf-8 -n -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", - "lint-php:fix": "./vendor/bin/phpcbf --standard='WordPress' --encoding=utf-8 -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", - "lint-css": "echo TODO", - "lint-js": "echo TODO", + "lint:php": "./vendor/bin/phpcs --standard='WordPress' --colors --encoding=utf-8 -n -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", + "lint:php:fix": "./vendor/bin/phpcbf --standard='WordPress' --encoding=utf-8 -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php", + "lint:css": "echo TODO", + "lint:js": "echo TODO", "docs": "./vendor/bin/phpdoc -d . -t ./docs --ignore vendor/", "commit": "./vendor/bin/php-commitizen commit -- ./.php-commitizen.php", "post-install-cmd": "./_tools/setup.sh" From 40d3d26d9ec786bea2931ead48a5e613eb0c4cc4 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:21:01 +0100 Subject: [PATCH 137/144] chore: re-write developer readme --- README.md | 162 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 112 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 99d11c2..fc87f7f 100644 --- a/README.md +++ b/README.md @@ -2,76 +2,138 @@ # footnotes -## Description +Featured on [wpmudev][wpmudev] — cheers for the review, folks! -Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) — cheers for the review, folks! +**footnotes** aims to be the all-in-one solution for displaying an +automatically-generated list of references on your Page or Post. The Plugin +ships with a set of defaults while also empowering you to control how your +footnotes will be displayed. -**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed. +**footnotes** gives you the ability to display well-formatted footnotes on your +WordPress Pages and Posts — those footnotes we know from offline publishing. -**footnotes** gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing. +## Table of Contents + +* [Features](#features) +* [Getting Started](#getting-started) +* [Deploying](#deploying) +* [Testing](#testing) +* [Code Formatting](#code-formatting) +* [Documentation](#documentation) +* [Acknowledgments](#acknowledgements) +* [License](#license) +* [Contact Information](#contact-information) + +## Features + +This Plugin provides: + +- fully customizable footnote start and end shortcodes; +- stylable tooltips supporting hyperlinks and dedicated text; +- a responsive 'reference container', with customisable positioning; +- a wide choice of different numbering styles; +- a freely-configurable and optional backlink symbol; +- footnote appearance customisation via dashboard settings and custom CSS style + rules; and +- editor buttons for easily adding shortcode tags. ## Getting Started -1. Read the contributing guidelines -1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`) - - We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your local testing environment -1. Install [Composer](https://getcomposer.org/download/), if you don't have it already -1. Install dependencies (`composer install`) - - You will have to install `php-mbstring` manually if you do not already have it. +1. Read the [contributing guidelines][contributing]; +1. clone this repository (`git clone git@github.com:markcheret/footnotes.git`): + - we recommend that you use [VVV][vvv] for your local testing environment. +1. install [Composer][composer], if you don't have it already; and +1. install all dependencies (`composer install`): + - you will have to install `php-mbstring` manually if you do not already + have it. + +## Deploying + +Automated release deployments will be introduced soon. + +### Building + +1. Run `_tools/build-stylesheets.sh -c` to concatenate stylesheets; +1. manually minify the output files in `css/tmp/`, saving them as `.min.css` files: + - the intention is to replace this with automated minification, meaning that + all of these steps can be rolled into a single `build` command. +1. run `_tools/build-stylesheets.sh -d` to deploy the minified files to `dist/`: + - **this will delete any existing `dist/` folder!** +1. run `composer run build` to move over the remaining files to `dist/`: + - currently, the files to include in a distribution are hard-coded in + `_tools/build.sh`; but + - the intention is to replace this with a proper parsing of the `.distignore` + file + +### Releasing + +1. Ensure that you have configured your Git config. with SVN credentials; +1. run the above [build](#building) commands; and +1. run `composer run release` and follow the prompts. + +## Testing + +Automated testing will be introduced soon. ## Code Formatting -1. Run `composer run lint-php` to lint all PHP files -1. Run `composer run lint-php:fix` to attempt to automatically fix errors and warnings +This repo. uses pre-commit code formatting and linting on all staged files. +This ensures that only style-conformant code can be committed. -## Releasing +The individual commands used by the pre-commit hook can also be called manually: -1. Run `composer run release` +### PHP Code -## Building +PHP code must follow the [WordPress PHP Coding Standards][wpcs-php]. -1. Run `_tools/build-stylesheets.sh -c` to concatenate stylesheets -1. Manually minify the output files in `css/tmp/`, saving them as `.min.css` files - - The intention is to replace this with automated minification, meaning that - all of these steps can be rolled into a single `build` command. -1. Run `_tools/build-stylesheets.sh -d` to deploy the minified files to `dist/` - - **this will delete any existing `dist/` folder** -1. Run `composer run build` to move over the remaining files to `dist/` - - Currently, the files to include in a distribution are hard-coded in `_tools/build.sh` - - The intention is to replace this with a proper parsing of the `.distignore` file +1. Run `composer run lint:php` to lint all JS/TS files with [PHP CodeSniffer][phpcs] +1. Run `composer run lint:php:fix` to attempt to automatically fix warnings and + errors with the PHP Code Beautifier and Formatter. + +### JavaScript Code -## Updating Documentation +JavaScript code must follow the [WordPress JavaScript Coding Standards][wpcs-js]. -1. Run `composer run docs` +Automated linting and formatting will be introduced soon. + +### CSS Stylesheets -## Testing +JavaScript code must follow the [WordPress CSS Coding Standards][wpcs-css]. -Unit tests are TODO. +Automated linting and formatting will be introduced soon. -## Main Features +## Documentation -- Fully customizable **footnotes** start and end shortcodes; -- Styled tooltips supporting hyperlinks display **footnotes** or a dedicated text; -- Responsive *Reference Container* at the end or positioned by shortcode; -- Display the **footnotes** *Reference Container* inside a Widget; -- Wide choice of numbering styles; -- Freely configurable and optional backlink symbol; -- Configure the **footnotes'** appearance by dashboard settings and Custom CSS style rules; -- Button in both the Visual and the Text editor to add shortcodes around selection. +Run `composer run docs` to automatically generate HTML documentation with +[phpDocumentor][phpdocumentor]. -## Example Usage - -These are a few examples of possible ways to delimit footnotes: - -1. Your awesome text`((`with an awesome footnote`))` -2. Your awesome text`[ref]`with an awesome footnote`[/ref]` -3. Your awesome text``with an awesome footnote`` -4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode` - -## Where to get footnotes? - -The current version is available on the [WordPress.org Plugin Directory](https://wordpress.org/plugins/footnotes/). +View the current docs [here][footnotes-docs]. ## Acknowledgements -Huge thanks to every **footnotes user**, contributor, bug reporter, feature requester and fan! +Huge thanks to every **footnotes user**, contributor, bug reporter, feature +requester and fan! + +## License + +This project is licensed under the [GNU GPL v3][gpl-v3]. + +## Contact Information + +| Name | Link(s) | +|---------------|-----------------------| +|Mark Cheret | [Email][mcheret] | + +[wpmudev]: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ +[php]: https://www.php.net/ +[contributing]: https://github.com/markcheret/footnotes/blob/main/CONTRIBUTING.md +[vvv]: https://varyingvagrantvagrants.org/ +[composer]: https://getcomposer.org/download/ +[wpcs-php]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/ +[phpcs]: https://github.com/squizlabs/PHP_CodeSniffer +[wpcs-js]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/ +[wpcs-css]: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/ +[phpdocumentor]: https://phpdoc.org/ +[footnotes-docs]: https://markcheret.github.io/footnotes/ +[gpl-v3]: https://www.gnu.org/licenses/gpl-3.0.en.html +[mcheret]: mailto:mark@cheret.de From e17167f7fea6683f0a59f1207cf6b2766efca2ae Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:27:32 +0100 Subject: [PATCH 138/144] fix: add `--with-all-dependencies` flag --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f20ca38..c76b772 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v2 - name: Update composer.lock - run: composer update + run: composer update -W - name: Validate composer.json and composer.lock run: composer validate --strict From 7d6ae59b61421c15d1f6a94f634ad485b8d10437 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:34:09 +0100 Subject: [PATCH 139/144] fix: correct license --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6813f67..f817e43 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "markcheret/footnotes", "description": "footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.", - "license": "GPL-3.0", + "license": "GPL-3.0-only", "scripts": { "release": "./_tools/release.sh", "release:commit": "composer run release -- -c", From 21bb9c0ba77531b4ccd267df29cb4ef33eec9228 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:34:20 +0100 Subject: [PATCH 140/144] chore: update lockfile --- composer.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index ddd8915..79b7024 100644 --- a/composer.lock +++ b/composer.lock @@ -482,16 +482,16 @@ }, { "name": "laminas/laminas-code", - "version": "4.1.0", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-code.git", - "reference": "5b553c274b94af3f880cbaaf8fbab047f279a31c" + "reference": "e7e8f8a9c267520051d8026ff1da74823a3d8b97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/5b553c274b94af3f880cbaaf8fbab047f279a31c", - "reference": "5b553c274b94af3f880cbaaf8fbab047f279a31c", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/e7e8f8a9c267520051d8026ff1da74823a3d8b97", + "reference": "e7e8f8a9c267520051d8026ff1da74823a3d8b97", "shasum": "" }, "require": { @@ -549,7 +549,7 @@ "type": "community_bridge" } ], - "time": "2021-03-27T13:55:31+00:00" + "time": "2021-04-14T22:05:06+00:00" }, { "name": "laminas/laminas-eventmanager", From feb9995bc8ca025fb8ab323222cf2665d7d12659 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:35:13 +0100 Subject: [PATCH 141/144] test: comment out caching --- .github/workflows/php.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index c76b772..2cd4755 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -13,21 +13,18 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Update composer.lock - run: composer update -W - name: Validate composer.json and composer.lock run: composer validate --strict - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- + # - name: Cache Composer packages + #id: composer-cache + #uses: actions/cache@v2 + #with: + # path: vendor + # key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + # restore-keys: | + # ${{ runner.os }}-php- - name: Install dependencies run: composer install --prefer-dist --no-progress From 6891f58f2cc072734f41d074c766073b8c3c678d Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:38:13 +0100 Subject: [PATCH 142/144] fix: ignore PHP version --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2cd4755..f4ad093 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -27,7 +27,7 @@ jobs: # ${{ runner.os }}-php- - name: Install dependencies - run: composer install --prefer-dist --no-progress + run: composer install --prefer-dist --no-progress --ignore-platform-reqs # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" # Docs: https://getcomposer.org/doc/articles/scripts.md From 833097ea24657243e62224bf00b28692aeeac854 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 14 Apr 2021 23:40:30 +0100 Subject: [PATCH 143/144] feat: re-add caching command, add linting command --- .github/workflows/php.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f4ad093..619c495 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,20 +17,21 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate --strict - # - name: Cache Composer packages - #id: composer-cache - #uses: actions/cache@v2 - #with: - # path: vendor - # key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - # restore-keys: | - # ${{ runner.os }}-php- + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v2 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- - name: Install dependencies run: composer install --prefer-dist --no-progress --ignore-platform-reqs - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md + - name: Lint PHP code + run: composer run lint:php + # TODO: Add tests # - name: Run test suite # run: composer run-script test From 27d3e6269e1bca8481d26a9af83aa39fe28a07a1 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Thu, 15 Apr 2021 05:09:23 +0100 Subject: [PATCH 144/144] chore: remove date info (#94) * chore: remove @lastmodified tags * chore: remove @date tags * chore: remove timestamps * chore: remove timestamps * chore: minor formatting fixes --- class/config.php | 3 +- class/convert.php | 5 +- class/dashboard/init.php | 1 - class/dashboard/layout.php | 13 +-- class/dashboard/subpage-diagnostics.php | 1 - class/dashboard/subpage-main.php | 123 ++++++++++++------------ class/hooks.php | 3 +- class/init.php | 34 +++---- class/language.php | 3 - class/layout/abstract-engine.php | 12 +-- class/layout/diagnostics.php | 1 - class/layout/init.php | 1 - class/layout/settings.php | 81 ++++++++-------- class/settings.php | 45 +-------- class/task.php | 86 ++++------------- class/template.php | 2 - class/widgets/base.php | 1 - class/widgets/reference-container.php | 5 +- class/wysiwyg.php | 1 - css/dev-common.css | 1 - css/dev-layout-entry-content.css | 8 +- css/dev-layout-main-content.css | 3 +- css/dev-layout-reference-container.css | 2 +- css/dev-tooltips.css | 7 -- customized-documentation-schema.txt | 3 - customized-template-stack.txt | 2 - footnotes.php | 1 - js/jquery.tools.js | 5 - js/jquery.tools.min.js | 1 - js/wysiwyg-editor.js | 4 +- 30 files changed, 154 insertions(+), 304 deletions(-) diff --git a/class/config.php b/class/config.php index 8f02119..35634b4 100644 --- a/class/config.php +++ b/class/config.php @@ -5,9 +5,8 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * - * @since 2.0.4 add Public Plugin name for dashboard heading 2020-11-01T0452+0100 + * @since 2.0.4 add Public Plugin name for dashboard heading */ /** diff --git a/class/convert.php b/class/convert.php index c994d7a..d1da59a 100644 --- a/class/convert.php +++ b/class/convert.php @@ -5,9 +5,8 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * - * @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100 + * @since 2.2.0 add lowercase Roman */ /** @@ -102,7 +101,7 @@ class MCI_Footnotes_Convert { * @return string * * Edited: - * @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100 + * @since 2.2.0 optionally lowercase (code from Latin) */ private static function to_romanic( $p_int_value, $p_bool_upper_case ) { // Table containing all necessary romanic letters. diff --git a/class/dashboard/init.php b/class/dashboard/init.php index c3f505e..39318c9 100644 --- a/class/dashboard/init.php +++ b/class/dashboard/init.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:26 */ /** diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 16d492e..41b90d5 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -5,12 +5,11 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * - * @since 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100 - * @since 2.1.4 optional step argument and support for floating in numbox 2020-12-05T0540+0100 - * @since 2.1.6 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100 + * @since 2.1.2 add versioning of settings.css for cache busting + * @since 2.1.4 automate passing version number for cache busting + * @since 2.1.4 optional step argument and support for floating in numbox + * @since 2.1.6 fix punctuation-related localization issue in dashboard labels * * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. */ @@ -199,7 +198,6 @@ abstract class MCI_Footnotes_Layout_Engine { * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. * * @since 2.5.5 - * @date 2021-02-14T1928+0100 * * @reporter @docteurfitness * @link https://wordpress.org/support/topic/simply-speed-optimisation/ @@ -530,8 +528,7 @@ abstract class MCI_Footnotes_Layout_Engine { * @param bool $p_bool_deci true if 0.1 steps and floating to string, false if integer (default). * @return string * - * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + * @since 2.1.4 step argument and number_format() to allow decimals. */ protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { // Collect data for given settings field. diff --git a/class/dashboard/subpage-diagnostics.php b/class/dashboard/subpage-diagnostics.php index 1a30015..0889af6 100644 --- a/class/dashboard/subpage-diagnostics.php +++ b/class/dashboard/subpage-diagnostics.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 14:47 */ /** diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index ddb8e3a..e50dd33 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -4,39 +4,38 @@ * * @filesource * @since 1.5.0 - * @date 14.09.14 14:47 * - * @since 2.0.4 restore arrow settings 2020-11-01T0509+0100 - * @since 2.1.0 read-on button label 2020-11-08T2148+0100 - * @since 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100 + * @since 2.0.4 restore arrow settings + * @since 2.1.0 read-on button label + * @since 2.1.1 options for ref container and alternative tooltips * @since 2.1.1 Referrers: superscript becomes optional, thanks to @cwbayer bug report * @since 2.1.2 priority level settings for all other hooks, thanks to @nikelaos * @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705 - * @since 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100 - * @since 2.1.6 slight UI reordering 2020-12-09T1114+0100 - * @since 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100 - * @since 2.1.6 remove expert mode setting as outdated 2020-12-09T2105+0100 + * @since 2.1.4 settings for ref container, tooltips and scrolling + * @since 2.1.6 slight UI reordering + * @since 2.1.6 option to disable URL line wrapping + * @since 2.1.6 remove expert mode setting as outdated * @since 2.2.0 start/end short codes: more predefined options, thanks to @nikelaos * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100 - * @since 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100 - * @since 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 - * @since 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1244+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2021+0100 + * @since 2.2.0 add options, redistribute, update strings + * @since 2.2.0 shortcode for reference container custom position + * @since 2.2.2 Custom CSS settings container migration + * @since 2.2.4 move backlink symbol selection under previous tab + * @since 2.2.5 support for Ibid. notation thanks to @meglio * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - * @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100 + * @since 2.2.10 reference container row border option, thanks to @noobishh * @link https://wordpress.org/support/topic/borders-25/ * @since 2.3.0 Reference container: convert top padding to margin and make it a setting, thanks to @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635 - * @since 2.3.0 rename Priority level tab as Scope and priority 2020-12-26T2222+0100 - * @since 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' 2020-12-27T1243+0100 - * @since 2.3.0 mention op. cit. abbreviation 2020-12-28T2342+0100 - * @since 2.3.0 add settings for hard links, thanks to @psykonevro and @martinneumannat 2020-12-29T1322+0100 + * @since 2.3.0 rename Priority level tab as Scope and priority + * @since 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' + * @since 2.3.0 mention op. cit. abbreviation + * @since 2.3.0 add settings for hard links, thanks to @psykonevro and @martinneumannat * @link https://wordpress.org/support/topic/making-it-amp-compatible/ * @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/ - * @since 2.4.0 footnote shortcode syntax validation 2021-01-01T0624+0100 + * @since 2.4.0 footnote shortcode syntax validation * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ @@ -200,8 +199,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.0 * * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.1.4: layout and typography options + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ */ public function reference_container() { @@ -372,14 +371,14 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * Edited heading + * @since 2.2.0 start/end short codes: more predefined options * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @since 2.2.0 3 boxes for clarity + * @since 2.2.5 support for Ibid. notation thanks to @meglio * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.4.0 added warning about Block Editor escapement disruption + * @since 2.4.0 removed the HTML comment tag option * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ @@ -520,34 +519,34 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { $l_obj_template->replace( array( - 'label-scroll-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ), - 'scroll-css' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ), - 'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ), + 'label-scroll-css' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, __( 'CSS-based smooth scrolling:', 'footnotes' ) ), + 'scroll-css' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING, $l_arr_enable ), + 'notice-scroll-css' => __( 'May slightly disturb jQuery scrolling and is therefore disabled by default. Works in recent browsers.', 'footnotes' ), - 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), - 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), - 'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ), + 'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ), + 'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ), + 'notice-scroll-offset' => __( 'per cent viewport height from the upper edge', 'footnotes' ), - 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), - 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), - 'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ), + 'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ), + 'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ), + 'notice-scroll-duration' => __( 'milliseconds. If asymmetric scroll durations are enabled, this is the scroll-up duration.', 'footnotes' ), // Enable scroll duration asymmetricity. - 'label-scroll-asymmetricity' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ), - 'scroll-asymmetricity' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ), - 'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ), + 'label-scroll-asymmetricity' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, __( 'Enable asymmetric scroll durations:', 'footnotes' ) ), + 'scroll-asymmetricity' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY, $l_arr_enable ), + 'notice-scroll-asymmetricity' => __( 'With this option enabled, scrolling up may take longer than down, or conversely.', 'footnotes' ), - 'label-scroll-down-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ), - 'scroll-down-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ), - 'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ), + 'label-scroll-down-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, __( 'Scroll-down duration:', 'footnotes' ) ), + 'scroll-down-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION, 0, 20000 ), + 'notice-scroll-down-duration' => __( 'milliseconds', 'footnotes' ), - 'label-scroll-down-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ), - 'scroll-down-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ), - 'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ), + 'label-scroll-down-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, __( 'Scroll-down delay:', 'footnotes' ) ), + 'scroll-down-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY, 0, 20000 ), + 'notice-scroll-down-delay' => __( 'milliseconds. Useful to see the effect on input elements when referrers without hard links are clicked in form labels.', 'footnotes' ), - 'label-scroll-up-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ), - 'scroll-up-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ), - 'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ), + 'label-scroll-up-delay' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, __( 'Scroll-up delay:', 'footnotes' ) ), + 'scroll-up-delay' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_UP_DELAY, 0, 20000 ), + 'notice-scroll-up-delay' => __( 'milliseconds. Less useful than the scroll-down delay.', 'footnotes' ), ) ); @@ -616,8 +615,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.0 * * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 + * @since 2.2.0 position-sensitive placeholders to support more locales + * @since 2.2.0 more options */ public function love() { // Options for the acknowledgment display in the footer. @@ -666,11 +665,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1453+0100 + * Edited heading * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + * @since 2.2.0 dedicated to the excerpt setting and its notices */ public function excerpts() { // Options for Yes/No select box. @@ -703,9 +702,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1513+0100 + * Edited heading * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + * @since 2.2.0 option for link element moved here */ public function superscript() { // Options for Yes/No select box. @@ -1100,7 +1099,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * - Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report. * * @since 2.0.4 - * @date 2020-11-02T2115+0100 * * @reporter @mmallett * @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037 @@ -1136,10 +1134,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 * list directly in the template, as CSS is in English anyway * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.2.2 migrate Custom CSS to a dedicated tab + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report */ public function custom_css() { @@ -1241,8 +1238,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.5 * * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * @since 2.1.1 priority level setting for the_content + * @since 2.1.4 priority level settings for the other hooks * * priority level was initially hard-coded default * shows "9223372036854775807" in the numbox @@ -1250,8 +1247,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * but a numbox cannot be set to empty: * define -1 as PHP_INT_MAX instead * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + * @since 2.2.9 removed the warning about the widget text hook + * @since 2.2.9 added guidance for the widget text hook */ public function lookup_hooks() { // Load template file. diff --git a/class/hooks.php b/class/hooks.php index 8e44a82..ae4c0c9 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -5,9 +5,8 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * - * @since 2.2.0 (TBD) 2020-12-12T1223+0100 + * @since 2.2.0 */ /** diff --git a/class/init.php b/class/init.php index ce57b02..f92c64b 100644 --- a/class/init.php +++ b/class/init.php @@ -5,16 +5,15 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * * @since 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. * @since 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution. * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. * - * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 + * @since 2.0.3 add versioning of public.css for cache busting + * @since 2.0.4 add jQuery UI from WordPress + * @since 2.1.4 automate passing version number for cache busting + * @since 2.1.4 optionally enqueue an extra stylesheet * * @since 2.5.5 Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. @@ -44,7 +43,6 @@ class MCI_Footnotes { * - Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. * * @since 2.4.0 - * @date 2021-01-04T1355+0100 * * @contributor Patrizia Lutz @misfist * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 @@ -126,7 +124,6 @@ class MCI_Footnotes { * * @contributor @felipelavinz * @link https://github.com/benleyjyc/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 - * @date 2020-02-25 * @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793 * * @see self::initialize_widgets() @@ -209,10 +206,10 @@ class MCI_Footnotes { * @since 1.5.0 * * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 + * @since 2.0.3 add versioning of public.css for cache busting + * @since 2.0.4 add jQuery UI from WordPress + * @since 2.1.4 automate passing version number for cache busting + * @since 2.1.4 optionally enqueue an extra stylesheet */ public function register_public() { @@ -267,12 +264,10 @@ class MCI_Footnotes { * Add versioning. * * @since 2.1.2 - * @date 2020-11-18T2150+0100 * * No '-js' in the handle, is appended automatically. * * Deferring to the footer breaks jQuery tooltip display. - * @date 2021-02-23T1105+0100 */ wp_enqueue_script( 'mci-footnotes-jquery-tools', @@ -303,8 +298,7 @@ class MCI_Footnotes { * * Fetch jQuery UI from cdnjs.cloudflare.com. * @since 2.0.0 - * @date 2020-10-26T1907+0100 - * @contributor @vonpiernik + * @contributor @vonpiernik * @link https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762 * * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.1.2 @@ -312,8 +306,7 @@ class MCI_Footnotes { * - Update: Libraries: Load jQuery UI from WordPress, thanks to @check2020de issue report. * * @since 2.0.4 - * @date 2020-11-01T1902+0100 - * @reporter @check2020de + * @reporter @check2020de * @link https://wordpress.org/support/topic/gdpr-issue-with-jquery/ * @link https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui * @@ -331,7 +324,6 @@ class MCI_Footnotes { * Enables enqueuing a new-scheme stylesheet. * * @since 2.5.5 - * @date 2021-02-14T1512+0100 * * Enables enqueuing the formatted individual stylesheets if false. * WARNING: This facility is designed for development and must NOT be used in production. @@ -348,7 +340,6 @@ class MCI_Footnotes { * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. * * @since 2.5.5 - * @date 2021-02-14T1543+0100 * * @contributor @docteurfitness * @link https://wordpress.org/support/topic/simply-speed-optimisation/ @@ -360,11 +351,9 @@ class MCI_Footnotes { * @see class/dashboard/layout.php * * @since 2.0.3 add versioning of public.css for cache busting. - * @date 2020-10-29T1413+0100 * Plugin version number is needed for busting browser caches after each plugin update. * * @since 2.1.4 automate passing version number for cache busting. - * @date 2020-11-30T0646+0100 * The constant C_STR_PACKAGE_VERSION is defined at start of footnotes.php. * * The media scope argument 'all' is the default. @@ -426,8 +415,7 @@ class MCI_Footnotes { * Enqueues external stylesheets, ONLY in development now. * * @since 2.1.4 optionally enqueue an extra stylesheet. - * @date 2020-12-04T2231+0100 - * + * * This optional layout fix is useful by lack of layout support. */ wp_enqueue_style( diff --git a/class/language.php b/class/language.php index fd86a8c..d7064da 100644 --- a/class/language.php +++ b/class/language.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 17:47 * * @since 2.0.0 Bugfix: Localization: correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. * @since 2.1.6 Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. @@ -37,7 +36,6 @@ class MCI_Footnotes_Language { * - Bugfix: Correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. * * @since 2.0.0 - * @date 2020-10-26T1609+0100 * * @contributor @matkus2 * @link https://wordpress.org/support/topic/error-missing-parameter-if-using-php-7-1-or-later/ @@ -81,7 +79,6 @@ class MCI_Footnotes_Language { * - Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. * * @since 2.1.6 - * @date 2020-12-08T1931+0100 * * @reporter @nikelaos * @link https://wordpress.org/support/topic/more-feature-ideas/ diff --git a/class/layout/abstract-engine.php b/class/layout/abstract-engine.php index b1826e6..7563f71 100644 --- a/class/layout/abstract-engine.php +++ b/class/layout/abstract-engine.php @@ -5,12 +5,11 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:56 * - * @since 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100 - * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100 - * @since 2.1.4 optional step argument and support for floating in numbox 2020-12-05T0540+0100 - * @since 2.1.6 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100 + * @since 2.1.2 add versioning of settings.css for cache busting + * @since 2.1.4 automate passing version number for cache busting + * @since 2.1.4 optional step argument and support for floating in numbox + * @since 2.1.6 fix punctuation-related localization issue in dashboard labels * * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. */ @@ -199,7 +198,6 @@ abstract class MCI_Footnotes_Layout_Engine { * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. * * @since 2.5.5 - * @date 2021-02-14T1928+0100 * * @reporter @docteurfitness * @link https://wordpress.org/support/topic/simply-speed-optimisation/ @@ -556,7 +554,7 @@ abstract class MCI_Footnotes_Layout_Engine { * @return string * * Edited: - * @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100 + * @since 2.1.4 step argument and number_format() to allow decimals. */ protected function add_num_box( $p_str_setting_name, $p_in_min, $p_int_max, $p_bool_deci = false ) { // Collect data for given settings field. diff --git a/class/layout/diagnostics.php b/class/layout/diagnostics.php index 1a30015..0889af6 100644 --- a/class/layout/diagnostics.php +++ b/class/layout/diagnostics.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 14:47 */ /** diff --git a/class/layout/init.php b/class/layout/init.php index c3f505e..39318c9 100644 --- a/class/layout/init.php +++ b/class/layout/init.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 12.09.14 10:26 */ /** diff --git a/class/layout/settings.php b/class/layout/settings.php index 5fb3a89..babde9a 100644 --- a/class/layout/settings.php +++ b/class/layout/settings.php @@ -4,39 +4,38 @@ * * @filesource * @since 1.5.0 - * @date 14.09.14 14:47 * - * @since 2.0.4 restore arrow settings 2020-11-01T0509+0100 - * @since 2.1.0 read-on button label 2020-11-08T2148+0100 - * @since 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100 + * @since 2.0.4 restore arrow settings + * @since 2.1.0 read-on button label + * @since 2.1.1 options for ref container and alternative tooltips * @since 2.1.1 Referrers: superscript becomes optional, thanks to @cwbayer bug report * @since 2.1.2 priority level settings for all other hooks, thanks to @nikelaos * @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705 - * @since 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100 - * @since 2.1.6 slight UI reordering 2020-12-09T1114+0100 - * @since 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100 - * @since 2.1.6 remove expert mode setting as outdated 2020-12-09T2105+0100 + * @since 2.1.4 settings for ref container, tooltips and scrolling + * @since 2.1.6 slight UI reordering + * @since 2.1.6 option to disable URL line wrapping + * @since 2.1.6 remove expert mode setting as outdated * @since 2.2.0 start/end short codes: more predefined options, thanks to @nikelaos * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100 - * @since 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100 - * @since 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 - * @since 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1244+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2021+0100 + * @since 2.2.0 add options, redistribute, update strings + * @since 2.2.0 shortcode for reference container custom position + * @since 2.2.2 Custom CSS settings container migration + * @since 2.2.4 move backlink symbol selection under previous tab + * @since 2.2.5 support for Ibid. notation thanks to @meglio * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ - * @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100 + * @since 2.2.10 reference container row border option, thanks to @noobishh * @link https://wordpress.org/support/topic/borders-25/ * @since 2.3.0 Reference container: convert top padding to margin and make it a setting, thanks to @hamshe * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635 - * @since 2.3.0 rename Priority level tab as Scope and priority 2020-12-26T2222+0100 - * @since 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' 2020-12-27T1243+0100 - * @since 2.3.0 mention op. cit. abbreviation 2020-12-28T2342+0100 - * @since 2.3.0 add settings for hard links, thanks to @psykonevro and @martinneumannat 2020-12-29T1322+0100 + * @since 2.3.0 rename Priority level tab as Scope and priority + * @since 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' + * @since 2.3.0 mention op. cit. abbreviation + * @since 2.3.0 add settings for hard links, thanks to @psykonevro and @martinneumannat * @link https://wordpress.org/support/topic/making-it-amp-compatible/ * @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/ - * @since 2.4.0 footnote shortcode syntax validation 2021-01-01T0624+0100 + * @since 2.4.0 footnote shortcode syntax validation * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ @@ -200,8 +199,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.0 * * Completed: - * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.1.4: layout and typography options + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ */ public function reference_container() { @@ -372,14 +371,14 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1412+0100 - * @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100 + * Edited heading + * @since 2.2.0 start/end short codes: more predefined options * @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/ - * @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100 - * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100 + * @since 2.2.0 3 boxes for clarity + * @since 2.2.5 support for Ibid. notation thanks to @meglio * @link https://wordpress.org/support/topic/add-support-for-ibid-notation/ - * @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100 - * @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100 + * @since 2.4.0 added warning about Block Editor escapement disruption + * @since 2.4.0 removed the HTML comment tag option * @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ */ @@ -616,8 +615,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.0 * * Edited: - * @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100 - * @since 2.2.0 more options 2020-12-11T0432+0100 + * @since 2.2.0 position-sensitive placeholders to support more locales + * @since 2.2.0 more options */ public function love() { // Options for the acknowledgment display in the footer. @@ -665,11 +664,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1453+0100 + * Edited heading * @since 2.1.1 more settings and notices, thanks to @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 - * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 + * @since 2.2.0 dedicated to the excerpt setting and its notices */ public function excerpts() { // Options for Yes/No select box. @@ -702,9 +701,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * * @since 1.5.0 * - * Edited heading 2020-12-12T1513+0100 + * Edited heading * @since 2.1.1 option for superscript (optionally baseline referrers) - * @since 2.2.0 option for link element moved here 2020-12-12T1514+0100 + * @since 2.2.0 option for link element moved here */ public function superscript() { // Options for Yes/No select box. @@ -1099,7 +1098,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * - Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report. * * @since 2.0.4 - * @date 2020-11-02T2115+0100 * * @reporter @mmallett * @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037 @@ -1135,10 +1133,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 * list directly in the template, as CSS is in English anyway * @see templates/dashboard/customize-css.html - * 2020-12-09T1113+0100 * - * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 - * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed 2020-12-27T1257+0100 + * @since 2.2.2 migrate Custom CSS to a dedicated tab + * @since 2.3.0 say 'copy-paste' instead of 'cut and paste' since cutting is not needed * @since 2.5.1 mention validity while visible, thanks to @rkupadhya bug report */ public function custom_css() { @@ -1240,8 +1237,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * @since 1.5.5 * * Edited: - * @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100 - * @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100 + * @since 2.1.1 priority level setting for the_content + * @since 2.1.4 priority level settings for the other hooks * * priority level was initially hard-coded default * shows "9223372036854775807" in the numbox @@ -1249,8 +1246,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine { * but a numbox cannot be set to empty: * define -1 as PHP_INT_MAX instead * - * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 - * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 + * @since 2.2.9 removed the warning about the widget text hook + * @since 2.2.9 added guidance for the widget text hook */ public function lookup_hooks() { // Load template file. diff --git a/class/settings.php b/class/settings.php index d83907b..b1fc467 100644 --- a/class/settings.php +++ b/class/settings.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 10:43 * * The constants are ordered by ascending version so their docblocks can replace most of this list. * @since 2.0.0 Update: **symbol for backlinks** removed; hyperlink moved to the reference number. @@ -106,7 +105,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037 * * @since 2.0.4 - * @date 2020-11-02T2115+0100 * @var str */ const C_STR_HYPERLINK_ARROW = 'footnote_inputfield_custom_hyperlink_symbol'; @@ -288,11 +286,9 @@ class MCI_Footnotes_Settings { * @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'; @@ -422,7 +418,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ * * @since 2.1.0 - * @date 2020-11-08T2106+0100 * @var str */ const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = 'footnote_inputfield_readon_label'; @@ -436,7 +431,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * * @since 2.1.1 - * @date 2020-11-11T1817+0100 * @var str * * These alternative tooltips work around a website related jQuery UI @@ -455,7 +449,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ * * @since 2.1.1 - * @date 2020-11-16T0859+0100 * @var str */ const C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags'; @@ -469,7 +462,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138 * * @since 2.1.1 - * @date 2020-11-16T2021+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = 'footnotes_inputfield_reference_container_backlink_symbol_enable'; @@ -506,7 +498,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 * * @since 2.1.1 - * @date 2020-11-16T2024+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = 'footnotes_inputfield_reference_container_backlink_symbol_switch'; @@ -526,7 +517,6 @@ class MCI_Footnotes_Settings { * @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. @@ -535,7 +525,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345 * * @since 2.1.1 - * @date 2020-11-16T0859+0100 * * - Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report. * @@ -543,7 +532,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/code-showing-up-in-references/ * * @since 2.1.6 - * @date 2020-12-10T0447+0100 * * 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 @@ -573,7 +561,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705 * * @since 2.1.2 - * @date 2020-11-20T0620+0100 * @var int */ const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level'; @@ -582,7 +569,6 @@ class MCI_Footnotes_Settings { * Settings container key for 'widget_title' hook priority level. * * @since 2.1.2 - * @date 2020-11-20T0620+0100 * @var int */ const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_title_priority_level'; @@ -591,7 +577,6 @@ class MCI_Footnotes_Settings { * Settings container key for 'widget_text' hook priority level. * * @since 2.1.2 - * @date 2020-11-20T0620+0100 * @var int */ const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level'; @@ -600,7 +585,6 @@ class MCI_Footnotes_Settings { * Settings container key for 'the_excerpt' hook priority level. * * @since 2.1.2 - * @date 2020-11-20T0620+0100 * @var int */ const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level'; @@ -735,7 +719,6 @@ class MCI_Footnotes_Settings { * Settings container key to enable setting the tooltip font size. * * @since 2.1.4 - * @date 2020-12-04T1023+0100. * @var str * * Tooltip font size reset to legacy by default since 2.1.4; @@ -775,7 +758,6 @@ class MCI_Footnotes_Settings { * - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset'; @@ -786,7 +768,6 @@ class MCI_Footnotes_Settings { * - Bugfix: Scroll duration: make configurable to conform to website content and style requirements. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration'; @@ -795,7 +776,6 @@ class MCI_Footnotes_Settings { * Settings container key for tooltip display fade-in delay. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay'; @@ -804,7 +784,6 @@ class MCI_Footnotes_Settings { * Settings container key for tooltip display fade-in duration. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION = 'footnotes_inputfield_mouse_over_box_fade_in_duration'; @@ -813,7 +792,6 @@ class MCI_Footnotes_Settings { * Settings container key for tooltip display fade-out delay. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY = 'footnotes_inputfield_mouse_over_box_fade_out_delay'; @@ -822,7 +800,6 @@ class MCI_Footnotes_Settings { * Settings container key for tooltip display fade-out duration. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * @var int */ const C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION = 'footnotes_inputfield_mouse_over_box_fade_out_duration'; @@ -834,7 +811,6 @@ class MCI_Footnotes_Settings { * Unicode-compliant browsers break URLs at slashes. * * @since 2.1.6 - * @date 2020-12-09T1606+0100 * @var str */ const C_STR_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled'; @@ -848,7 +824,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/reference-container-in-elementor/ * * @since 2.2.0 - * @date 2020-12-13T2056+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE = 'footnote_inputfield_reference_container_position_shortcode'; @@ -859,7 +834,6 @@ class MCI_Footnotes_Settings { * - Update: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed. * * @since 2.2.2 - * @date 2020-12-15T0520+0100 * @var str */ const C_STR_CUSTOM_CSS_NEW = 'footnote_inputfield_custom_css_new'; @@ -868,13 +842,11 @@ class MCI_Footnotes_Settings { * Settings container key to enable display of legacy Custom CSS metaboxes. * * @since 2.2.2 - * @date 2020-12-15T0520+0100 * @var str * * - Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints. * * @since 2.3.0 - * @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. @@ -885,7 +857,6 @@ class MCI_Footnotes_Settings { * Settings container key for alternative tooltip position. * * @since 2.2.5 - * @date 2020-12-17T0746+0100 * @var str * * Fixed width is for alternative tooltips, cannot reuse max-width nor offsets. @@ -896,7 +867,6 @@ class MCI_Footnotes_Settings { * Settings container key for alternative tooltip x offset. * * @since 2.2.5 - * @date 2020-12-17T0746+0100 * @var int */ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X = 'footnotes_inputfield_alternative_mouse_over_box_offset_x'; @@ -905,7 +875,6 @@ class MCI_Footnotes_Settings { * Settings container key for alternative tooltip y offset. * * @since 2.2.5 - * @date 2020-12-17T0746+0100 * @var int */ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y'; @@ -914,7 +883,6 @@ class MCI_Footnotes_Settings { * Settings container key for alternative tooltip width. * * @since 2.2.5 - * @date 2020-12-17T0746+0100 * @var int */ const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width'; @@ -929,7 +897,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ * * @since 2.2.5 - * @date 2020-12-18T1509+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element'; @@ -943,7 +910,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ * * @since 2.2.5 - * @date 2020-12-18T1509+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border'; @@ -957,7 +923,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/borders-25/ * * @since 2.2.10 - * @date 2020-12-25T2311+0100 * @var str */ const C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable'; @@ -971,7 +936,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635 * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var int */ const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin'; @@ -985,7 +949,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635 * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var int */ const C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin'; @@ -1002,7 +965,6 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/ * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var str * * When the alternative reference container is enabled, hard links are too. @@ -1013,7 +975,6 @@ class MCI_Footnotes_Settings { * Settings container key for the fragment ID slug in referrers. * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var str */ const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug'; @@ -1022,7 +983,6 @@ class MCI_Footnotes_Settings { * Settings container key for the fragment ID slug in footnotes. * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var str */ const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug'; @@ -1031,7 +991,6 @@ class MCI_Footnotes_Settings { * Settings container key for the ID separator in fragment IDs. * * @since 2.3.0 - * @date 2020-12-29T0914+0100 * @var str */ const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator'; @@ -1040,7 +999,6 @@ class MCI_Footnotes_Settings { * Settings container key to enable shortcode syntax validation. * * @since 2.4.0 - * @date 2021-01-01T0616+0100 * @var str */ const C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = 'footnotes_inputfield_shortcode_syntax_validation_enable'; @@ -1247,7 +1205,7 @@ class MCI_Footnotes_Settings { * @var array * * Edited. - * 2.2.2 added tab for Custom CSS 2020-12-15T0740+0100 + * 2.2.2 added tab for Custom CSS * * These are the storage container names, one per dashboard tab. */ @@ -1588,7 +1546,6 @@ class MCI_Footnotes_Settings { * @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 */ public function clear_all() { // Iterate through each Settings Container. diff --git a/class/task.php b/class/task.php index d895f27..b272245 100644 --- a/class/task.php +++ b/class/task.php @@ -6,8 +6,6 @@ * @package footnotes * @since 1.5.0 * - * @lastmodified 2021-02-20T0438+0100 - * * @since 2.0.0 Bugfix: various. * @since 2.0.4 Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. * @since 2.0.5 Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution. @@ -16,7 +14,7 @@ * @since 2.0.6 Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). * @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters. * @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.0.9 Bugfix: Remove the_post hook 2020-11-08T1839+0100. + * @since 2.0.9 Bugfix: Remove the_post hook. * @since 2.1.0 Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report. * @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report. @@ -149,7 +147,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830 * * @since 2.2.9 - * @date 2020-12-25T0338+0100 * @var int Incremented every time after a reference container is inserted. * * This ID disambiguates multiple reference containers in a page @@ -222,7 +219,6 @@ class MCI_Footnotes_Task { * - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. * * @since 2.1.4 - * @date 2020-12-05T0538+0100 * * - Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report. * @@ -230,8 +226,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13857922 * * @since 2.4.0 - * @date 2021-01-03T2055+0100 - * @date 2021-01-04T0504+0100 * @var int * * Websites may use high fixed headers not contracting at scroll. @@ -254,8 +248,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 * * @since 2.1.4 - * @date 2020-11-25T1306+0100 - * @date 2020-11-26T1051+0100 * * - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro issue report, thanks to @martinneumannat issue report and code contribution. * @@ -266,7 +258,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/ * * @since 2.3.0 - * @date 2020-12-30T2313+0100 * * Although widely used for that purpose, hyperlinks are disliked for footnote linking. * Browsers may need to be prevented from logging these clicks in the browsing history, @@ -320,7 +311,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/change-tooltip-text/ * * @since 2.5.2 - * @date 2021-01-19T2223+0100 * * Tooltips can display another content than the footnote entry * in the reference container. The trigger is a shortcode in @@ -394,7 +384,6 @@ class MCI_Footnotes_Task { * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * * @since 2.4.0 - * @date 2021-01-01T0227+0100 * * @var bool * @@ -418,7 +407,7 @@ class MCI_Footnotes_Task { * @since 2.0.5 Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts. * @since 2.0.6 Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). * @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.0.7 Bugfix: Set priority level back to 10 assuming it is unproblematic 2020-11-06T1344+0100. + * @since 2.0.7 Bugfix: Set priority level back to 10 assuming it is unproblematic. * @since 2.0.8 Bugfix: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). * @since 2.1.0 UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. * @since 2.1.1 Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. @@ -468,7 +457,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 * * @since 2.5.0 - * @date 2021-01-05T1402+0100 * * Category pages can have rich HTML content in a term description with article status. * For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled. @@ -485,7 +473,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ * * @since 2.5.1 - * @date 2021-01-18T2038+0100 */ add_filter( 'pum_popup_content', array( $this, 'footnotes_in_content' ), $l_int_the_content_priority ); } @@ -561,7 +548,6 @@ class MCI_Footnotes_Task { * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. * * @since 2.1.0 - * @date 2020-11-08T1839+0100 * @accountable @pewgeuges */ @@ -617,7 +603,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/ * * @since 2.5.4 - * @date 2021-02-12T1631+0100 * * Cannot be included in external stylesheet, as it is only optional. * The scope is variable too: referrers only, or all superscript elements. @@ -675,8 +660,7 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/ * * @since 2.2.5 - * @date 2020-12-18T1447+0100 - */ + */ if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER ) ) ) { echo '.footnote_container_prepare > '; echo MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT ); @@ -692,7 +676,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/borders-25/ * * @since 2.2.10 - * @date 2020-12-25T2304+0100 * Moving this internal CSS to external using `wp_add_inline_style()` is * discouraged, because that screws up support, and it is pointless from * a performance point of view. Moreover, that would cause cache busting @@ -788,7 +771,6 @@ class MCI_Footnotes_Task { * - Bugfix: Styling: Tooltips: fix font size issue by adding font size to settings with legacy as default. * * @since 2.1.4 - * @date 2020-12-03T0954+0100 */ echo ' font-size: '; if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED ) ) ) { @@ -855,12 +837,10 @@ class MCI_Footnotes_Task { * - Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style. * * @since 2.1.4 - * @date 2020-12-06T1320+0100 * * - Update: Tooltips: Alternative tooltips: connect to position/timing settings (for themes not supporting jQuery tooltips). * * @since 2.2.5 - * @date 2020-12-18T1113+0100 */ if ( ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled && ! MCI_Footnotes::$a_bool_amp_enabled ) { @@ -954,7 +934,7 @@ class MCI_Footnotes_Task { * Alternative tooltips. * * To streamline internal CSS, immutable rules are in external stylesheet. - * + * * @see dev-tooltips-alternative.css. */ } else { @@ -978,7 +958,6 @@ class MCI_Footnotes_Task { * - Bugfix: Custom CSS: insert new CSS in the public page header element after existing CSS. * * @since 2.2.3 - * @date 2020-12-15T1128+0100 * * Set custom CSS to override settings, not conversely. * Legacy Custom CSS is used until it’s set to disappear after dashboard tab migration. @@ -1029,7 +1008,6 @@ class MCI_Footnotes_Task { * * @since 1.5.0 * @since 2.2.0 More options. - * @date 2020-12-11T0506+0100 */ public function footnotes_output_footer() { if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { @@ -1355,7 +1333,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/reference-container-in-elementor/ * * @since 2.2.0 - * @date 2020-12-13T2057+0100 * * - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report. * @@ -1363,7 +1340,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126 * * @since 2.2.5 - * @date 2020-12-18T1434+0100 */ // Append the reference container or insert at shortcode. $l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE ); @@ -1522,7 +1498,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/ * * @since 2.5.0 - * @date 2021-01-07T0824+0100 * If footnotes short codes are unbalanced, and syntax validation is not disabled, * prepend a warning to the content; displays de facto beneath the post title. */ @@ -1779,13 +1754,11 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/ * * @since 2.1.3 - * @date 2020-11-23 - * + * * - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element. * * @since 2.1.4 - * @date 2020-11-25T0837+0100 - * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 + * @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682 * * - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report. * @@ -1800,23 +1773,20 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/ * * @since 2.1.6 - * @date 2020-12-09T1921+0100 - * - * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 + * + * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all * * - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap. * * @since 2.1.6 - * @date 2020-12-09T1606+0100 - * + * * - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * * @reporter @spiralofhope2 * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ * * @since 2.2.6 - * @date 2020-12-23T0409+0100 - * + * * - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports. * * @reporter @rjl20 @@ -1838,38 +1808,32 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029 * * @since 2.2.7 - * @date 2020-12-23T1046+0100 - * + * * - Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report. * * @reporter @spiralofhope2 * @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/ * * @since 2.2.8 - * @date 2020-12-23T1107+0100 - * Correct is duplicating the negative lookbehind w/o quotes: '(?get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL ); @@ -2055,7 +2017,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/wp_debug-php-notice/ * * @since 2.4.0 - * @date 2021-01-04T1622+0100 * If no hyperlink nor offset anchor is needed, initialize as empty. */ $l_str_footnote_link_argument = ''; @@ -2267,7 +2228,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 * * @since 2.1.4 - * @date 2020-11-28T1048+0100 * Initially an appended comma was hard-coded in this algorithm for enumerations. * The comma in enumerations is not universally preferred. */ @@ -2338,7 +2298,6 @@ class MCI_Footnotes_Task { * - Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks. * * @since 2.1.4 - * @date 2020-11-28T1049+0100 * * The backlinks of combined footnotes are generally preferred in an enumeration. * But when few footnotes are identical, stacking the items in list form is better. @@ -2362,8 +2321,7 @@ class MCI_Footnotes_Task { * - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column. * * @since 2.1.1 - * @date 2020-11-16T2024+0100 - */ + */ $l_bool_combine_identical_footnotes = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_COMBINE_IDENTICAL_FOOTNOTES ) ); // AMP compatibility requires a full set of AMP compatible table row templates. @@ -2431,7 +2389,6 @@ class MCI_Footnotes_Task { * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * * @since 2.1.1 - * @date 2020-11-16T2024+0100 * * @contributor @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 @@ -2440,7 +2397,6 @@ class MCI_Footnotes_Task { * - Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on. * * @since 2.1.4 - * @date 2020-11-26T1633+0100 */ $l_bool_symbol_switch = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH ) ); @@ -2530,7 +2486,6 @@ class MCI_Footnotes_Task { * @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/ * * @since 2.1.1 - * @date 2020-11-14T2233+0100 * Prepare to have single footnotes, where the click event and * optional hard link need to be set to cover the table cell, * for better usability and UX. @@ -2563,7 +2518,7 @@ class MCI_Footnotes_Task { /* * The click event goes in the table cell if footnote remains single. */ - // Reverted wrong linting 2021-03-20T0032+0100. + // Reverted wrong linting. $l_str_backlink_event = ' onclick="footnote_moveToAnchor_'; $l_str_backlink_event .= self::$a_int_post_id; @@ -2642,7 +2597,7 @@ class MCI_Footnotes_Task { $l_str_footnote_backlinks .= ' class="footnote_backlink"'; - // Reverted wrong linting 2021-03-20T0032+0100. + // Reverted wrong linting. $l_str_footnote_backlinks .= ' onclick="footnote_moveToAnchor_'; $l_str_footnote_backlinks .= self::$a_int_post_id; @@ -2746,7 +2701,6 @@ class MCI_Footnotes_Task { * @reporter @lukashuggenberg * * @since 2.4.0 - * @date 2021-01-04T0504+0100 * Themes may drop-cap a first letter of initial paragraphs, like this label. * In case of empty label that would apply to the left half button character. * Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE. diff --git a/class/template.php b/class/template.php index 1e68163..7bf970f 100644 --- a/class/template.php +++ b/class/template.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 10:58 * * @since 2.2.6 Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * @since 2.5.0 Adding: Templates: Enable template location stack, thanks to @misfist issue report and code contribution. @@ -71,7 +70,6 @@ class MCI_Footnotes_Template { * - Adding: Templates: support for custom templates in sibling folder, thanks to @misfist issue report. * * @since 2.2.6 - * @date 2020-12-19T0606+0100 * * @reporter @misfist * @link https://wordpress.org/support/topic/template-override-filter/ diff --git a/class/widgets/base.php b/class/widgets/base.php index 6618f28..d45e234 100644 --- a/class/widgets/base.php +++ b/class/widgets/base.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 14:30 * * @since 1.6.4 Update: replace deprecated function WP_Widget() with recommended __construct(), thanks to @dartiss code contribution. */ diff --git a/class/widgets/reference-container.php b/class/widgets/reference-container.php index 9a9a137..082b90f 100644 --- a/class/widgets/reference-container.php +++ b/class/widgets/reference-container.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 14:26 */ /** @@ -41,7 +40,7 @@ class MCI_Footnotes_Widget_Reference_Container extends MCI_Footnotes_Widget_Base * @since 1.5.0 * @return string * - * Edit: curly quotes 2.2.0 2020-12-12T2130+0100 + * Edit: curly quotes 2.2.0 */ protected function get_description() { return __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' ); @@ -54,7 +53,7 @@ class MCI_Footnotes_Widget_Reference_Container extends MCI_Footnotes_Widget_Base * @param mixed $instance The instance of the widget. * @return void * - * Edit: curly quotes 2.2.0 2020-12-12T2130+0100 + * Edit: curly quotes 2.2.0 */ public function form( $instance ) { echo __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' ); diff --git a/class/wysiwyg.php b/class/wysiwyg.php index 6ee2c11..3579e3c 100644 --- a/class/wysiwyg.php +++ b/class/wysiwyg.php @@ -5,7 +5,6 @@ * @filesource * @package footnotes * @since 1.5.0 - * @date 14.09.14 17:30 */ /** diff --git a/css/dev-common.css b/css/dev-common.css index 332d90c..712a4c9 100644 --- a/css/dev-common.css +++ b/css/dev-common.css @@ -21,7 +21,6 @@ * @link https://wordpress.org/support/topic/simply-speed-optimisation/ * * @since 2.5.5 - * @date 2021-02-14T1543+0100 * * Six development stylesheets are concatenated to 12 unified stylesheets. * The unminified development stylesheets are distributed for reference. diff --git a/css/dev-layout-entry-content.css b/css/dev-layout-entry-content.css index d33feb9..491b025 100644 --- a/css/dev-layout-entry-content.css +++ b/css/dev-layout-entry-content.css @@ -9,11 +9,9 @@ * * Since v2.1.4 of Footnotes * - * Modified for 2.2.2 2020-12-15T1004+0100 - * Modified for 2.2.5 2020-12-16T1321+0100 - * Modified for 2.3.0 2020-12-29T0207+0100 - * - * Last modified: 2020-12-29T0210+0100 + * Modified for 2.2.2 + * Modified for 2.2.5 + * Modified for 2.3.0 * * The enqueuing of this stylesheet is optional and can be * enabled in the dashboard under General settings > diff --git a/css/dev-layout-main-content.css b/css/dev-layout-main-content.css index 6eb75f8..f3498b4 100644 --- a/css/dev-layout-main-content.css +++ b/css/dev-layout-main-content.css @@ -9,8 +9,7 @@ * * Since v2.1.4 of Footnotes * - * Last modified for v2.2.2 2020-12-15T1004+0100 - * Last modified for v2.2.4 2020-12-16T0625+0100 + * Last modified for v2.2.4 * * The enqueuing of this stylesheet is optional and can be * enabled in the Reference container settings. diff --git a/css/dev-layout-reference-container.css b/css/dev-layout-reference-container.css index 78021e1..8768559 100644 --- a/css/dev-layout-reference-container.css +++ b/css/dev-layout-reference-container.css @@ -9,7 +9,7 @@ * * Since v2.1.4 of Footnotes * - * Last modified for v2.2.4 2020-12-16T0624+0100 + * Last modified for v2.2.4 * * The enqueuing of this stylesheet is optional and can be * enabled in the Reference container settings. diff --git a/css/dev-tooltips.css b/css/dev-tooltips.css index fdd2a6f..d8b5ee4 100644 --- a/css/dev-tooltips.css +++ b/css/dev-tooltips.css @@ -1,15 +1,8 @@ /*").attr("id",j.maskId),a("body").append(e));var l=c();return e.css({position:"absolute",top:0,left:0,width:l[0],height:l[1],display:"none",opacity:j.startOpacity,zIndex:j.zIndex}),j.color&&e.css("backgroundColor",j.color),!1===d(j.onBeforeLoad)?this:(j.closeOnEsc&&a(document).on("keydown.mask",(function(b){27===b.keyCode&&a.mask.close(b)})),j.closeOnClick&&e.on("click.mask",(function(b){a.mask.close(b)})),a(window).on("resize.mask",(function(){a.mask.fit()})),k&&k.length&&(i=k.eq(0).css("zIndex"),a.each(k,(function(){var b=a(this);/relative|absolute|fixed/i.test(b.css("position"))||b.css("position","relative")})),f=k.css({zIndex:Math.max(j.zIndex+1,"auto"===i?0:i)})),e.css({display:"block"}).fadeTo(j.loadSpeed,j.opacity,(function(){a.mask.fit(),d(j.onLoad),g="full"})),g=!0,this)},close:function(){if(g){if(!1===d(h.onBeforeClose))return this;e.fadeOut(h.closeSpeed,(function(){d(h.onClose),f&&f.css({zIndex:i}),g=!1})),a(document).off("keydown.mask"),e.off("click.mask"),a(window).off("resize.mask")}return this},fit:function(){if(g){var a=c();e.css({width:a[0],height:a[1]})}},getMask:function(){return e},isLoaded:function(a){return a?"full"===g:g},getConf:function(){return h},getExposed:function(){return f}},a.fn.mask=function(b){return a.mask.load(b),this},a.fn.expose=function(b){return a.mask.load(b,this),this}}(jQuery),function(){var a=document.all,b="http://www.adobe.com/go/getflashplayer",c="function"===typeof jQuery,d=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,e={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};function f(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function g(a,b){var c=[];for(var d in a)a.hasOwnProperty(d)&&(c[d]=b(a[d]));return c}window.attachEvent&&window.attachEvent("onbeforeunload",(function(){__flash_unloadHandler=function(){},__flash_savedUnloadHandler=function(){}})),window.flashembed=function(a,b,c){if("string"===typeof a&&(a=document.getElementById(a.replace("#",""))),a)return"string"===typeof b&&(b={src:b}),new j(a,f(f({},e),b),c)};var h=f(window.flashembed,{conf:e,getVersion:function(){var a,b;try{b=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(c){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"))&&a.GetVariable("$version")}catch(e){try{b=(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"))&&a.GetVariable("$version")}catch(f){}}}return(b=d.exec(b))?[b[1],b[3]]:[0,0]},asString:function(a){if(null===a)return null;var b=typeof a;switch("object"===b&&a.push&&(b="array"),b){case"string":return'"'+(a=(a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1")).replace(/^\s?(\d+\.?\d*)%/,"$1pct"))+'"';case"array":return"["+g(a,(function(a){return h.asString(a)})).join(",")+"]";case"function":return'"function()"';case"object":var c=[];for(var d in a)a.hasOwnProperty(d)&&c.push('"'+d+'":'+h.asString(a[d]));return"{"+c.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(b,c){var d=''),b.width=b.height=b.id=b.w3c=b.src=null,b.onFail=b.version=b.expressInstall=null,b)b[e]&&(d+='');var g="";if(c){for(var i in c)if(c[i]){var j=c[i];g+=i+"="+encodeURIComponent(/function|object/.test(typeof j)?h.asString(j):j)+"&"}d+='"}return d+=""},isSupported:function(a){return i[0]>a[0]||i[0]===a[0]&&i[1]>=a[1]}}),i=h.getVersion();function j(c,d,e){if(h.isSupported(d.version))c.innerHTML=h.getHTML(d,e);else if(d.expressInstall&&h.isSupported([6,65]))c.innerHTML=h.getHTML(f(d,{src:d.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else if(c.innerHTML.replace(/\s/g,"")||(c.innerHTML="

                                                                                                                                                                                                                                                        Flash version "+d.version+" or greater is required

                                                                                                                                                                                                                                                        "+(i[0]>0?"Your version is "+i:"You have no flash plugin installed")+"

                                                                                                                                                                                                                                                        "+("A"===c.tagName?"

                                                                                                                                                                                                                                                        Click here to download latest version

                                                                                                                                                                                                                                                        ":"

                                                                                                                                                                                                                                                        Download latest version from here

                                                                                                                                                                                                                                                        "),"A"===c.tagName&&(c.onclick=function(){location.href=b})),d.onFail){var g=d.onFail.call(this);"string"===typeof g&&(c.innerHTML=g)}a&&(window[d.id]=document.getElementById(d.id)),f(this,{getRoot:function(){return c},getOptions:function(){return d},getConf:function(){return e},getApi:function(){return c.firstChild}})}c&&(jQuery.tools=jQuery.tools||{version:"v1.2.7"},jQuery.tools.flashembed={conf:e},jQuery.fn.flashembed=function(a,b){return this.each((function(){jQuery(this).data("flashembed",flashembed(this,a,b))}))})}(),function(a){var b,c,d,e;function f(a){if(a){var b=c.contentWindow.document;b.open().close(),b.location.hash=a}}a.tools=a.tools||{version:"v1.2.7"},a.tools.history={init:function(g){e||(setInterval((function(){var c=location.hash;c!==b&&a(window).trigger("hash",c)}),100),d=d?d.add(g):g,g.click((function(b){var d=a(this).attr("href");if("#"!=d.slice(0,1))return location.href="#"+d,b.preventDefault()})),e=!0)}},a(window).on("hash",(function(c,e){e?d.filter((function(){var b=a(this).attr("href");return b===e||b===e.replace("#","")})).trigger("history",[e]):d.eq(0).trigger("history",[e]),b=e})),a.fn.history=function(b){return a.tools.history.init(this),this.on("history",b)}}(jQuery),function(a){a.fn.mousewheel=function(a){return this[a?"on":"trigger"]("wheel",a)},a.event.special.wheel={setup:function(){a.event.add(this,b,c,{})},teardown:function(){a.event.remove(this,b,c)}};var b="mousewheel";function c(b){switch(b.type){case"mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case"DOMMouseScroll":a.extend(b,b.data),b.delta=-b.detail/3;break;case"mousewheel":b.delta=b.wheelDelta/120}return b.type="wheel",a.event.handle.call(this,b,b.delta)}}(jQuery),function(a){a.tools=a.tools||{version:"v1.2.7"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
                                                                                                                                                                                                                                                        ",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b)},function(b){var c=this.getConf();this.getTip().fadeOut(c.fadeOutSpeed,b)}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();"center"===g&&(e+=h/2),"bottom"===g&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();return"center"===g&&(f-=i/2),"left"===g&&(f-=i),{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw'Nonexistent effect "'+e.effect+'"';if(2!=(r=r.split(/,\s*/)).length)throw"Tooltip: bad events configuration for "+q;d.on(r[0],(function(a){clearTimeout(i),e.predelay?j=setTimeout((function(){f.show(a)}),e.predelay):f.show(a)})).on(r[1],(function(a){clearTimeout(j),e.delay?i=setTimeout((function(){f.hide(a)}),e.delay):f.hide(a)})),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h&&(l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next()).length||(h=d.parent().next()),!h.length))throw"Cannot find tooltip for "+d;if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);if(e.tip&&h.html(d.data("title")),(b=a.Event()).type="onBeforeShow",g.trigger(b,[o]),b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,(function(){b.type="onShow",n="full",g.trigger(b)}));var p=e.events.tooltip.split(/,\s*/);return h.data("__set")||(h.off(p[0]).on(p[0],(function(){clearTimeout(i),clearTimeout(j)})),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.off(p[1]).on(p[1],(function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])})),e.tip||h.data("__set",!0)),f},hide:function(c){return h&&f.isShown()?((c=a.Event()).type="onBeforeHide",g.trigger(c),c.isDefaultPrevented()?void 0:(n=!1,b[e.effect][1].call(f,(function(){c.type="onHide",g.trigger(c)})),f)):f},isShown:function(a){return a?"full"===n:n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),(function(b,c){typeof(e[c])==="function"&&a(f).on(c,e[c]),f[c]=function(b){return b&&a(f).on(c,b),f}}))}a.fn.tooltip=function(b){var c=this.data("tooltip");return c||("string"===typeof(b=a.extend(!0,{},a.tools.tooltip.conf,b)).position&&(b.position=b.position.split(/,?\s/)),this.each((function(){c=new d(a(this),b),a(this).data("tooltip",c)})),b.api?c:this)}}(jQuery),function(a){var b=a.tools.tooltip;function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){for(var b=a.length;b--;)if(a[b])return!1;return!0}b.dynamic={conf:{classNames:"top right bottom left"}},a.fn.dynamic=function(e){"number"===typeof e&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;return this.each((function(){var b=a(this).tooltip().onBeforeShow((function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);d(l)||(l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3])),(l[0]||l[2])&&(j.offset[0]*=-1),(l[1]||l[3])&&(j.offset[1]*=-1)),i.css({visibility:"visible"}).hide()}));b.onBeforeShow((function(){var a=this.getConf(),b=this.getTip();setTimeout((function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]}),0)})),b.onHide((function(){var a;this.getTip().removeClass(e.classNames)})),ret=b})),e.api?ret:this}}(jQuery),function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!0});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",(function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)}),(function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h="+"===h?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,(function(){a(this).hide(),b.call()}))}))}(jQuery); diff --git a/js/wysiwyg-editor.js b/js/wysiwyg-editor.js index 89ff9a8..c54c7b3 100644 --- a/js/wysiwyg-editor.js +++ b/js/wysiwyg-editor.js @@ -1,7 +1,7 @@ /** * Created by Stefan on 24.05.14. * - * Edit: be careful to maintain version number near EOF 2020-12-11T1225+0100 + * Edit: be careful to maintain version number near EOF */ (function() { @@ -60,7 +60,7 @@ * * @return {Object} Name/value array containing information about the plugin. * - * Edit: needs updating the version number manually 2020-12-11T1224+0100 + * Edit: needs updating the version number manually */ getInfo : function() { return {